mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-09 10:02:56 +01:00
Merge branch 'zj-update-vars' into 'master'
Rename variables See merge request !36
This commit is contained in:
commit
ce51bcef65
1 changed files with 4 additions and 4 deletions
|
|
@ -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
|
||||
|
|
@ -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…
Add table
Add a link
Reference in a new issue