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

master
Niclas Thobaben 2021-07-07 15:55:07 +02:00
parent 09b2f79bc5
commit cedbbe5464
3 changed files with 5081 additions and 6 deletions

17
Jenkinsfile vendored
View File

@ -8,13 +8,13 @@ pipeline {
stages { stages {
stage('Prepare') { stage('Prepare') {
steps { steps {
echo ''' echo """
NPM_REGISTRY : $NPM_REGISTRY NPM_REGISTRY : $env.NPM_REGISTRY
NPM_MAIL : $NPM_MAIL NPM_MAIL : $env.NPM_MAIL
BRANCH : $BRANCH_NAME BRANCH : $BRANCH_NAME
TAG: : $TAG_NAME TAG: : $TAG_NAME
''' """
sh 'npm install -g npm-cli-login' sh 'npm install'
} }
} }
stage('Set Version') { stage('Set Version') {
@ -27,10 +27,15 @@ pipeline {
stage('Deploy') { stage('Deploy') {
steps { steps {
when { tag 'v*' } when { tag 'v*' }
sh 'npm-cli-login -u $NPM_CREDENTIALS_USR -p $NPM_CREDENTIALS_PSW -e $NPM_MAIL -r $NPM_REGISTRY' sh 'npx npm-cli-login -u $NPM_CREDENTIALS_USR -p $NPM_CREDENTIALS_PSW -e $NPM_MAIL -r $NPM_REGISTRY'
sh 'npm publish' sh 'npm publish'
sh 'npm logout --registry=$NPM_REGISTRY' sh 'npm logout --registry=$NPM_REGISTRY'
} }
} }
} }
post {
always {
cleanWs()
}
}
} }

5069
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -17,6 +17,7 @@
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"args-parser": "^1.2.0", "args-parser": "^1.2.0",
"npm-cli-login": "^0.1.1",
"object-path": "^0.11.5", "object-path": "^0.11.5",
"readline": "^1.3.0" "readline": "^1.3.0"
} }