Skip to content

Commit 0fe0ba8

Browse files
committed
Merge branch '2.12.x' into 2.13.x
2 parents 41cc2df + f28d1cf commit 0fe0ba8

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ env:
3737
# AWS_SECRET_ACCESS_KEY
3838
- secure: "dv0pR9uqnLyKVHu1L1nvl5TVpo3bOxh4icLNybwFyCFQd9XiM/RU8Vhx3svZqqnAG+GiCDSiCaBQkTLUS5u9e+9eVw3cUj5meNr9EW673f8D6H8Tr433jlvu54CynD9DsBjhNo/xIrECOKTq+0wu480OLSjOkuNoclG2dSm4Dis="
3939
# GITHUB_OAUTH_TOKEN (for GitHub user scala-jenkins, same token as scabot)
40-
- secure: "Bk0IRAPGF9ZjQZQRe618KgXG2VLXRcJgJN7dvomxFdjZOqn/46TrFa6RlLLmicu9F4UrbgpSazfDgr7S8qER6GIyr+hDpv/sdi//EcYql2A0ww2r5QPaA9gW4wiTO8Cy0m/ZsK8IAjvOcdDXW19JH7b0HygDAnJOBiOR9S9wWuI="
40+
- secure: "KetupmuH5L7nJjouavdPpvuc7imL9T01zI/OdTYhzOmuTSHV8tP6TVykRcVl73ZBkEre+Es7TYw46HjlhTqGtj//6V+8XCNZ4hIt1IYEA2v+IBmIBCtuVnZdlY09/DqM8vxZjhnLFhjQlTvkCZdzc1lfzN1AVtceUvKqJpnzGS0="
4141
script:
4242
- source scripts/common
4343
- postCommitStatus "pending"

scripts/common

+7-2
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,21 @@ function postCommitStatus() {
1515
if [[ "$scala_sha" != "" ]]; then
1616
local jsonTemplate='{ "state": "%s", "target_url": "%s", "description": "%s", "context": "%s"}'
1717
local json=$(printf "$jsonTemplate" "$1" "https://travis-ci.com/scala/scala-dist/builds/$TRAVIS_BUILD_ID" "$1" "travis/scala-dist/$version/$mode")
18+
[[ -z "$GITHUB_OAUTH_TOKEN" ]] && (echo "Missing environment variable GITHUB_OAUTH_TOKEN!"; exit 1)
19+
TMPFILE=$(mktemp -t curl.XXXXXXXXXX)
20+
21+
local tmpfile=$(mktemp -t curl.XXXXXXXXXX) || exit 1
1822

1923
local curlStatus=$(curl \
20-
-s -o /dev/null -w "%{http_code}" \
24+
-s -o $tmpfile -w "%{http_code}" \
2125
-H "Accept: application/vnd.github.v3+json" \
2226
-H "Authorization: token $GITHUB_OAUTH_TOKEN" \
2327
-d "$json" \
2428
https://api.github.com/repos/scala/scala/statuses/$scala_sha)
2529

2630
[[ "$curlStatus" == "201" ]] || {
27-
echo "Failed to publish GitHub commit status"
31+
echo "Failed to publish GitHub commit status. Got: $curlStatus"
32+
cat $tmpfile
2833
exit 1
2934
}
3035
fi

0 commit comments

Comments
 (0)