Skip to content
Snippets Groups Projects
Commit f9e73053 authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg
Browse files

Rename variables

parent e31b493f
No related branches found
No related tags found
1 merge request!36Rename variables
Loading
Loading
@@ -7,14 +7,14 @@ variables:
DOCKER_DRIVER: overlay
 
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
stage: test
script:
# Hack to set an array in /bin/sh
# http://unix.stackexchange.com/a/137571
- set -- $CI_BUILD_NAME
- set -- $CI_JOB_NAME
- docker build -f "Dockerfile.$1" .
except:
- master
Loading
Loading
@@ -22,8 +22,8 @@ before_script:
.build_and_deploy: &build_and_deploy
stage: build
script:
- docker build -t "$CI_REGISTRY_IMAGE:$CI_BUILD_NAME" -f "Dockerfile.$CI_BUILD_NAME" .
- docker push "$CI_REGISTRY_IMAGE:$CI_BUILD_NAME"
- docker build -t "$CI_REGISTRY_IMAGE:$CI_JOB_NAME" -f "Dockerfile.$CI_BUILD_NAME" .
- docker push "$CI_REGISTRY_IMAGE:$CI_JOB_NAME"
only:
- master
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment