From 29072821ba8451f8be3e097b84c7a73da4725b0b Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 7 Jul 2016 23:29:56 +1000 Subject: [PATCH] Using gitlab variables --- .gitlab-ci.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 52b46ca..465346a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,19 +7,28 @@ services: - leenooks/ci-docker:dind variables: - REGISTRY: registry.leenooks.net - IMAGE: leenooks/base + VERSION: 6 before_script: +- env|sort - docker info - docker version - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${REGISTRY} +test: + stage: test + script: + - docker build -t ${IMAGE}:${VERSION} . + only: + - debug + build: stage: build script: - - docker build -t ${IMAGE} . - - docker tag ${IMAGE} ${REGISTRY}/${IMAGE} - - docker push ${REGISTRY}/${IMAGE} + - docker build -t ${IMAGE}:${VERSION} . + - docker tag ${IMAGE}:${VERSION} ${REGISTRY}/${IMAGE}:${VERSION} + - docker push ${REGISTRY}/${IMAGE}:${VERSION} tags: - docker + only: + - c6