-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitbucket-pipelines.yml
39 lines (37 loc) · 1.04 KB
/
bitbucket-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
image: atlassian/default-image:2
pipelines:
default:
- step:
name: Run tests
caches:
- gradle
script:
- bash ./gradlew --no-daemon test
branches:
master:
- step:
name: Run tests
caches:
- gradle
script:
- bash ./gradlew --no-daemon test
- step:
name: Build artifact
caches:
- gradle
script:
- bash ./gradlew --no-daemon bootJar
artifacts:
- build/libs/*
- step:
name: Build and deploy Docker image
caches:
- docker
- gradle
services:
- docker
script:
- export IMAGE_TAG=$(bash ./gradlew properties -q --no-daemon | grep "version:" | awk '{print $2}' | tr -d '[:space:]')
- docker build -t asirosh/orvisual-api:$IMAGE_TAG .
- docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD
- docker push asirosh/orvisual-api:$IMAGE_TAG