diff --git a/Jenkinsfile b/Jenkinsfile index 2aba146de8..af616498ba 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,7 +4,7 @@ def PROTECTED_BRANCH def FROM_GIT def RUN_TESTS -before: { +pre: { switch (env.BRANCH_NAME) { case 'test': env.NODE_ENV = 'test' @@ -31,14 +31,17 @@ before: { // Uncomment to enable debugging // https://loopback.io/doc/en/lb3/Setting-debug-strings.html#debug-strings-reference //env.DEBUG = 'strong-remoting:shared-method' +} +pipeline { + stage('Setup') { + env.GIT_COMMIT_MSG = sh( + script: 'git log -1 --pretty=%B ${GIT_COMMIT}', + returnStdout: true + ).trim() - env.GIT_COMMIT_MSG = sh( - script: 'git log -1 --pretty=%B ${GIT_COMMIT}', - returnStdout: true - ).trim() - - setEnv() + setEnv() + } } pipeline {