Rename variables

This commit is contained in:
Zeger-Jan van de Weg 2017-04-27 19:13:44 +00:00
parent e31b493fa2
commit f9e730534c

View file

@ -7,14 +7,14 @@ variables:
DOCKER_DRIVER: overlay DOCKER_DRIVER: overlay
before_script: before_script:
- docker login -u "gitlab-ci-token" -p "$CI_BUILD_TOKEN" "$CI_REGISTRY" - docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
.test_build: &test_build .test_build: &test_build
stage: test stage: test
script: script:
# Hack to set an array in /bin/sh # Hack to set an array in /bin/sh
# http://unix.stackexchange.com/a/137571 # http://unix.stackexchange.com/a/137571
- set -- $CI_BUILD_NAME - set -- $CI_JOB_NAME
- docker build -f "Dockerfile.$1" . - docker build -f "Dockerfile.$1" .
except: except:
- master - master
@ -22,8 +22,8 @@ before_script:
.build_and_deploy: &build_and_deploy .build_and_deploy: &build_and_deploy
stage: build stage: build
script: script:
- docker build -t "$CI_REGISTRY_IMAGE:$CI_BUILD_NAME" -f "Dockerfile.$CI_BUILD_NAME" . - docker build -t "$CI_REGISTRY_IMAGE:$CI_JOB_NAME" -f "Dockerfile.$CI_BUILD_NAME" .
- docker push "$CI_REGISTRY_IMAGE:$CI_BUILD_NAME" - docker push "$CI_REGISTRY_IMAGE:$CI_JOB_NAME"
only: only:
- master - master