Testing with variables
This commit is contained in:
parent
a3f2a619d0
commit
621faec8ba
@ -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
|
||||
|
Reference in New Issue
Block a user