Update pipeline

This commit is contained in:
Anh Nguyen 2023-09-18 17:08:02 -04:00
parent 37bb917fde
commit f1d32f241c

View File

@ -8,7 +8,11 @@ pipeline {
UNIT_TEST_STAGE_STATUS = "FAIL" UNIT_TEST_STAGE_STATUS = "FAIL"
PYPI_STAGE_STATUS = "FAIL" PYPI_STAGE_STATUS = "FAIL"
AUTO_DOC_STAGE_STATUS = "FAIL" AUTO_DOC_STAGE_STATUS = "FAIL"
MAINTAINERS = "anhhoang.nguyen@concordia.ca" WEBHOOK_SENDER_EMAIL = ""
WEBHOOK_SENDER_NAME = ""
WEBHOOK_SENDER_LOGIN = ""
COMMIT_HASH = ""
COMPARE_URL = ""
} }
stages { stages {
@ -35,7 +39,11 @@ pipeline {
def jsonSlurper = new groovy.json.JsonSlurper() def jsonSlurper = new groovy.json.JsonSlurper()
def jsonPayload = jsonSlurper.parseText(payload) def jsonPayload = jsonSlurper.parseText(payload)
echo jsonPayload.sender.login + " " + jsonPayload.sender.email + " " + jsonPayload.sender.name WEBHOOK_SENDER_EMAIL=jsonPayload.sender.email
WEBHOOK_SENDER_NAME=jsonPayload.sender.name
WEBHOOK_SENDER_LOGIN=jsonPayload.sender.login
COMMIT_HASH=jsonPayload.after
COMPARE_URL=jsonPayload.compare_url
} }
} }
} }
@ -63,10 +71,10 @@ pipeline {
body: """ body: """
Results of Hub/release Pipeline ${env.BUILD_TAG} Results of Hub/release Pipeline ${env.BUILD_TAG}
Build triggered by: "${jsonPayload.sender.name} - ${jsonPayload.sender.login}" Build triggered by: "${WEBHOOK_SENDER_NAME} - ${WEBHOOK_SENDER_LOGIN}"
Commit hash: "${jsonPayload.after}" Commit hash: "${COMMIT_HASH}"
See changes: "${jsonPayload.compare_url}" See changes: "${COMPARE_URL}"
Email: "${jsonPayload.sender.email}" Email: "${WEBHOOK_SENDER_EMAIL}"
Clone Stage: ${CLONE_STAGE_STATUS} Clone Stage: ${CLONE_STAGE_STATUS}
Generate Build Information Stage: ${GENERATE_BUILD_INFORMATION_STAGE_STATUS} Generate Build Information Stage: ${GENERATE_BUILD_INFORMATION_STAGE_STATUS}