diff --git a/pipeline.groovy b/pipeline.groovy index a7a32c3..ff08875 100644 --- a/pipeline.groovy +++ b/pipeline.groovy @@ -45,13 +45,13 @@ pipeline { def jsonPayload = payload ? jsonSlurper.parseText(payload) : null payload ? { - WEBHOOK_SENDER_EMAIL= jsonPayload.sender.email : || currentBuild.getBuildCauses()[0].userId - WEBHOOK_SENDER_NAME=jsonPayload.sender.full_name || "Manually " + currentBuild.getBuildCauses()[0].shortDescription - WEBHOOK_SENDER_LOGIN=jsonPayload.sender.login || "N/A: Manual trigger" - COMMIT_HASH=jsonPayload.after || sh (script: "cd webhook-test && git log -n 1 --pretty=format:'%H'", returnStdout: true) - COMPARE_URL=jsonPayload.compare_url || "N/A: Manual trigger" - COMMIT_MSG=jsonPayload.head_commit.message || sh (script: "cd webhook-test && git log -n 1 --pretty=format:'%B'", returnStdout: true) - BRANCH_REF=jsonPayload.ref || "N/A: Manual trigger" + WEBHOOK_SENDER_EMAIL= jsonPayload.sender.email + WEBHOOK_SENDER_NAME=jsonPayload.sender.full_name + WEBHOOK_SENDER_LOGIN=jsonPayload.sender.login + COMMIT_HASH=jsonPayload.after + COMPARE_URL=jsonPayload.compare_url + COMMIT_MSG=jsonPayload.head_commit.message + BRANCH_REF=jsonPayload.ref } : { WEBHOOK_SENDER_EMAIL=currentBuild.getBuildCauses()[0].userId WEBHOOK_SENDER_NAME="Manually " + currentBuild.getBuildCauses()[0].shortDescription