Retrieve all versions of multiple jobs and create release for each entry inside their`CHANGELOG.md` files
Retrieve all job templates from a repository and create GitLab release (and git tag) for each versions listed in`CHANGELOG.md`
## How to use it
@@ -11,42 +11,38 @@ Retrieve all versions of multiple jobs and create release for each entry inside
behavior, check the [variables section](#variables)
1. Well done, your job is ready to work and will be execute on your main branch ! 😀
## Behavior
By default, this job will be run on the `jobs` directory located at the root of your project and will create releases for each directory containing jobs files.
## Jobs files
Here's the structure of a job files :
**Here's the example structure of a job template folder:**
```
jobs
|
job_name
|
CHANGELOG.md
job_name.yml
README.md
|
job_name
|
CHANGELOG.md
job_name.yml
README.md
docker_build/
├── README.md
├── CHANGELOG.md
└── docker_build.yaml (containing a job named docker_build )
```
A `CHANGELOG.md` is required to create the releases
- The structure of the `CHANGELOG.md` is based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) structure.
- You could also checkout the [R2Devops documentation](https://docs.r2devops.io/job-structure/#job-changelogs) about it
A `CHANGELOG.md` is require for creating git tags release.
The structure of the `CHANGELOG.md` is based on [keepachangelog](https://keepachangelog.com/en/1.0.0/) structure.
You could also checkout the [R2Devops documentation](https://docs.r2devops.io/job-structure/#job-changelogs) about it
Here's an example of a `CHANGELOG.md` :
**Here's an example of a `CHANGELOG.md`:**
```
# Changelog
All notable changes to this job will be documented in this file.
## [0.1.0] - 2022-10-14
## [1.1.0] - 2021-06-21
* Allows context different from root with new variable `DOCKER_CONTEXT_PATH`
## [1.0.0] - 2021-05-07
* Breaking change in the configuration of custom registry, see documentation
* Add support to push in multiple registries
* Add support to authentication in multiple registries
## [0.3.0] - 2020-11-25
* New variable `DOCKER_USE_CACHE` to be able to cache layers of build
* New variable `DOCKER_OPTIONS` to be able to add additional options
## [0.1.0] - 2020-10-21
* Initial version
```
@@ -54,10 +50,10 @@ All notable changes to this job will be documented in this file.
| Name | Description | Default |
| ---- | ----------- | ------- |
| `JOBS_DIRECTORY`<imgwidth=100/>| The directory containing the jobs folders | `jobs`<imgwidth=100/>|
| `JOBS_DIRECTORY` | The root directory containing the job folders | `.`|
| `IMAGE_TAG` | The default tag for the docker image [alpine/httpie](https://hub.docker.com/r/alpine/httpie) | `3.2.1` |
| `GITLAB_API_URL` | The url used to call the GitLab API. ⚠️ It should be changed if you using a self-hosted version | `gitlab.com` |
| `GITLAB_API_URL` | The domain of GitLab instance. ⚠️ It should be changed if you using a self-hosted version | `gitlab.com` |
| `CHANGELOG_FILE` | The name of changelog files (case insensitive) | `CHANGELOG.md` |
## Author
This resource is an **[official job](https://docs.r2devops.io/faq-labels/)** added in [**R2Devops repository**](https://gitlab.com/r2devops/hub) by [@Totara-thib](https://gitlab.com/Totara-thib)