Guard version env defaults in pipeline
This commit is contained in:
parent
ab8f57583a
commit
9664863c40
6
Jenkinsfile
vendored
6
Jenkinsfile
vendored
@ -64,8 +64,8 @@ spec:
|
||||
REGISTRY = 'registry.bstein.dev/bstein'
|
||||
FRONT_IMAGE = "${REGISTRY}/bstein-dev-home-frontend"
|
||||
BACK_IMAGE = "${REGISTRY}/bstein-dev-home-backend"
|
||||
VERSION_TAG = ''
|
||||
SEMVER = ''
|
||||
VERSION_TAG = 'dev'
|
||||
SEMVER = 'dev'
|
||||
}
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
@ -113,7 +113,7 @@ spec:
|
||||
echo "SEMVER=${SEMVER}" > build.env
|
||||
'''
|
||||
def props = readProperties file: 'build.env'
|
||||
env.SEMVER = props['SEMVER']
|
||||
env.SEMVER = props['SEMVER'] ?: "0.1.0-${env.BUILD_NUMBER}"
|
||||
env.VERSION_TAG = env.SEMVER
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user