Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 74635fff authored by Karine Bauch's avatar Karine Bauch
Browse files

Update component style

parent a1f378cd
No related branches found
No related tags found
2 merge requests!4Version with podman,!3Update template with Podman instead of Kaniko
Pipeline #63683 passed
...@@ -13,11 +13,20 @@ tag = false ...@@ -13,11 +13,20 @@ tag = false
filename = "CHANGELOG.md" filename = "CHANGELOG.md"
replace = """## [Unreleased] replace = """## [Unreleased]
[![Pipeline](https://lab.frogg.it/swepy/cicd-templates/docker-build/badges/trunk/pipeline.svg)](https://lab.frogg.it/swepy/cicd-templates/docker-build/-/pipelines)
## [{new_version}] - {now:%Y-%m-%d} ## [{new_version}] - {now:%Y-%m-%d}
[![Pipeline](https://lab.frogg.it/swepy/cicd-templates/docker-build/badges/{new_version}/pipeline.svg)](https://lab.frogg.it/swepy/cicd-templates/docker-build/-/pipelines)
""" """
search = """## [Unreleased] search = """## [Unreleased]
[![Pipeline](https://lab.frogg.it/swepy/cicd-templates/docker-build/badges/trunk/pipeline.svg)](https://lab.frogg.it/swepy/cicd-templates/docker-build/-/pipelines)
""" """
[[tool.bumpversion.files]] [[tool.bumpversion.files]]
allow-dirty = true allow-dirty = true
filename = "README.md" filename = "README.md"
[[tool.bumpversion.files]]
filename = "docs/gitlab.md"
...@@ -4,8 +4,7 @@ include: ...@@ -4,8 +4,7 @@ include:
ref: '$CI_COMMIT_SHA' ref: '$CI_COMMIT_SHA'
file: 'templates/docker-build.yml' file: 'templates/docker-build.yml'
inputs: inputs:
context_path: ./test context_path: test
test_image: test_image:
image: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA image: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
......
...@@ -7,8 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -7,8 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
[![Pipeline](https://lab.frogg.it/swepy/cicd-templates/docker-build/badges/trunk/pipeline.svg)](https://lab.frogg.it/swepy/cicd-templates/docker-build/-/pipelines)
### Changed
* Replace Kaniko by Podman
* Inputs:
* kaniko_options -> podman_options
* kaniko_tag -> podman_tag
* Variables:
* KANIKO_OPTIONS -> PODMAN_OPTIONS
* KANIKO_TAG -> PODMAN_TAG
### Removed
* Inputs:
* docker_host
* docker_driver
* Variables:
* DOCKER_HOST
* DOCKER_DRIVER
## [0.3.0] - 2025-03-01 ## [0.3.0] - 2025-03-01
[![Pipeline](https://lab.frogg.it/swepy/cicd-templates/docker-build/badges/trunk/pipeline.svg)](https://lab.frogg.it/swepy/cicd-templates/docker-build/-/pipelines)
### Added ### Added
* Support [inputs](https://docs.gitlab.com/ci/yaml/inputs/): * Support [inputs](https://docs.gitlab.com/ci/yaml/inputs/):
...@@ -32,10 +55,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -32,10 +55,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.2.1] - 2024-07-16 ## [0.2.1] - 2024-07-16
[![Pipeline](https://lab.frogg.it/swepy/cicd-templates/docker-build/badges/trunk/pipeline.svg)](https://lab.frogg.it/swepy/cicd-templates/docker-build/-/pipelines)
* Update CICD * Update CICD
## [0.2.0] - 2024-06-24 ## [0.2.0] - 2024-06-24
[![Pipeline](https://lab.frogg.it/swepy/cicd-templates/docker-build/badges/trunk/pipeline.svg)](https://lab.frogg.it/swepy/cicd-templates/docker-build/-/pipelines)
### Added ### Added
* a new variable to inject kaniko's options to the command: `KANIKO_OPTIONS` * a new variable to inject kaniko's options to the command: `KANIKO_OPTIONS`
...@@ -51,10 +78,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -51,10 +78,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.1.1] - 2024-06-01 ## [0.1.1] - 2024-06-01
[![Pipeline](https://lab.frogg.it/swepy/cicd-templates/docker-build/badges/trunk/pipeline.svg)](https://lab.frogg.it/swepy/cicd-templates/docker-build/-/pipelines)
### Fixed ### Fixed
* Fixed link to the template in documentation README.md * Fixed link to the template in documentation README.md
## [0.1.0] - 2024-06-01 ## [0.1.0] - 2024-06-01
[![Pipeline](https://lab.frogg.it/swepy/cicd-templates/docker-build/badges/trunk/pipeline.svg)](https://lab.frogg.it/swepy/cicd-templates/docker-build/-/pipelines)
* Initial version * Initial version
...@@ -20,37 +20,4 @@ include: ...@@ -20,37 +20,4 @@ include:
[![Supported by GitLab.com](https://img.shields.io/badge/Supported_by-GitLab.com-orange)](https://gitlab.com) [![Supported by GitLab.com](https://img.shields.io/badge/Supported_by-GitLab.com-orange)](https://gitlab.com)
[![Supported by Frogg.it](https://img.shields.io/badge/Supported_by-Frogg.it-green)](https://froggit.fr/) [![Supported by Frogg.it](https://img.shields.io/badge/Supported_by-Frogg.it-green)](https://froggit.fr/)
### Inputs See more for GitLab here: [docs/gitlab.md](docs/gitlab.md).
You can customize the job by overriding specific inputs.
| Name | Description | Default |
|-------------------|----------------------------------------------------------|-------------------------------------|
| `stage` | Stage of the job. | `build` |
| `image_id` | Image name and tag of the built image. | `$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA` |
| `context_path` | Path to the build context, usually the project. | `.` |
| `dockerfile_name` | Name of the dockerfile. | `Dockerfile` |
| `podman_options` | Additional options to pass to Podman for image building. | `""` |
| `podman_tag` | Version tag of the Podman image. | `stable` |
For example:
```yml
include:
- component: $CI_SERVER_FQDN/swepy/cicd-templates/docker-build/docker-build@0.3.0
inputs:
stage: docker_build
context_path: ./project
```
## Variables
You can customize the job by overriding the following variables:
| Name | Description | Default |
|-------------------|----------------------------------------------------------|---------------------------------|
| `IMAGE_ID` | Image name and tag of the built image. | `$[[ inputs.image_id ]]` |
| `CONTEXT_PATH` | Path to the build context, usually the project. | `$[[ inputs.context_path ]]` |
| `DOCKERFILE_NAME` | Name of the dockerfile. | `$[[ inputs.dockerfile_name ]]` |
| `PODMAN_OPTIONS` | Additional options to pass to Podman for image building. | `$[[ inputs.podman_options ]]` |
| `PODMAN_TAG` | Version tag of the Podman image. | `$[[ inputs.podman_tag ]]` |
# GitLab guidelines
## Include the component
Include the job as a Component if it is supported
or [mirrored](https://docs.gitlab.com/ee/user/project/repository/mirror/pull.html) by
your instance.
Add the following to your `.gitlab-ci.yml` file:
```yaml
include:
- component: $CI_SERVER_FQDN/swepy/cicd-templates/docker-build/docker-build@0.3.0
```
[![Supported by GitLab.com](https://img.shields.io/badge/Supported_by-GitLab.com-orange)](https://gitlab.com)
[![Supported by Frogg.it](https://img.shields.io/badge/Supported_by-Frogg.it-green)](https://froggit.fr/)
### Inputs
You can customize the job by overriding specific inputs.
| Name | Description | Default |
|-------------------|----------------------------------------------------------|-------------------------------------|
| `stage` | Stage of the job. | `build` |
| `image_id` | Image name and tag of the built image. | `$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA` |
| `context_path` | Path to the build context, usually the project. | `.` |
| `dockerfile_name` | Name of the dockerfile. | `Dockerfile` |
| `podman_options` | Additional options to pass to Podman for image building. | `""` |
| `podman_tag` | Version tag of the Podman image. | `stable` |
For example:
```yml
include:
- component: $CI_SERVER_FQDN/swepy/cicd-templates/docker-build/docker-build@0.3.0
inputs:
stage: docker_build
context_path: ./project
```
## Customize with variables
You can customize the job by overriding the following variables:
| Name | Description | Default |
|-------------------|----------------------------------------------------------|---------------------------------|
| `IMAGE_ID` | Image name and tag of the built image. | `$[[ inputs.image_id ]]` |
| `CONTEXT_PATH` | Path to the build context, usually the project. | `$[[ inputs.context_path ]]` |
| `DOCKERFILE_NAME` | Name of the dockerfile. | `$[[ inputs.dockerfile_name ]]` |
| `PODMAN_OPTIONS` | Additional options to pass to Podman for image building. | `$[[ inputs.podman_options ]]` |
| `PODMAN_TAG` | Version tag of the Podman image. | `$[[ inputs.podman_tag ]]` |
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment