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

master
Niclas Thobaben 2021-07-07 16:24:00 +02:00
parent 8984410317
commit ba0d77f276
1 changed files with 3 additions and 2 deletions

5
Jenkinsfile vendored
View File

@ -3,6 +3,7 @@ pipeline {
environment {
NPM_REGISTRY = 'https://nexus.nclazz.de/repository/npm_releases'
NPM_CREDENTIALS = credentials('npm-publish')
GIT_CREDENTIALS = credentials('jenkins_git')
NPM_MAIL = 'info@nclazz.de'
}
stages {
@ -14,14 +15,14 @@ pipeline {
BRANCH : $BRANCH_NAME
"""
sh 'npm install'
sh 'git status'
sh('git remote set-url origin \$(echo $GIT_URL | sed -e "s^//^//$GIT_CREDENTIALS@^")')
}
}
stage('Set Version') {
when { branch 'master' }
steps {
sh 'npm version patch -f'
sh 'git push'
sh 'git push origin HEAD:develop --follow-tags --force'
}
}
stage('Deploy') {