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

master
Niclas Thobaben 2021-07-07 16:39:03 +02:00
parent ac7d4a4dd0
commit bdf68fa7bf
1 changed files with 3 additions and 2 deletions

5
Jenkinsfile vendored
View File

@ -5,6 +5,7 @@ pipeline {
NPM_CREDENTIALS = credentials('npm-publish')
GIT_CREDENTIALS = credentials('jenkins_git')
NPM_MAIL = 'info@nclazz.de'
TAG_NAME = sh(script: "git fetch --all --tags -q && git describe --tags --exact-match 2> /dev/null || echo ''", returnStdout: true).trim()
}
stages {
stage('Prepare') {
@ -12,8 +13,8 @@ pipeline {
echo """
NPM_REGISTRY : $env.NPM_REGISTRY
NPM_MAIL : $env.NPM_MAIL
BRANCH : $BRANCH_NAME
TAG : $TAG_NAME
BRANCH_NAME : $BRANCH_NAME
TAG_NAME : $TAG_NAME
"""
sh 'npm install'
sh('git remote set-url origin \$(echo $GIT_URL | sed -e "s^//^//$GIT_CREDENTIALS@^")')