1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-11-28 08:49:44 +02:00

commit hash used for status api was wrong

TRAVIS_COMMIT is the merge commit between base branch and PR HEAD, but here we need the
commit hash of the PR HEAD.
This commit is contained in:
Marcus Holl 2019-02-27 16:59:07 +01:00
parent 18cb767cee
commit 2d583b1af4

View File

@ -3,7 +3,7 @@
curl -X POST \
--data "{\"state\": \"pending\", \"target_url\": \"${TRAVIS_BUILD_WEB_URL}\", \"description\": \"Integration tests pending.\", \"context\": \"integration-tests\"}" \
--user "${INTEGRATION_TEST_VOTING_USER}:${INTEGRATION_TEST_VOTING_TOKEN}" \
"https://api.github.com/repos/SAP/jenkins-library/statuses/${TRAVIS_COMMIT}"
"https://api.github.com/repos/SAP/jenkins-library/statuses/${TRAVIS_PULL_REQUEST_SHA}"
WORKSPACES_ROOT=workspaces
[ -e "${WORKSPACES_ROOT}" ] && rm -rf ${WORKSPACES_ROOT}
@ -89,7 +89,7 @@ echo "[INFO] Integration tests succeeded."
curl -X POST \
--data "{\"state\": \"${STATUS_STATE}\", \"target_url\": \"${TRAVIS_BUILD_WEB_URL}\", \"description\": \"${STATUS_DESCRIPTION}\", \"context\": \"integration-tests\"}" \
--user "${INTEGRATION_TEST_VOTING_USER}:${INTEGRATION_TEST_VOTING_TOKEN}" \
"https://api.github.com/repos/SAP/jenkins-library/statuses/${TRAVIS_COMMIT}"
"https://api.github.com/repos/SAP/jenkins-library/statuses/${TRAVIS_PULL_REQUEST_SHA}"
if [ "${failure}" == "true" ]
then