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 1156dbb9 authored by Dorian Turba's avatar Dorian Turba
Browse files

Merge branch 'trunk'

parents 781fd039 3c796e9d
No related branches found
Tags 0.2.1
No related merge requests found
Pipeline #39522 passed
[tool.bumpversion]
commit = true
current_version = "0.2.0"
current_version = "0.2.1"
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
replace = "{new_version}"
search = "{current_version}"
......
......@@ -10,4 +10,4 @@ pypi-to-docker-missing-version:
stage: test
variables:
PACKAGE_NAME: ruff
IMAGE_NAME: swepy/ruff
IMAGE_NAME: dorianturba/ruff
......@@ -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)
## [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
[![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
[![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
......@@ -20,7 +20,7 @@ As a remote Template (recommended):
```yaml
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):
......@@ -28,7 +28,7 @@ As a local Template (if the template is local to the instance):
```yaml
include:
- 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'
```
......@@ -37,7 +37,7 @@ component is local to the instance):
```yaml
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
......
......@@ -19,15 +19,15 @@ pypi-to-docker-missing-version:
# get all tags
- while [ -n "$docker_url" ]; do
- docker_response=$(curl -s "$docker_url")
- if [ "$(echo "$docker_response" | jq -r '.results | length')" -eq 0 ]; then
- break
- fi
- TAGS="$TAGS $(echo "$docker_response" | jq -r '.results[].name')"
- docker_url=$(echo "$docker_response" | jq -r '.next')
- if [ "$docker_url" = "null" ]; then
- docker_url=""
- fi
- docker_response=$(curl -s "$docker_url")
- if [ "$(echo "$docker_response" | jq -r '.results | length')" -eq 0 ]; then
- break
- fi
- TAGS="$TAGS $(echo "$docker_response" | jq -r '.results[].name')"
- docker_url=$(echo "$docker_response" | jq -r '.next')
- if [ "$docker_url" = "null" ]; then
- docker_url=""
- fi
- done
- echo "tags on docker=$TAGS"
......@@ -45,9 +45,6 @@ pypi-to-docker-missing-version:
- missing_releases=$(echo $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)
# print the sorted versions
......@@ -59,6 +56,12 @@ pypi-to-docker-missing-version:
- echo "$version_to_publish" > version.txt
- cat version.txt
- if [ -n "$version_to_publish" ]; then
- exit 0
- else
- exit 1
- fi
artifacts:
name: "version"
paths:
......
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