Skip to content

Commit

Permalink
The PR field is actually the commit field
Browse files Browse the repository at this point in the history
  • Loading branch information
tstromberg committed Nov 12, 2019
1 parent f69498c commit 5efde8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
8 changes: 3 additions & 5 deletions hack/jenkins/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,9 @@ if [[ "${MINIKUBE_LOCATION}" == "master" ]]; then
exit $result
fi

set -x

# retry_github_status provides reliable github status updates
function retry_github_status() {
local pr=$1
local commit=$1
local context=$2
local state=$3
local token=$4
Expand All @@ -311,7 +309,7 @@ function retry_github_status() {
while [[ "${attempt}" -lt 8 ]]; do
local out=$(mktemp)
code=$(curl -o "${out}" -s --write-out "%{http_code}" -L \
"https://api.github.com/repos/kubernetes/minikube/statuses/${pr}?access_token=${token}" \
"https://api.github.com/repos/kubernetes/minikube/statuses/${commit}?access_token=${token}" \
-H "Content-Type: application/json" \
-X POST \
-d "{\"state\": \"${state}\", \"description\": \"Jenkins\", \"target_url\": \"${target}\", \"context\": \"${context}\"}" || echo 999)
Expand All @@ -329,5 +327,5 @@ function retry_github_status() {
done
}

retry_github_status "${MINIKUBE_LOCATION}" "${JOB_NAME}" "${status}" "${access_token}" "https://storage.googleapis.com/minikube-builds/logs/${MINIKUBE_LOCATION}/${JOB_NAME}.txt"
retry_github_status "${COMMIT}" "${JOB_NAME}" "${status}" "${access_token}" "https://storage.googleapis.com/minikube-builds/logs/${MINIKUBE_LOCATION}/${JOB_NAME}.txt"
exit $result
5 changes: 2 additions & 3 deletions hack/jenkins/minikube_set_pending.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs=(

# retry_github_status provides reliable github status updates
function retry_github_status() {
local pr=$1
local commit=$1
local context=$2
local state=$3
local token=$4
Expand All @@ -58,7 +58,7 @@ function retry_github_status() {
while [[ "${attempt}" -lt 8 ]]; do
local out=$(mktemp)
code=$(curl -o "${out}" -s --write-out "%{http_code}" -L \
"https://api.github.com/repos/kubernetes/minikube/statuses/${pr}?access_token=${token}" \
"https://api.github.com/repos/kubernetes/minikube/statuses/${commit}?access_token=${token}" \
-H "Content-Type: application/json" \
-X POST \
-d "{\"state\": \"${state}\", \"description\": \"Jenkins\", \"target_url\": \"${target}\", \"context\": \"${context}\"}" || echo 999)
Expand All @@ -76,7 +76,6 @@ function retry_github_status() {
done
}


for j in ${jobs[@]}; do
retry_github_status "${ghprbActualCommit}" "${j}" "pending" "${access_token}" \
"https://storage.googleapis.com/minikube-builds/logs/${ghprbPullId}/${j}.txt"
Expand Down

0 comments on commit 5efde8b

Please sign in to comment.