mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 12:33:56 +00:00
Test deployment to vapor with dynamic commit message from git
This commit is contained in:
Vendored
+21
@@ -27,6 +27,16 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage('Get Last Commit Details') {
|
||||
steps {
|
||||
script{
|
||||
String gitCommitMessage = getCommitMessage()
|
||||
println("GIT CommitMessage: " + gitCommitMessage)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Get Commit Message for Deployment') {
|
||||
steps {
|
||||
script {
|
||||
@@ -56,3 +66,14 @@ pipeline {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@NonCPS
|
||||
String getCommitMessage(){
|
||||
commitMessage = " "
|
||||
for ( changeLogSet in currentBuild.changeSets){
|
||||
for (entry in changeLogSet.getItems()){
|
||||
commitMessage = entry.msg
|
||||
}
|
||||
}
|
||||
return commitMessage
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user