Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cloud
cloud tools
Commits
83391b3d
Verified
Commit
83391b3d
authored
Mar 16, 2020
by
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
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
83391b3d
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
Dockerfile
→
project-usage-to-influx/
Dockerfile
View file @
83391b3d
File moved
projects_usage_to_influx.py
→
project-usage-to-influx/
projects_usage_to_influx.py
View file @
83391b3d
File moved
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment