Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gitlab-ci-templates
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
gitlab-ci-templates
Compare revisions
c61ac735670e3a0f2e61ed2606eb1e091cf6e451 to 89645cefaf74d1b86f18aa9fb20a4e36215cf083
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
open-source/gitlab-ci-templates
Select target project
No results found
89645cefaf74d1b86f18aa9fb20a4e36215cf083
Select Git revision
Swap
Target
open-source/gitlab-ci-templates
Select target project
open-source/gitlab-ci-templates
1 result
c61ac735670e3a0f2e61ed2606eb1e091cf6e451
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
feat: build docker image with specific tag
· afb3ed6d5b83
Noé Gaumont
authored
3 years ago
afb3ed6d5b83
docs(readme): update recommended jobs for cubes (no more debian)
· 89645cefaf74
Arthur Lutz
authored
3 years ago
89645cefaf74
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+15
-7
15 additions, 7 deletions
README.md
templates/build-docker-image.yml
+18
-0
18 additions, 0 deletions
templates/build-docker-image.yml
with
33 additions
and
7 deletions
README.md
View file @
89645cef
...
...
@@ -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`:
...
...
This diff is collapsed.
Click to expand it.
templates/build-docker-image.yml
View file @
89645cef
...
...
@@ -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
This diff is collapsed.
Click to expand it.