Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI message #220

Merged
merged 8 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# This is a comment.
# Each line is a file pattern followed by one or more owners.

# For more info about this file, please see
# https://docs.github.com/en/enterprise/2.18/user/github/creating-cloning-and-archiving-repositories/about-code-owners

# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,

* @hpc-io/pdc-developers

# This directory controls the permissions/review requirements
.github/ @hpc-io/pdc
37 changes: 28 additions & 9 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
variables:
STATUS_PROJECT: "hpc-io/pdc"
STATUS_NAME: "NERSC / Perlmutter"
PDC_BUILD_PATH: "${CI_PROJECT_DIR}/build"
PDC_INSTALL_PATH: "${CI_PROJECT_DIR}/install"
GIT_CLONE_PATH: "${CI_BUILDS_DIR}/${CI_PROJECT_NAME}/${CI_JOB_ID}"

stages:
- authorize
- build
- test
- metrics

.report-status:
variables:
STATUS_PROJECT: "hpc-io/pdc"
STATUS_NAME: "NERSC / Perlmutter"
script:
# For complete details on the GitHub API please see:
# https://developer.github.com/v3/repos/statuses
Expand All @@ -22,30 +22,50 @@ stages:
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/${STATUS_PROJECT}/statuses/${CI_COMMIT_SHA}" \
-d "{\"state\":\"${CI_JOB_NAME}\",\"target_url\":\"${CI_PIPELINE_URL}\",\"context\":\"${STATUS_NAME}\"}"
-d "{\"state\":\"${CI_JOB_NAME}\",\"description\":\"${STATUS_MESSAGE}\",\"target_url\":\"${CI_PIPELINE_URL}\",\"context\":\"${STATUS_NAME}\"}"

pending:
stage: .pre
variables:
STATUS_MESSAGE: "Waiting for manual approval..."
extends:
- .report-status

success:
stage: .post
variables:
STATUS_MESSAGE: "Successfully passed all tests on NERSC system!"
extends:
- .report-status

failure:
stage: .post
variables:
STATUS_MESSAGE: "Failed to pass all tests on NERSC system!"
extends:
- .report-status
rules:
- when: on_failure

perlmutter-no-cache-build:
stage: build
perlmutter-authorize:
stage: authorize
rules:
- if: '$METRICS == null'
when: manual
script:
- |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${GITHUB_TOKEN}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/${STATUS_PROJECT}/statuses/${CI_COMMIT_SHA}" \
-d "{\"state\":\"pending\",\"description\":\"Running...\",\"target_url\":\"${CI_PIPELINE_URL}\",\"context\":\"${STATUS_NAME}\"}"

perlmutter-no-cache-build:
stage: build
needs:
- perlmutter-authorize
id_tokens:
SITE_ID_TOKEN:
aud: https://gitlab.com
Expand All @@ -71,9 +91,8 @@ perlmutter-no-cache-build:

perlmutter-cache-build:
stage: build
rules:
- if: '$METRICS == null'
when: manual
needs:
- perlmutter-authorize
id_tokens:
SITE_ID_TOKEN:
aud: https://gitlab.com/
Expand Down
Loading