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:
- leenooks/ci-docker:dind
variables:
REGISTRY=registry.leenooks.net
IMAGE=leenooks/base
before_script:
- env | sort
- cat /etc/hosts
- ps -Af
- df
- find /etc/docker/ -print -exec ls -al {} \;
- id
- set
- env|sort
- docker info
- 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:
stage: test
script:
- docker build -t leenooks/base .
- docker build -t ${IMAGE} .
only:
- debug
build:
stage: build
script:
- docker build -t leenooks/base .
- docker tag leenooks/base registry.leenooks.net/leenooks/base
- docker push registry.leenooks.net/leenooks/base
- docker build -t ${IMAGE} .
- docker tag ${IMAGE} ${REGISTRY}/${IMAGE}
- docker push ${REGISTRY}/${IMAGE}
tags:
- docker