36 lines
561 B
YAML
36 lines
561 B
YAML
image: leenooks/ci-docker:latest
|
|
|
|
stages:
|
|
- test
|
|
- build
|
|
|
|
services:
|
|
- leenooks/ci-docker:dind
|
|
|
|
variables:
|
|
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}:${VERSION} .
|
|
- docker tag ${IMAGE}:${VERSION} ${REGISTRY}/${IMAGE}:${VERSION}
|
|
- docker push ${REGISTRY}/${IMAGE}:${VERSION}
|
|
tags:
|
|
- docker
|
|
only:
|
|
- c6
|