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.
base/.gitlab-ci.yml

41 lines
796 B
YAML
Raw Normal View History

2016-07-10 16:04:10 +00:00
image: docker:latest
stages:
2016-07-07 13:48:28 +00:00
- test
- build
2016-05-26 12:09:23 +00:00
variables:
2016-07-07 13:59:39 +00:00
VERSION: "6"
2016-07-10 16:04:10 +00:00
DOCKER_IMAGE: leenooks/base
DOCKER_REGISTRY: registry.leenooks.net
DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375
services:
- ${DOCKER_REGISTRY}/leenooks/ci-docker:dind
2016-05-26 12:09:23 +00:00
before_script:
- docker info
- docker version
2016-07-10 16:04:10 +00:00
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${DOCKER_REGISTRY}
2016-05-26 12:09:23 +00:00
2016-07-07 13:48:28 +00:00
test:
stage: test
script:
2016-07-10 16:04:10 +00:00
- cat /etc/hosts
- env|sort
- docker build -t ${DOCKER_IMAGE}:${VERSION} .
2016-07-07 13:48:28 +00:00
- docker images
only:
- debug
2016-05-26 12:09:23 +00:00
build:
stage: build
script:
2016-07-10 16:04:10 +00:00
- docker build -t ${DOCKER_IMAGE}:${VERSION} .
- docker tag ${DOCKER_IMAGE}:${VERSION} ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION}
- docker push ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION}
tags:
- docker
2016-07-07 13:48:28 +00:00
only:
2016-07-07 13:59:39 +00:00
- c6