Skip to content
Snippets Groups Projects
Commit 8a4c3343 authored by Nacho Barrientos's avatar Nacho Barrientos
Browse files

Stop performing a version existence check

registry.cern.ch/monit has been configured so all tags are immutable
hence this is not necessary anymore.
parent 009786dd
No related branches found
No related tags found
1 merge request!58Do not check if tag exists + use alpine/helm:3
...@@ -63,34 +63,8 @@ unittest: ...@@ -63,34 +63,8 @@ unittest:
script: script:
- helm unittest -f 'tests/**/*.yaml' . - helm unittest -f 'tests/**/*.yaml' .
version_test:
stage: test
rules:
- if: '$CI_COMMIT_TAG'
script: |
# Installing helm...
dnf install -y diffutils wget tar
wget https://get.helm.sh/helm-v3.15.3-linux-386.tar.gz
tar -zxvf helm-v3.15.3-linux-386.tar.gz
mv linux-386/helm /usr/local/bin/helm
rm helm-v3.15.3-linux-386.tar.gz
rm -rf linux-386
# Check if the tag already exists in harbor to avoid overrides.
if helm pull oci://registry.cern.ch/monit/cern-it-monitoring-kubernetes --version $CI_COMMIT_TAG; then
# Command was successful (exit code 0), so the tag exists
echo "The tag $TAG already exists in harbor. Please update it."
exit 1 # Exit with non-zero status to indicate tag exists
else
# Command failed (non-zero exit code), so the tag does not exist
echo "The tag $TAG does not exist in harbor. All ok..."
exit 0 # Exit with 0 status
fi
helm_deploy: helm_deploy:
stage: deploy stage: deploy
needs:
- version_test
rules: rules:
- if: '$CI_COMMIT_TAG' - if: '$CI_COMMIT_TAG'
script: | script: |
......
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