Update .gitlab-ci.yml file
This commit is contained in:
parent
64c772b2e1
commit
3986fc22eb
@ -66,15 +66,10 @@ Nexus Upload:
|
|||||||
image: registry.knecon.com/knecon/devops/build-image:latest
|
image: registry.knecon.com/knecon/devops/build-image:latest
|
||||||
script:
|
script:
|
||||||
- VERSION=$(cat Chart.yaml | grep "^version:" | sed 's/^version:\s\(.*\)$/\1/g')
|
- 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}' )
|
- 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
|
- 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 "FILE=$(echo $uploadFile)" >> variables.env
|
||||||
|
- echo "VERSION=$(echo $VERSION)" >> variables.env
|
||||||
artifacts:
|
artifacts:
|
||||||
reports:
|
reports:
|
||||||
dotenv: variables.env
|
dotenv: variables.env
|
||||||
@ -90,8 +85,8 @@ Helm-pre-release:
|
|||||||
script:
|
script:
|
||||||
- echo "Releasing version $VERSION"
|
- echo "Releasing version $VERSION"
|
||||||
release:
|
release:
|
||||||
tag_name: '$BUILDVERSION'
|
tag_name: '$VERSION'
|
||||||
description: '$BUILDVERSION'
|
description: '$VERSION'
|
||||||
ref: '$CI_COMMIT_SHA'
|
ref: '$CI_COMMIT_SHA'
|
||||||
assets:
|
assets:
|
||||||
links:
|
links:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user