update credential
This commit is contained in:
@@ -25,6 +25,12 @@ pipeline {
|
||||
stage('Increase Version') {
|
||||
steps {
|
||||
script {
|
||||
// Set Git identity before running npm version
|
||||
sh '''
|
||||
git config user.email "jenkins@yourdomain.com"
|
||||
git config user.name "Jenkins"
|
||||
'''
|
||||
|
||||
def currentVersion = sh(script: "node -p \"require('./package.json').version\"", returnStdout: true).trim()
|
||||
if (!currentVersion) {
|
||||
error "Unable to retrieve current version from package.json."
|
||||
|
||||
Reference in New Issue
Block a user