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

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
  • swepy/cicd-templates/pypi-to-docker-missing-version
1 result
Show changes
Commits on Source (3)
[tool.bumpversion] [tool.bumpversion]
commit = true commit = true
current_version = "0.2.0" current_version = "0.2.1"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)" parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
replace = "{new_version}" replace = "{new_version}"
search = "{current_version}" search = "{current_version}"
......
...@@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -9,6 +9,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[![Pipeline](https://lab.frogg.it/swepy/cicd-templates/pypi-to-docker-missing-version/badges/trunk/pipeline.svg)](https://lab.frogg.it/swepy/cicd-templates/pypi-to-docker-missing-version/-/pipelines?ref=trunk) [![Pipeline](https://lab.frogg.it/swepy/cicd-templates/pypi-to-docker-missing-version/badges/trunk/pipeline.svg)](https://lab.frogg.it/swepy/cicd-templates/pypi-to-docker-missing-version/-/pipelines?ref=trunk)
## [0.2.1] - 2024-07-13
[![Pipeline](https://lab.frogg.it/swepy/cicd-templates/pypi-to-docker-missing-version/badges/0.2.1/pipeline.svg)](https://lab.frogg.it/swepy/cicd-templates/pypi-to-docker-missing-version/-/pipelines?ref=0.2.1)
### Fixed
* Job now exit 1 when there is no version to release
## [0.2.0] - 2024-06-26 ## [0.2.0] - 2024-06-26
[![Pipeline](https://lab.frogg.it/swepy/cicd-templates/pypi-to-docker-missing-version/badges/0.2.0/pipeline.svg)](https://lab.frogg.it/swepy/cicd-templates/pypi-to-docker-missing-version/-/pipelines?ref=0.2.0) [![Pipeline](https://lab.frogg.it/swepy/cicd-templates/pypi-to-docker-missing-version/badges/0.2.0/pipeline.svg)](https://lab.frogg.it/swepy/cicd-templates/pypi-to-docker-missing-version/-/pipelines?ref=0.2.0)
......
# PyPI to Docker missing version # PyPI to Docker missing version
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://lab.frogg.it/swepy/cicd-templates/pypi-to-docker-missing-version/-/blob/main/LICENSE) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://lab.frogg.it/swepy/cicd-templates/pypi-to-docker-missing-version/-/blob/main/LICENSE)
[![Pipeline](https://lab.frogg.it/swepy/cicd-templates/pypi-to-docker-missing-version/badges/0.2.0/pipeline.svg)](https://lab.frogg.it/swepy/cicd-templates/pypi-to-docker-missing-version/-/pipelines?ref=0.2.0) [![Pipeline](https://lab.frogg.it/swepy/cicd-templates/pypi-to-docker-missing-version/badges/0.2.1/pipeline.svg)](https://lab.frogg.it/swepy/cicd-templates/pypi-to-docker-missing-version/-/pipelines?ref=0.2.1)
## Objective ## Objective
...@@ -20,7 +20,7 @@ As a remote Template (recommended): ...@@ -20,7 +20,7 @@ As a remote Template (recommended):
```yaml ```yaml
include: include:
- remote: 'https://gitlab.com/swepy/cicd-templates/pypi-to-docker-missing-version/-/raw/0.2.0/templates/pypi-to-docker-missing-version.yml' - remote: 'https://gitlab.com/swepy/cicd-templates/pypi-to-docker-missing-version/-/raw/0.2.1/templates/pypi-to-docker-missing-version.yml'
``` ```
As a local Template (if the template is local to the instance): As a local Template (if the template is local to the instance):
...@@ -28,7 +28,7 @@ As a local Template (if the template is local to the instance): ...@@ -28,7 +28,7 @@ As a local Template (if the template is local to the instance):
```yaml ```yaml
include: include:
- project: 'swepy/cicd-templates/pypi-to-docker-missing-version' - project: 'swepy/cicd-templates/pypi-to-docker-missing-version'
ref: '0.2.0' ref: '0.2.1'
file: 'templates/pypi-to-docker-missing-version.yml' file: 'templates/pypi-to-docker-missing-version.yml'
``` ```
...@@ -37,7 +37,7 @@ component is local to the instance): ...@@ -37,7 +37,7 @@ component is local to the instance):
```yaml ```yaml
include: include:
- component: $CI_SERVER_FQDN/swepy/cicd-templates/pypi-to-docker-missing-version/pypi-to-docker-missing-version@0.2.0 - component: $CI_SERVER_FQDN/swepy/cicd-templates/pypi-to-docker-missing-version/pypi-to-docker-missing-version@0.2.1
``` ```
### Customize job ### Customize job
......
...@@ -19,15 +19,15 @@ pypi-to-docker-missing-version: ...@@ -19,15 +19,15 @@ pypi-to-docker-missing-version:
# get all tags # get all tags
- while [ -n "$docker_url" ]; do - while [ -n "$docker_url" ]; do
- docker_response=$(curl -s "$docker_url") - docker_response=$(curl -s "$docker_url")
- if [ "$(echo "$docker_response" | jq -r '.results | length')" -eq 0 ]; then - if [ "$(echo "$docker_response" | jq -r '.results | length')" -eq 0 ]; then
- break - break
- fi - fi
- TAGS="$TAGS $(echo "$docker_response" | jq -r '.results[].name')" - TAGS="$TAGS $(echo "$docker_response" | jq -r '.results[].name')"
- docker_url=$(echo "$docker_response" | jq -r '.next') - docker_url=$(echo "$docker_response" | jq -r '.next')
- if [ "$docker_url" = "null" ]; then - if [ "$docker_url" = "null" ]; then
- docker_url="" - docker_url=""
- fi - fi
- done - done
- echo "tags on docker=$TAGS" - echo "tags on docker=$TAGS"
...@@ -45,9 +45,6 @@ pypi-to-docker-missing-version: ...@@ -45,9 +45,6 @@ pypi-to-docker-missing-version:
- missing_releases=$(echo $missing_releases) - missing_releases=$(echo $missing_releases)
- echo "missing tags=$missing_releases" - echo "missing tags=$missing_releases"
# regex pattern for versioning (adjust if needed)
# sorted_releases=$(printf "%s\n" $missing_releases | grep -E "$regex" | sort -t. -k1,1n -k2,2n -k3,3n)
# templated version is simpler
- sorted_releases=$(printf "%s\n" $missing_releases | $SORT_CMD) - sorted_releases=$(printf "%s\n" $missing_releases | $SORT_CMD)
# print the sorted versions # print the sorted versions
...@@ -59,6 +56,12 @@ pypi-to-docker-missing-version: ...@@ -59,6 +56,12 @@ pypi-to-docker-missing-version:
- echo "$version_to_publish" > version.txt - echo "$version_to_publish" > version.txt
- cat version.txt - cat version.txt
- if [ -n "$version_to_publish" ]; then
- exit 0
- else
- exit 1
- fi
artifacts: artifacts:
name: "version" name: "version"
paths: paths:
......