-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
35 lines (30 loc) · 1.48 KB
/
.gitlab-ci.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
image: "adorsys/ci-build:201907"
variables:
DOCKER_REGISTRY: registry.gitlab.com
DOCKER_REGISTRY_ROOT: registry.gitlab.com/golden-dimension/timedone/gd-timetracker
stages:
- build
- deploy
before_script:
- chmod +x gradlew
build:
stage: build
script: ./gradlew clean syncNpm syncJar createDockerfile
artifacts:
paths:
- administration/build/libs/administration-0.1-SNAPSHOT.jar
- time-tracking-server/build/libs/time-tracking-server-0.1-SNAPSHOT.jar
- worker/build/libs/worker-0.1-SNAPSHOT.jar
deploy:
stage: deploy
script:
- docker build -t "${DOCKER_REGISTRY_ROOT}/ua-timetracker/worker:${CI_COMMIT_REF_SLUG}" worker/build/docker
- docker build -t "${DOCKER_REGISTRY_ROOT}/ua-timetracker/time-tracker:${CI_COMMIT_REF_SLUG}" time-tracking-server/build/docker
- docker build -t "${DOCKER_REGISTRY_ROOT}/ua-timetracker/time-tracker-ui:${CI_COMMIT_REF_SLUG}" time-tracker-ui/build/docker
- docker build -t "${DOCKER_REGISTRY_ROOT}/ua-timetracker/administration:${CI_COMMIT_REF_SLUG}" administration/build/docker
- docker login -u $CI_USER -p $CI_JOB_TOKEN
- docker push "${DOCKER_REGISTRY_ROOT}/ua-timetracker/worker:${CI_COMMIT_REF_SLUG}"
- docker push "${DOCKER_REGISTRY_ROOT}/ua-timetracker/time-tracker:${CI_COMMIT_REF_SLUG}"
- docker push "${DOCKER_REGISTRY_ROOT}/ua-timetracker/time-tracker-ui:${CI_COMMIT_REF_SLUG}"
- docker push "${DOCKER_REGISTRY_ROOT}/ua-timetracker/administration:${CI_COMMIT_REF_SLUG}"
- docker logout