Testing with variables

This commit is contained in:
Deon George 2016-07-07 22:07:49 +10:00
parent a3f2a619d0
commit 621faec8ba

View File

@ -3,28 +3,28 @@ image: leenooks/ci-docker:latest
services: services:
- leenooks/ci-docker:dind - leenooks/ci-docker:dind
variables:
REGISTRY=registry.leenooks.net
IMAGE=leenooks/base
before_script: before_script:
- env|sort - env|sort
- cat /etc/hosts
- ps -Af
- df
- find /etc/docker/ -print -exec ls -al {} \;
- id
- set
- docker info - docker info
- docker version - docker version
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.leenooks.net - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${REGISTRY}
test: test:
stage: test stage: test
script: script:
- docker build -t leenooks/base . - docker build -t ${IMAGE} .
only: only:
- debug - debug
build: build:
stage: build stage: build
script: script:
- docker build -t leenooks/base . - docker build -t ${IMAGE} .
- docker tag leenooks/base registry.leenooks.net/leenooks/base - docker tag ${IMAGE} ${REGISTRY}/${IMAGE}
- docker push registry.leenooks.net/leenooks/base - docker push ${REGISTRY}/${IMAGE}
tags:
- docker