Commit cebf3830 authored by Simon Chabot's avatar 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
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
......
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