mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-21 21:43:57 +00:00
Test deployment to vapor with dynamic commit message from git
This commit is contained in:
Vendored
+4
-12
@@ -19,21 +19,13 @@ pipeline {
|
||||
stages {
|
||||
stage('Download source code from Git') {
|
||||
steps {
|
||||
git(
|
||||
scmVars = git(
|
||||
url: httpUrl,
|
||||
credentialsId: 'gitlab-jenkins-localhost',
|
||||
branch: 'dillon/34-jenkins-vapor'
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
stage('Get Commit Message for Deployment') {
|
||||
steps {
|
||||
script {
|
||||
gitExecutable = tool 'Git'
|
||||
commit = sh(returnStdout: true, script: "${gitExecutable}/bin/git log -1 --oneline").trim()
|
||||
env.GIT_COMMIT_MSG = commit
|
||||
}
|
||||
commitHash = scmVars.GIT_COMMIT
|
||||
echo commitHash
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +43,7 @@ pipeline {
|
||||
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
sh 'vendor/bin/vapor deploy staging --message=${GIT_COMMIT_MSG}'
|
||||
sh 'vendor/bin/vapor deploy staging --message="Test Jenkins"'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user