Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
detector_benchmarks
Manage
Activity
Members
Labels
Plan
Issues
21
Issue boards
Milestones
Wiki
Code
Merge requests
7
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIC
benchmarks
detector_benchmarks
Commits
ff5152d1
Commit
ff5152d1
authored
2 years ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
fix: rework the status reporting to github
parent
aeeeb80c
No related branches found
No related tags found
1 merge request
!122
fix: rework the status reporting to github
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+34
-26
34 additions, 26 deletions
.gitlab-ci.yml
with
34 additions
and
26 deletions
.gitlab-ci.yml
+
34
−
26
View file @
ff5152d1
...
...
@@ -36,26 +36,33 @@ stages:
-
collect
-
deploy
-
trigger
-
status-
success
-
status-
report
benchmarks:detector:pending
:
stage
:
status-pending
.status
:
script
:
-
|
if [ -n "${GITHUB_SHA}" ] ; then
echo https://api.github.com/repos/${GITHUB_REPOSITORY}/statuses/${GITHUB_SHA}
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-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":"
pending", \
"target_url":"${CI_PIPELINE_URL}"
, \
"description":"
The detector benchmarks are running...", \
"context":"eicweb/detector_benchmarks"
\
}' ;
"
https://api.github.com/repos/${GITHUB_REPOSITORY}/statuses/${GITHUB_SHA}
"
\
-d '{"state":"
'"${STATE}"'",
"target_url":"
'"
${CI_PIPELINE_URL}"
'",
"description":"
'"${DESCRIPTION}"'",
"context":"eicweb/detector_benchmarks"
}' ;
fi
benchmarks:detector:pending
:
stage
:
status-pending
extends
:
.status
variables
:
STATE
:
"
pending"
DESCRIPTION
:
"
The
detector
benchmarks
are
running..."
when
:
always
common:setup
:
stage
:
config
before_script
:
...
...
@@ -153,23 +160,24 @@ deploy_results:
-
echo "deploy results!"
benchmarks:detector:success
:
stage
:
status-
success
stage
:
status-
report
needs
:
-
[
"
deploy_results"
]
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":"success", \
"target_url":"${CI_PIPELINE_URL}", \
"description":"The detector benchmarks succeeded!", \
"context":"eicweb/detector_benchmarks" \
}' ;
fi
extends
:
.status
variables
:
STATE
:
"
success"
DESCRIPTION
:
"
The
detector
benchmarks
succeeded!"
when
:
on_success
benchmarks:detector:failure
:
stage
:
status-report
needs
:
-
[
"
deploy_results"
]
extends
:
.status
variables
:
STATE
:
"
failure"
DESCRIPTION
:
"
The
detector
benchmarks
failed!"
when
:
on_failure
benchmarks:reconstruction
:
stage
:
trigger
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment