Commit 8c8c0156 authored by Andrei Kirushchanka's avatar Andrei Kirushchanka
Browse files

Merge branch 'refactor_ci' into 'master'

Refactor CI to support multiple docker images

See merge request !2
parents 5d87f7d0 e0945a88
Pipeline #39668 passed with stage
in 49 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 push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
except:
- master
- docker build --pull -t "${CI_REGISTRY_IMAGE}/project-usage-to-influx:$CI_COMMIT_REF_SLUG" ./project-usage-to-influx/
- docker push "${CI_REGISTRY_IMAGE}/project-usage-to-influx:$CI_COMMIT_REF_SLUG"
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