diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b9c75b4e..ea7573f6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -61,6 +61,10 @@ build_2019_image: - docker pull "${CONTAINER_IMAGE_2019}":latest || true - docker build --cache-from "${CONTAINER_IMAGE_2019}":latest -f docker/Dockerfile -t "${CONTAINER_IMAGE_2019}":$CI_COMMIT_SHA . - docker push "${CONTAINER_IMAGE_2019}":$CI_COMMIT_SHA + - docker build --build-arg CI_COMMIT_SHA=$CI_COMMIT_SHA -f docker/Dockerfile.dev -t "${CONTAINER_IMAGE_2019}"_dev:$CI_COMMIT_SHA . + - docker push "${CONTAINER_IMAGE_2019}"_dev:$CI_COMMIT_SHA + - docker tag "${CONTAINER_IMAGE_2019}"_dev:$CI_COMMIT_SHA "${CONTAINER_IMAGE_2019}"_dev:$CI_COMMIT_REF_SLUG + - docker push "${CONTAINER_IMAGE_2019}"_dev:$CI_COMMIT_REF_SLUG except: - "2019" - "dev/2019" @@ -81,21 +85,6 @@ build_2019_image: name: 2019/prod url: https://2019.linux.conf.au -build_2019_dev_image: - image: docker:git - stage: build - services: - - docker:dind - script: - - docker login -u _json_key -p "$GOOGLE_KEY" https://asia.gcr.io - - docker pull "${CONTAINER_IMAGE_2019}"_dev:latest || true - - docker build --cache-from "${CONTAINER_IMAGE_2019}"_dev:latest --build-arg CI_COMMIT_SHA=$CI_COMMIT_SHA -f docker/Dockerfile.dev -t "${CONTAINER_IMAGE_2019}"_dev:$CI_COMMIT_SHA . - - docker push "${CONTAINER_IMAGE_2019}"_dev:$CI_COMMIT_SHA - - docker tag "${CONTAINER_IMAGE_2019}"_dev:$CI_COMMIT_SHA "${CONTAINER_IMAGE_2019}"_dev:$CI_COMMIT_REF_SLUG - - docker push "${CONTAINER_IMAGE_2019}"_dev:$CI_COMMIT_REF_SLUG - except: - - master - 2019_dev-deploy: image: google/cloud-sdk stage: deploy