This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
ci-docker/.gitlab-ci.yml

41 lines
806 B
YAML
Raw Normal View History

2016-07-08 06:57:16 +00:00
image: docker:latest
stages:
- test
- build
variables:
VERSION: dind
DOCKER_IMAGE: leenooks/ci-docker
DOCKER_REGISTRY: registry.leenooks.net
2017-05-25 10:52:30 +00:00
DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375
services:
2017-05-25 10:52:30 +00:00
- ${DOCKER_REGISTRY}/leenooks/ci-docker:dind
2016-07-08 06:57:16 +00:00
before_script:
- docker info
- docker version
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${DOCKER_REGISTRY}
2016-07-08 06:57:16 +00:00
test:
stage: test
script:
- cat /etc/hosts
- env|sort
- docker build -t ${DOCKER_IMAGE}:${VERSION} .
2016-07-08 06:57:16 +00:00
- docker images
only:
- debug
build:
stage: build
script:
- docker build -t ${DOCKER_IMAGE}:${VERSION} .
- docker tag ${DOCKER_IMAGE}:${VERSION} ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION}
- docker push ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION}
2016-07-08 06:57:16 +00:00
tags:
- docker
only:
- master