Update Jenkinsfile
This commit is contained in:
16
Jenkinsfile
vendored
16
Jenkinsfile
vendored
@@ -51,5 +51,21 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('commit version update') {
|
||||
steps {
|
||||
script {
|
||||
withCredentials([usernamePassword(credentialsId: 'gitlab-credentials', passwordVariable: 'PASS', usernameVariable: 'USER')]) {
|
||||
// git config here for the first time run
|
||||
sh 'git config --global user.email "jenkins@example.com"'
|
||||
sh 'git config --global user.name "jenkins"'
|
||||
|
||||
sh "git remote set-url origin https://${USER}:${PASS}@gitlab.com/nanuchi/java-maven-app.git"
|
||||
sh 'git add .'
|
||||
sh 'git commit -m "ci: version bump"'
|
||||
sh 'git push origin HEAD:jenkins-jobs'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user