updated Jenkinsfile
nclazz/api-cli/pipeline/head There was a failure building this commit Details

master
Niclas Thobaben 2021-07-07 16:36:09 +02:00
parent 0b07ee747f
commit ac7d4a4dd0
1 changed files with 7 additions and 1 deletions

8
Jenkinsfile vendored
View File

@ -13,13 +13,19 @@ pipeline {
NPM_REGISTRY : $env.NPM_REGISTRY
NPM_MAIL : $env.NPM_MAIL
BRANCH : $BRANCH_NAME
TAG : $TAG_NAME
"""
sh 'npm install'
sh('git remote set-url origin \$(echo $GIT_URL | sed -e "s^//^//$GIT_CREDENTIALS@^")')
}
}
stage('Set Version') {
when { branch 'master' }
when {
allOf {
expression { BRANCH_NAME == 'master' }
expression { !(TAG_NAME =~ /v*/) }
}
}
steps {
sh 'npm version patch -f'
sh 'git push origin HEAD:master --follow-tags --force'