diff --git a/Jenkinsfile b/Jenkinsfile index 7e3fdd25..e05862b0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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"' } }