Jenkinsfile fixes

This commit is contained in:
Juan Ferrer 2019-01-11 15:36:04 +01:00
parent 69f822df70
commit aa74f8ce6a
1 changed files with 4 additions and 8 deletions

12
Jenkinsfile vendored
View File

@ -13,6 +13,10 @@ pipeline {
steps { steps {
script { script {
env.COMPOSE_PROJECT_NAME = env.JOB_NAME.replace('/', '-'); env.COMPOSE_PROJECT_NAME = env.JOB_NAME.replace('/', '-');
env.GIT_COMMITTER_EMAIL = sh(
script: "git --no-pager show -s --format='%ae'",
returnStdout: true
).trim()
switch (env.BRANCH_NAME) { switch (env.BRANCH_NAME) {
case 'master': case 'master':
@ -34,14 +38,6 @@ pipeline {
break; break;
} }
} }
checkout scm
script {
env.GIT_COMMITTER_EMAIL = sh(
script: "git --no-pager show -s --format='%ae'",
returnStdout: true
).trim()
}
echo "Committer: ${env.GIT_COMMITTER_EMAIL}" echo "Committer: ${env.GIT_COMMITTER_EMAIL}"
} }
} }