Test deployment to vapor with dynamic commit message from git

This commit is contained in:
Dillon Ngo
2023-11-23 14:39:46 +08:00
parent d7f41b1828
commit 258c53dbdb
Vendored
+9 -3
View File
@@ -19,13 +19,19 @@ pipeline {
stages {
stage('Download source code from Git') {
steps {
scmVars = git(
git(
url: httpUrl,
credentialsId: 'gitlab-jenkins-localhost',
branch: 'dillon/34-jenkins-vapor'
)
commitHash = scmVars.GIT_COMMIT
echo commitHash
}
}
stage('Get Commit Message for Deployment') {
steps {
script {
env.GIT_COMMIT_MSG = sh (script: 'git log -1 --pretty=%B ${GIT_COMMIT}', returnStdout: true).trim()
}
}
}