Skip to content
Open
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
7 changes: 3 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
include: [component: $CI_SERVER_FQDN/lc-components/id_tokens/id_tokens-component@main]
include:
- component: $CI_SERVER_FQDN/lc-components/id_tokens/id_tokens-component@main
- local: .gitlab/subscribed-pipelines.yml

variables:
CUSTOM_CI_BUILDS_DIR: "/usr/workspace/msr/gitlab-runner"
Expand All @@ -17,6 +19,3 @@ stages:
strategy: depend
forward:
pipeline_variables: true

include:
- local: .gitlab/subscribed-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
include: [component: $CI_SERVER_FQDN/lc-components/id_tokens/id_tokens-component@main]

stages:
- status_initiate
- build
- status_update

.on_cztb2:
.on_cztb3:
tags:
- shell
- cztb2
- cztb3
rules:
# Only report failure if the pipeline failed.
- if: '$CI_JOB_NAME =~ /status_failure/'
Expand All @@ -15,7 +17,7 @@ stages:
- when: on_success

.status_report: &status_report
- export context="cztb2"
- export context="cztb3"
- |
curl --url "https://api.github.com/repos/llnl/${CI_PROJECT_NAME}/statuses/${CI_COMMIT_SHA}" \
--header 'Content-Type: application/json' \
Expand All @@ -25,18 +27,21 @@ stages:
status_pending:
tags:
- shell
- cztb2
extends: [.on_cztb2]
- cztb3
extends: [.on_cztb3]
stage: status_initiate
id_tokens:
CI_JOB_JWT:
aud: https://lc.llnl.gov/gitlab
script:
- export pipeline_status="pending"
- *status_report

status_success:
tags:
- shell
- cztb2
extends: [.on_cztb2]
- cztb3
extends: [.on_cztb3]
stage: status_update
script:
- export pipeline_status="success"
Expand All @@ -46,19 +51,19 @@ status_success:
status_failure:
tags:
- shell
- cztb2
extends: [.on_cztb2]
- cztb3
extends: [.on_cztb3]
stage: status_update
script:
- export pipeline_status="failure"
- *status_report
when: on_failure

# build across power lab
build-cztb2:
build-cztb3:
tags:
- shell
- cztb2
- cztb3
stage: build
script:
- git clone $MSR_SAFE_ANSIBLE
Expand Down
6 changes: 4 additions & 2 deletions .gitlab/subscribed-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
include: [component: $CI_SERVER_FQDN/lc-components/id_tokens/id_tokens-component@main]

# Trigger a build pipeline for the following systems
cztb2-build-and-test:
cztb3-build-and-test:
variables:
CI_MACHINE: "cztb2"
CI_MACHINE: "cztb3"
extends: [.build]