diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3d99b06..96525aa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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" @@ -17,6 +19,3 @@ stages: strategy: depend forward: pipeline_variables: true - -include: - - local: .gitlab/subscribed-pipelines.yml diff --git a/.gitlab/cztb2-build-and-test.yml b/.gitlab/cztb3-build-and-test.yml similarity index 81% rename from .gitlab/cztb2-build-and-test.yml rename to .gitlab/cztb3-build-and-test.yml index 71662db..e3d1625 100644 --- a/.gitlab/cztb2-build-and-test.yml +++ b/.gitlab/cztb3-build-and-test.yml @@ -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/' @@ -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' \ @@ -25,9 +27,12 @@ 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 @@ -35,8 +40,8 @@ status_pending: status_success: tags: - shell - - cztb2 - extends: [.on_cztb2] + - cztb3 + extends: [.on_cztb3] stage: status_update script: - export pipeline_status="success" @@ -46,8 +51,8 @@ status_success: status_failure: tags: - shell - - cztb2 - extends: [.on_cztb2] + - cztb3 + extends: [.on_cztb3] stage: status_update script: - export pipeline_status="failure" @@ -55,10 +60,10 @@ status_failure: when: on_failure # build across power lab -build-cztb2: +build-cztb3: tags: - shell - - cztb2 + - cztb3 stage: build script: - git clone $MSR_SAFE_ANSIBLE diff --git a/.gitlab/subscribed-pipelines.yml b/.gitlab/subscribed-pipelines.yml index b684125..ed11077 100644 --- a/.gitlab/subscribed-pipelines.yml +++ b/.gitlab/subscribed-pipelines.yml @@ -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]