diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dd72a94a7ca773b26b81cae46f7401d6d278ed79..7527eb754bb6e48a78c7a3b57d753ad2d1e90ac1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,6 +26,7 @@ default: dotenv: juggler.env stages: + - status-pending - config - initialize - data_init @@ -35,6 +36,24 @@ stages: - collect - deploy - trigger + - status-success + +benchmarks:detector:pending: + stage: status-pending + 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":"pending", \ + "target_url":"${CI_PIPELINE_URL}", \ + "description":"The detector benchmarks are running...", \ + "context":"eicweb/detector_benchmarks" \ + }' ; + fi common:setup: stage: config @@ -132,6 +151,25 @@ deploy_results: script: - echo "deploy results!" +benchmarks:detector:success: + stage: status-success + 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 + benchmarks:reconstruction: stage: trigger variables: