Unverified Commit 3bb1a577 authored by Medya Ghazizadeh's avatar Medya Ghazizadeh Committed by GitHub

upload "per commit" logs for integration test (#6609)

* make set logs URLs per commit

* add logs per commit to commit status

* logs per commit

* add per commit logs for windows too

* fix windows test script virtualbox

* fix windows script

* forget about windows for now it errors

* fix pending script

* fix typo pending script
parent 4c6b435f
Pipeline #117715828 passed with stage
in 3 minutes and 1 second
......@@ -308,7 +308,8 @@ min=$(($elapsed/60))
sec=$(tail -c 3 <<< $((${elapsed}00/60)))
elapsed=$min.$sec
JOB_GCS_BUCKET="minikube-builds/logs/${MINIKUBE_LOCATION}/${JOB_NAME}"
SHORT_COMMIT=${COMMIT:0:7}
JOB_GCS_BUCKET="minikube-builds/logs/${MINIKUBE_LOCATION}/${SHORT_COMMIT}/${JOB_NAME}"
echo ">> Copying ${TEST_OUT} to gs://${JOB_GCS_BUCKET}out.txt"
gsutil -qm cp "${TEST_OUT}" "gs://${JOB_GCS_BUCKET}out.txt"
......@@ -345,6 +346,7 @@ gsutil -qm cp "${JSON_OUT}" "gs://${JOB_GCS_BUCKET}.json" || true
echo ">> uploading ${HTML_OUT}"
gsutil -qm cp "${HTML_OUT}" "gs://${JOB_GCS_BUCKET}.html" || true
public_log_url="https://storage.googleapis.com/${JOB_GCS_BUCKET}.txt"
if grep -q html "$HTML_OUT"; then
public_log_url="https://storage.googleapis.com/${JOB_GCS_BUCKET}.html"
......
......@@ -78,8 +78,9 @@ function retry_github_status() {
done
}
SHORT_COMMIT=${ghprbActualCommit:0:7}
for j in ${jobs[@]}; do
retry_github_status "${ghprbActualCommit}" "${j}" "pending" "${access_token}" \
"https://storage.googleapis.com/minikube-builds/logs/${ghprbPullId}/${j}.pending"
"https://storage.googleapis.com/minikube-builds/logs/${ghprbPullId}/${SHORT_COMMIT}/${j}.pending"
done
......@@ -25,6 +25,8 @@ $env:result=$lastexitcode
If($env:result -eq 0){$env:status="success"}
Else {$env:status="failure"}
# $env:SHORT_COMMIT=$env:COMMIT.substring(0, 7)
# to be used later to implement https://github.com/kubernetes/minikube/issues/6593
$env:target_url="https://storage.googleapis.com/minikube-builds/logs/$env:MINIKUBE_LOCATION/Hyper-V_Windows.txt"
$json = "{`"state`": `"$env:status`", `"description`": `"Jenkins`", `"target_url`": `"$env:target_url`", `"context`": `"Hyper-V_Windows`"}"
Invoke-WebRequest -Uri "https://api.github.com/repos/kubernetes/minikube/statuses/$env:COMMIT`?access_token=$env:access_token" -Body $json -ContentType "application/json" -Method Post -usebasicparsing
......
......@@ -25,6 +25,8 @@ $env:result=$lastexitcode
If($env:result -eq 0){$env:status="success"}
Else {$env:status="failure"}
# $env:SHORT_COMMIT=$env:COMMIT.substring(0, 7)
# to be used later
$env:target_url="https://storage.googleapis.com/minikube-builds/logs/$env:MINIKUBE_LOCATION/VirtualBox_Windows.txt"
$json = "{`"state`": `"$env:status`", `"description`": `"Jenkins`", `"target_url`": `"$env:target_url`", `"context`": `"VirtualBox_Windows`"}"
Invoke-WebRequest -Uri "https://api.github.com/repos/kubernetes/minikube/statuses/$env:COMMIT`?access_token=$env:access_token" -Body $json -ContentType "application/json" -Method Post -usebasicparsing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment