From dd2854b5eabc6a3946d095f67ace108f58cc6364 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 7 Jul 2016 23:04:28 +1000 Subject: [PATCH] Added .gitlab-ci.yml to auto build container --- .gitlab-ci.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ab08d54..52b46ca 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,14 +1,25 @@ -image: docker:latest +image: leenooks/ci-docker:latest + +stages: +- build services: -- docker:dind +- leenooks/ci-docker:dind + +variables: + REGISTRY: registry.leenooks.net + IMAGE: leenooks/base before_script: - docker info -- df +- docker version +- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${REGISTRY} build: stage: build script: - - docker build -t 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