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