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

44 lines
1.1 KiB
YAML
Raw Normal View History

2017-07-23 12:55:17 +00:00
image: docker:latest
stages:
- test
- build
variables:
2017-12-12 09:26:21 +00:00
VERSION: 9.0.1.8-9.0.1.18
2017-07-23 12:55:17 +00:00
CACHETAG: build
DOCKER_REGISTRY: registry.leenooks.net
DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375
services:
- ${DOCKER_REGISTRY}/leenooks/ci-docker:dind
before_script:
- docker info
- docker version
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${DOCKER_REGISTRY}
- echo "CI_PROJECT_PATH ${CI_PROJECT_PATH} CI_COMMIT_TAG ${CI_COMMIT_TAG} CI_COMMIT_REF_NAME ${CI_COMMIT_REF_NAME}"
- echo "CI_REGISTRY ${CI_REGISTRY} CI_REGISTRY_IMAGE ${CI_REGISTRY_IMAGE} CI ${CI}"
test:
stage: test
script:
- cat /etc/hosts
- env|sort
- docker build -t ${CI_REGISTRY_IMAGE}:${VERSION} .
- docker images
only:
- debug
build:
stage: build
script:
- ( docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true ) && df
2017-07-23 12:55:17 +00:00
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
- docker push ${CI_REGISTRY_IMAGE}:${CACHETAG}
tags:
- docker
only:
- master