Skip to content
Snippets Groups Projects
Commit 88bee584 authored by michael.minelli's avatar michael.minelli
Browse files

Merge branch 'fix-clean-package-ci-cd' into v3.4.0

parents c1ad2a6b 18b07b15
No related branches found
No related tags found
No related merge requests found
......@@ -127,10 +127,10 @@
.clean_packages:
script:
# Get all packages of the project
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" "${GITLAB_API_PROJECT_URL}/packages" > gitlabPackages.json'
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" "${GITLAB_API_PROJECT_URL}/packages?sort=desc&package_version=${VERSION}" > gitlabPackages.json'
# Filter and select packages to delete (based on version)
- packagesToDelete=`jq -r '.[] | select(.version=="'${VERSION}'") | ._links.delete_api_path' gitlabPackages.json`
- packagesToDelete=`jq -r '.[] | ._links.delete_api_path' gitlabPackages.json`
# Delete packages by calling Gitlab API
- >
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment