11variables :
2+ STATUS_PROJECT : " hpc-io/pdc"
3+ STATUS_NAME : " NERSC / Perlmutter"
24 PDC_BUILD_PATH : " ${CI_PROJECT_DIR}/build"
35 PDC_INSTALL_PATH : " ${CI_PROJECT_DIR}/install"
46 GIT_CLONE_PATH : " ${CI_BUILDS_DIR}/${CI_PROJECT_NAME}/${CI_JOB_ID}"
57
68stages :
9+ - authorize
710 - build
811 - test
912 - metrics
1013
1114.report-status :
12- variables :
13- STATUS_PROJECT : " hpc-io/pdc"
14- STATUS_NAME : " NERSC / Perlmutter"
1515 script :
1616 # For complete details on the GitHub API please see:
1717 # https://developer.github.com/v3/repos/statuses
@@ -22,30 +22,50 @@ stages:
2222 -H "Authorization: Bearer ${GITHUB_TOKEN}" \
2323 -H "X-GitHub-Api-Version: 2022-11-28" \
2424 "https://api.github.com/repos/${STATUS_PROJECT}/statuses/${CI_COMMIT_SHA}" \
25- -d "{\"state\":\"${CI_JOB_NAME}\",\"target_url\":\"${CI_PIPELINE_URL}\",\"context\":\"${STATUS_NAME}\"}"
25+ -d "{\"state\":\"${CI_JOB_NAME}\",\"description\":\"${STATUS_MESSAGE}\",\" target_url\":\"${CI_PIPELINE_URL}\",\"context\":\"${STATUS_NAME}\"}"
2626
2727pending :
2828 stage : .pre
29+ variables :
30+ STATUS_MESSAGE : " Waiting for manual approval..."
2931 extends :
3032 - .report-status
3133
3234success :
3335 stage : .post
36+ variables :
37+ STATUS_MESSAGE : " Successfully passed all tests on NERSC system!"
3438 extends :
3539 - .report-status
3640
3741failure :
3842 stage : .post
43+ variables :
44+ STATUS_MESSAGE : " Failed to pass all tests on NERSC system!"
3945 extends :
4046 - .report-status
4147 rules :
4248 - when : on_failure
4349
44- perlmutter-no-cache-build :
45- stage : build
50+ perlmutter-authorize :
51+ stage : authorize
4652 rules :
4753 - if : ' $METRICS == null'
4854 when : manual
55+ script :
56+ - |
57+ curl -L \
58+ -X POST \
59+ -H "Accept: application/vnd.github+json" \
60+ -H "Authorization: Bearer ${GITHUB_TOKEN}" \
61+ -H "X-GitHub-Api-Version: 2022-11-28" \
62+ "https://api.github.com/repos/${STATUS_PROJECT}/statuses/${CI_COMMIT_SHA}" \
63+ -d "{\"state\":\"pending\",\"description\":\"Running...\",\"target_url\":\"${CI_PIPELINE_URL}\",\"context\":\"${STATUS_NAME}\"}"
64+
65+ perlmutter-no-cache-build :
66+ stage : build
67+ needs :
68+ - perlmutter-authorize
4969 id_tokens :
5070 SITE_ID_TOKEN :
5171 aud : https://gitlab.com
@@ -71,9 +91,8 @@ perlmutter-no-cache-build:
7191
7292perlmutter-cache-build :
7393 stage : build
74- rules :
75- - if : ' $METRICS == null'
76- when : manual
94+ needs :
95+ - perlmutter-authorize
7796 id_tokens :
7897 SITE_ID_TOKEN :
7998 aud : https://gitlab.com/
0 commit comments