Verified Commit 83391b3d authored by Tomáš Sapák's avatar Tomáš Sapák
Browse files

Refactor CI to support multiple docker images

parent 5d87f7d0
Pipeline #39656 failed with stage
in 1 minute and 4 seconds
docker-build-master:
.docker-build_template: &build_template
# Official docker image.
image: docker:latest
stage: build
......@@ -6,22 +6,9 @@ docker-build-master:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE" .
- docker push "$CI_REGISTRY_IMAGE"
only:
- master
docker-build:
# Official docker image.
image: docker:latest
stage: build
services:
- docker:dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
build:project-usage-to-influx:
<<: *build_template
script:
- docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
- docker build --pull -t "${CI_REGISTRY_IMAGE}-project-usage-to-influx:$CI_COMMIT_REF_SLUG" ./project-usage-to-influx/
- docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
except:
- master
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment