Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • open-source/gitlab-ci-templates
1 result
Show changes
Commits on Source (2)
......@@ -36,6 +36,10 @@
A recommended configuration for a cube would be:
```yaml
---
default:
image: python:3.7
include:
- project: "open-source/gitlab-ci-templates"
ref: "branch/default"
......@@ -39,5 +43,5 @@
include:
- project: "open-source/gitlab-ci-templates"
ref: "branch/default"
file: # the stages are:
file:
- "templates/no-duplicated-ci-pipelines.yml" # use workflow to avoid duplicated pipelines
......@@ -43,8 +47,14 @@
- "templates/no-duplicated-ci-pipelines.yml" # use workflow to avoid duplicated pipelines
- "templates/build-debian-package.yml" # will build a .deb and upload it to heptapod
- "templates/create-release-on-heptapod-including-debian-package.yml"
- "templates/upload-to-pypi.yml"
- "templates/lint/flake8.yml" # will do the equivalent of 'tox -e flake8'
- "templates/lint/check-manifest.yml" # will do the equivalent of 'tox -e check-manifest'
- "templates/lint/yamllint.yml" # will do the equivalent of 'tox -e yamllint'
- "templates/tests/py3.yml" # will do the equivalent of 'tox -e py3'
- "templates/create-release-on-heptapod.yml" # this will create a release on heptapod
- "templates/upload-to-pypi.yml" # on a new mercurial tag (expected to be done with release-new), will push a release on pypi
# uncomment and uses to customize/extend the configuration here if needed
# (it needs to be at the same level than "- project")
# - ".gitlab-ci-extended.yml"
stages:
- lint
- tests
......@@ -47,9 +57,7 @@
stages:
- lint
- tests
- build-debian-package
- upload-deb-to-heptapod
- release
- publish
```
......@@ -62,7 +70,7 @@
## Job customisation
If you want to modify a job in your project, you can override it.
If you want to modify a job in your project, you can override it.
For example, you need to change the `rule` condition of `image_build`.
This is your default `.gitlab-ci.yml`:
......
......@@ -27,3 +27,21 @@
--destination $CI_REGISTRY_IMAGE:latest
rules:
- if: '$CI_COMMIT_REF_NAME == "branch/default"'
image_build_tag:
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:$CI_COMMIT_TAG
rules:
- if: "$CI_MERGE_REQUEST_ID"
when: never
- if: "$CI_COMMIT_TAG"
when: on_success