Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
fresh
Commits
b290e7c63c6d
Commit
cebf3830
authored
Mar 24, 2021
by
Simon Chabot
Browse files
ci: use common templates for docker-build, releasing and publishing
parent
5bb3332f4abe
Pipeline
#52352
passed with stages
in 6 minutes and 17 seconds
Changes
1
Pipelines
30
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
b290e7c6
image
:
python:3.7
include
:
-
project
:
"
open-source/gitlab-templates"
ref
:
"
branch/default"
file
:
# the stages are:
-
"
templates/no-duplicate-pipelines.yml"
# no stage
-
"
templates/docker-build.yml"
# test and publish
-
"
templates/release-on-heptapod.yml"
# release
-
"
templates/publish-pypi.yml"
# release
stages
:
-
test
-
release
-
publish
-
deploy
.test
:
...
...
@@ -36,35 +46,6 @@ yamllint:
script
:
-
tox -e yamllint
image_build
:
stage
:
release
image
:
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
"
"
]
script
:
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
-
/kaniko/executor
--context $CI_PROJECT_DIR
--dockerfile $CI_PROJECT_DIR/Dockerfile
--destination $CI_REGISTRY_IMAGE:$CI_COMMIT_HG_SHORT_SHA
rules
:
-
if
:
'
$CI_COMMIT_REF_NAME
!=
"branch/default"'
image_build_latest
:
stage
:
release
image
:
name
:
gcr.io/kaniko-project/executor:debug
entrypoint
:
[
"
"
]
script
:
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
-
/kaniko/executor
--context $CI_PROJECT_DIR
--dockerfile $CI_PROJECT_DIR/Dockerfile
--destination $CI_REGISTRY_IMAGE:$CI_COMMIT_HG_SHORT_SHA
--destination $CI_REGISTRY_IMAGE:latest
rules
:
-
if
:
'
$CI_COMMIT_REF_NAME
==
"branch/default"'
deploy
:
image
:
name
:
lachlanevenson/k8s-kubectl:latest
...
...
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