diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 82591c1..5ac2d7e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -66,15 +66,10 @@ Nexus Upload: image: registry.knecon.com/knecon/devops/build-image:latest script: - VERSION=$(cat Chart.yaml | grep "^version:" | sed 's/^version:\s\(.*\)$/\1/g') - - tagList=$( git tag -l "${VERSION}-*" ) - - latestVersion="$( semver $(echo $tagList) | tail -n1)" - - BUILDVERSION="$( semver $latestVersion -p -i prerelease )" - - echo "BUILDVERSION=$(echo $BUILDVERSION)" >> variables.env - - |- - sed -s "s/^version:.*$/version: $BUILDVERSION/g" -i Chart.yaml - uploadFile=$( helm package . | awk 'NF>1{print q $NF}' ) - curl -s -u "${CI_NEXUS_USER}:${CI_NEXUS_PASSWORD}" "${CI_NEXUS_ADDRESS}:443/repository/red-dev/" --upload-file $uploadFile - echo "FILE=$(echo $uploadFile)" >> variables.env + - echo "VERSION=$(echo $VERSION)" >> variables.env artifacts: reports: dotenv: variables.env @@ -90,8 +85,8 @@ Helm-pre-release: script: - echo "Releasing version $VERSION" release: - tag_name: '$BUILDVERSION' - description: '$BUILDVERSION' + tag_name: '$VERSION' + description: '$VERSION' ref: '$CI_COMMIT_SHA' assets: links: