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
09b2f79bc5
commit
cedbbe5464
|
@ -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()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -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"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue