From 9a9fbe264b71876fe27e9a1b2c1504d455144ff6 Mon Sep 17 00:00:00 2001 From: Dillon Ngo Date: Thu, 23 Nov 2023 16:00:22 +0800 Subject: [PATCH] Test deployment to vapor with dynamic commit message from git --- Jenkinsfile | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index f43f8248..e16ca026 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,17 +31,8 @@ pipeline { steps { script{ String gitCommitMessage = getCommitMessage() + env.GIT_COMMIT_MESSAGE = gitCommitMessage println("GIT CommitMessage: " + gitCommitMessage) - - } - } - } - - stage('Get Commit Message for Deployment') { - steps { - script { - sh 'echo $PATH' - env.GIT_COMMIT_MSG = sh (script: '/usr/bin/git log -1 --pretty=%B ${GIT_COMMIT}', returnStdout: true).trim() } } } @@ -60,7 +51,7 @@ pipeline { stage('Deploy') { steps { - sh 'vendor/bin/vapor deploy staging --message="Commit: ${GIT_COMMIT}"' + sh 'vendor/bin/vapor deploy staging --message="${env.GIT_COMMIT_MESSAGE}"' } }