Skip to content

Commit 0a1e146

Browse files
committed
Update CI message (#220)
* include CODEOWNERS * include status messages * include status messages * improve message * improve message * improve message * improve message * improve message
1 parent 83bde6a commit 0a1e146

File tree

2 files changed

+41
-9
lines changed

2 files changed

+41
-9
lines changed

.github/CODEOWNERS

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# This is a comment.
2+
# Each line is a file pattern followed by one or more owners.
3+
4+
# For more info about this file, please see
5+
# https://docs.github.com/en/enterprise/2.18/user/github/creating-cloning-and-archiving-repositories/about-code-owners
6+
7+
# These owners will be the default owners for everything in
8+
# the repo. Unless a later match takes precedence,
9+
10+
* @hpc-io/pdc-developers
11+
12+
# This directory controls the permissions/review requirements
13+
.github/ @hpc-io/pdc

.gitlab-ci.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
variables:
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

68
stages:
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
2727
pending:
2828
stage: .pre
29+
variables:
30+
STATUS_MESSAGE: "Waiting for manual approval..."
2931
extends:
3032
- .report-status
3133

3234
success:
3335
stage: .post
36+
variables:
37+
STATUS_MESSAGE: "Successfully passed all tests on NERSC system!"
3438
extends:
3539
- .report-status
3640

3741
failure:
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

7292
perlmutter-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

Comments
 (0)