Skip to content
Snippets Groups Projects

feat: add github status report jobs

Merged Wouter Deconinck requested to merge github-status-reporting into master
1 file
+ 46
0
Compare changes
  • Side-by-side
  • Inline
+ 46
0
@@ -21,6 +21,7 @@ default:
@@ -21,6 +21,7 @@ default:
dotenv: juggler.env
dotenv: juggler.env
stages:
stages:
 
- status-pending
- config
- config
- initialize
- initialize
- compile
- compile
@@ -30,6 +31,31 @@ stages:
@@ -30,6 +31,31 @@ stages:
- analyze
- analyze
- collect
- collect
- finish
- finish
 
- status-report
 
 
.status:
 
script:
 
- |
 
if [ -n "${GITHUB_SHA}" ] ; then
 
curl \
 
-X POST \
 
-H "Accept: application/vnd.github+json" \
 
-H "Authorization: token ${GITHUB_REPO_STATUS_TOKEN}" \
 
"https://api.github.com/repos/${GITHUB_REPOSITORY}/statuses/${GITHUB_SHA}" \
 
-d '{"state":"'"${STATE}"'",
 
"target_url":"'"${CI_PIPELINE_URL}"'",
 
"description":"'"${DESCRIPTION}"'",
 
"context":"eicweb/physics_benchmarks"
 
}' ;
 
fi
 
 
benchmarks:physics:pending:
 
stage: status-pending
 
extends: .status
 
variables:
 
STATE: "pending"
 
DESCRIPTION: "The physics benchmarks are running..."
 
when: always
common:setup:
common:setup:
stage: config
stage: config
@@ -99,3 +125,23 @@ summary:
@@ -99,3 +125,23 @@ summary:
- results/*
- results/*
# reports:
# reports:
# junit: ["results/dvcs/report2.xml"]
# junit: ["results/dvcs/report2.xml"]
 
 
benchmarks:physics:success:
 
stage: status-report
 
needs:
 
- ["summary"]
 
extends: .status
 
variables:
 
STATE: "success"
 
DESCRIPTION: "The physics benchmarks succeeded!"
 
when: on_success
 
 
benchmarks:physics:failure:
 
stage: status-report
 
needs:
 
- ["summary"]
 
extends: .status
 
variables:
 
STATE: "failure"
 
DESCRIPTION: "The physics benchmarks failed!"
 
when: on_failure
Loading