-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
49 lines (45 loc) · 1.53 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
before_script:
- docker info
- echo -n $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY
build_workers:
stage: build
only:
changes:
- docker/Dockerfile.dev.workers
- app/*
script:
- docker pull $CI_REGISTRY_IMAGE/sfworkersdev:latest || true
- docker build -t sfworkersdev -f docker/Dockerfile.dev.workers . --tag $CI_REGISTRY_IMAGE/sfworkersdev:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE/sfworkersdev:$CI_COMMIT_SHA
build_pgcrconsumer:
stage: build
only:
changes:
- docker/Dockerfile.dev.pgcr_consumer
- app/*
- src/*
- public/*
script:
- docker pull $CI_REGISTRY_IMAGE/sfpgcrconsumerdev:latest || true
- docker build -t sfpgcrconsumerdev -f docker/Dockerfile.dev.pgcr_consumer . --tag $CI_REGISTRY_IMAGE/sfpgcrconsumerdev:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE/sfpgcrconsumerdev:$CI_COMMIT_SHA
build_fe:
stage: build
only:
changes:
- docker/Dockerfile.dev.frontend
- app/*
- configs/nginx*
script:
- docker pull $CI_REGISTRY_IMAGE/sffedev:latest || true
- docker build -t sffedev -f docker/Dockerfile.dev.frontend . --tag $CI_REGISTRY_IMAGE/sffedev:$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE/sffedev:$CI_COMMIT_SHA
push_latest:
variables:
GIT_STRATEGY: none
stage: deploy
only:
- master
script:
- docker build -t sfworkersprod -f docker/Dockerfile.prod.workers . --tag $CI_REGISTRY_IMAGE/sfworkersprod:latest
- docker push $CI_REGISTRY_IMAGE/sfworkersprod:latest