Skip to content

Commit

Permalink
Re-enable draft PR check and switch to status report as not default
Browse files Browse the repository at this point in the history
  • Loading branch information
alecbcs committed Dec 12, 2024
1 parent b285ad5 commit 451dd50
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 17 deletions.
8 changes: 4 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ default:

include:
- local: '/.gitlab/ci/test.yml'
# # [Optional] checks preliminary to running the actual CI test # TODO restore before merge
# - project: 'radiuss/radiuss-shared-ci'
# ref: 'v2024.07.0'
# file: 'utilities/preliminary-ignore-draft-pr.yml'
# [Optional] checks preliminary to running the actual CI test
- project: 'radiuss/radiuss-shared-ci'
ref: 'v2024.07.0'
file: 'utilities/preliminary-ignore-draft-pr.yml'

stages:
- status_initiate
Expand Down
25 changes: 12 additions & 13 deletions .gitlab/ci/test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
.status_report: &status_report
- |
curl -X POST --url "https://api.github.com/repos/llnl/${CI_PROJECT_NAME}/statuses/${CI_COMMIT_SHA}" \
--header 'Content-Type: application/json' \
--header "authorization: Bearer ${GITHUB_TOKEN}" \
--data "{ \"state\": \"${pipeline_status}\", \"target_url\": \"${CI_JOB_URL}\", \"description\": \"${CI_JOB_NAME}\", \"context\": \"ci/gitlab/${CI_JOB_NAME}\" }"
.test_clusters: &test_clusters
parallel:
matrix:
Expand Down Expand Up @@ -58,11 +51,7 @@
LEGACY_VARIANT:
- openmp

workflow:
auto_cancel:
on_new_commit: conservative

default:
.report_status: &report_status
before_script:
- export pipeline_status="pending"
- *status_report
Expand All @@ -73,7 +62,15 @@ default:
else
export pipeline_status="$CI_JOB_STATUS"
fi
- *status_report
- |
curl -X POST --url "https://api.github.com/repos/llnl/${CI_PROJECT_NAME}/statuses/${CI_COMMIT_SHA}" \
--header 'Content-Type: application/json' \
--header "authorization: Bearer ${GITHUB_TOKEN}" \
--data "{ \"state\": \"${pipeline_status}\", \"target_url\": \"${CI_JOB_URL}\", \"description\": \"${CI_JOB_NAME}\", \"context\": \"ci/gitlab/${CI_JOB_NAME}\" }"
workflow:
auto_cancel:
on_new_commit: conservative

legacy_test_run:
resource_group: $LEGACY_HOST
Expand All @@ -82,6 +79,7 @@ legacy_test_run:
- $LEGACY_HOST
- batch
<<: *legacy_test_clusters
<<: *report_status
rules:
- if: |
$CI_PIPELINE_SOURCE == "merge_request_event" ||
Expand Down Expand Up @@ -121,6 +119,7 @@ test_run:
- $HOST
- batch
<<: *test_clusters
<<: *report_status
rules:
- if: |
$CI_PIPELINE_SOURCE == "merge_request_event" ||
Expand Down

0 comments on commit 451dd50

Please sign in to comment.