diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f576f83..ad19157 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,28 +3,28 @@ image: leenooks/ci-docker:latest services: - leenooks/ci-docker:dind +variables: + REGISTRY=registry.leenooks.net + IMAGE=leenooks/base + before_script: -- env | sort -- cat /etc/hosts -- ps -Af -- df -- find /etc/docker/ -print -exec ls -al {} \; -- id -- set +- env|sort - docker info - docker version -- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.leenooks.net +- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${REGISTRY} test: stage: test script: - - docker build -t leenooks/base . + - docker build -t ${IMAGE} . only: - debug build: stage: build script: - - docker build -t leenooks/base . - - docker tag leenooks/base 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