Split out dev/prod docker builds into parallel jobs.
This commit is contained in:
parent
f6b629bd60
commit
d7065ee43d
1 changed files with 14 additions and 5 deletions
|
@ -1,17 +1,26 @@
|
|||
build_image:
|
||||
build_test_image:
|
||||
image: docker:git
|
||||
services:
|
||||
- docker:dind
|
||||
script:
|
||||
- docker build --build-arg CI_COMMIT_SHA=$CI_COMMIT_SHA -f docker/Dockerfile.dev -t asia.gcr.io/linuxconfsydney/symposion_app_dev:$CI_COMMIT_SHA .
|
||||
- docker login -u _json_key -p "$GOOGLE_KEY" https://asia.gcr.io
|
||||
- docker push asia.gcr.io/linuxconfsydney/symposion_app_dev:$CI_COMMIT_SHA
|
||||
- docker tag asia.gcr.io/linuxconfsydney/symposion_app_dev:$CI_COMMIT_SHA asia.gcr.io/linuxconfsydney/symposion_app_dev:latest
|
||||
- docker push asia.gcr.io/linuxconfsydney/symposion_app_dev:latest
|
||||
only:
|
||||
- master
|
||||
|
||||
build_prod_image:
|
||||
image: docker:git
|
||||
services:
|
||||
- docker:dind
|
||||
script:
|
||||
- docker build -f docker/Dockerfile -t asia.gcr.io/linuxconfsydney/symposion_app:$CI_COMMIT_SHA .
|
||||
- docker build --build-arg CI_COMMIT_SHA=$CI_COMMIT_SHA -f docker/Dockerfile.dev -t asia.gcr.io/linuxconfsydney/symposion_app_dev:$CI_COMMIT_SHA .
|
||||
- docker login -u _json_key -p "$GOOGLE_KEY" https://asia.gcr.io
|
||||
- docker push asia.gcr.io/linuxconfsydney/symposion_app:$CI_COMMIT_SHA
|
||||
- docker push asia.gcr.io/linuxconfsydney/symposion_app_dev:$CI_COMMIT_SHA
|
||||
- docker tag asia.gcr.io/linuxconfsydney/symposion_app:$CI_COMMIT_SHA asia.gcr.io/linuxconfsydney/symposion_app:latest
|
||||
- docker tag asia.gcr.io/linuxconfsydney/symposion_app_dev:$CI_COMMIT_SHA asia.gcr.io/linuxconfsydney/symposion_app_dev:latest
|
||||
- docker push asia.gcr.io/linuxconfsydney/symposion_app:latest
|
||||
- docker push asia.gcr.io/linuxconfsydney/symposion_app_dev:latest
|
||||
only:
|
||||
- master
|
||||
|
||||
|
|
Loading…
Reference in a new issue