updated Jenkinsfile
nclazz/api-cli/pipeline/head There was a failure building this commit
Details
nclazz/api-cli/pipeline/head There was a failure building this commit
Details
parent
8984410317
commit
ba0d77f276
|
@ -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') {
|
||||||
|
|
Loading…
Reference in New Issue