diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 88b6c64f86f172d30cf9ea5aef3a02011a0f2e92..4d6977863d2c18de868e6c06c2993f525b216a9b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -63,34 +63,8 @@ unittest: script: - 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: stage: deploy - needs: - - version_test rules: - if: '$CI_COMMIT_TAG' script: |