gitlab ci: release fixes and improvements (#37601)

* gitlab ci: release fixes and improvements

  - use rules to reduce boilerplate in .gitlab-ci.yml
  - support copy-only pipeline jobs
  - make pipelines for release branches rebuild everything
  - make pipelines for protected tags copy-only

* gitlab ci: remove url changes used in testing

* gitlab ci: tag mirrors need public key

Make sure that mirrors associated with release branches and tags
contain the public key needed to verify the signed binaries.  This
also ensures that when stack-specific mirror contents are copied
to the root, the root mirror has the public key as well.

* review: be more specific about tags, curl flags

* Make the check in ci.yaml consistent with the .gitlab-ci.yml

---------

Co-authored-by: Ryan Krattiger <ryan.krattiger@kitware.com>
This commit is contained in:
Scott Wittenburg 2023-05-12 14:22:42 -06:00 committed by GitHub
parent 4e5fb62679
commit c08be95d5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 218 additions and 464 deletions

View File

@ -531,7 +531,7 @@ def __init__(self, ci_config, phases, staged_phases):
""" """
self.ci_config = ci_config self.ci_config = ci_config
self.named_jobs = ["any", "build", "cleanup", "noop", "reindex", "signing"] self.named_jobs = ["any", "build", "copy", "cleanup", "noop", "reindex", "signing"]
self.ir = { self.ir = {
"jobs": {}, "jobs": {},
@ -1207,7 +1207,7 @@ def main_script_replacements(cmd):
).format(c_spec, release_spec) ).format(c_spec, release_spec)
tty.debug(debug_msg) tty.debug(debug_msg)
if prune_dag and not rebuild_spec: if prune_dag and not rebuild_spec and spack_pipeline_type != "spack_copy_only":
tty.debug( tty.debug(
"Pruning {0}/{1}, does not need rebuild.".format( "Pruning {0}/{1}, does not need rebuild.".format(
release_spec.name, release_spec.dag_hash() release_spec.name, release_spec.dag_hash()
@ -1298,8 +1298,9 @@ def main_script_replacements(cmd):
max_length_needs = length_needs max_length_needs = length_needs
max_needs_job = job_name max_needs_job = job_name
output_object[job_name] = job_object if spack_pipeline_type != "spack_copy_only":
job_id += 1 output_object[job_name] = job_object
job_id += 1
if print_summary: if print_summary:
for phase in phases: for phase in phases:
@ -1329,6 +1330,17 @@ def main_script_replacements(cmd):
"when": ["runner_system_failure", "stuck_or_timeout_failure", "script_failure"], "when": ["runner_system_failure", "stuck_or_timeout_failure", "script_failure"],
} }
if spack_pipeline_type == "spack_copy_only":
stage_names.append("copy")
sync_job = copy.deepcopy(spack_ci_ir["jobs"]["copy"]["attributes"])
sync_job["stage"] = "copy"
if artifacts_root:
sync_job["needs"] = [
{"job": generate_job_name, "pipeline": "{0}".format(parent_pipeline_id)}
]
output_object["copy"] = sync_job
job_id += 1
if job_id > 0: if job_id > 0:
if temp_storage_url_prefix: if temp_storage_url_prefix:
# There were some rebuild jobs scheduled, so we will need to # There were some rebuild jobs scheduled, so we will need to

View File

@ -89,6 +89,11 @@
"additionalProperties": False, "additionalProperties": False,
"properties": {"build-job": attributes_schema, "build-job-remove": attributes_schema}, "properties": {"build-job": attributes_schema, "build-job-remove": attributes_schema},
}, },
{
"type": "object",
"additionalProperties": False,
"properties": {"copy-job": attributes_schema, "copy-job-remove": attributes_schema},
},
{ {
"type": "object", "type": "object",
"additionalProperties": False, "additionalProperties": False,

View File

@ -27,41 +27,47 @@ default:
######################################## ########################################
# Job templates # Job templates
######################################## ########################################
.base-job:
.aws-pr-creds:
variables:
AWS_ACCESS_KEY_ID: ${PR_MIRRORS_AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${PR_MIRRORS_AWS_SECRET_ACCESS_KEY}
.aws-protected-creds:
variables:
AWS_ACCESS_KEY_ID: ${PROTECTED_MIRRORS_AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${PROTECTED_MIRRORS_AWS_SECRET_ACCESS_KEY}
.pr-refs:
only:
- /^pr[\d]+_.*$/
.pr:
extends: [ ".pr-refs" ]
variables:
SPACK_BUILDCACHE_DESTINATION: "s3://spack-binaries-prs/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME}"
SPACK_PIPELINE_TYPE: "spack_pull_request"
SPACK_PRUNE_UNTOUCHED: "True"
SPACK_PRUNE_UNTOUCHED_DEPENDENT_DEPTH: "1"
.protected-refs:
only:
- /^develop$/
- /^releases\/v.*/
- /^v.*/
.protected:
extends: [ ".protected-refs" ]
variables: variables:
SPACK_BUILDCACHE_DESTINATION: "s3://spack-binaries/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME}" SPACK_BUILDCACHE_DESTINATION: "s3://spack-binaries/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME}"
SPACK_COPY_BUILDCACHE: "s3://spack-binaries/${CI_COMMIT_REF_NAME}" rules:
SPACK_PIPELINE_TYPE: "spack_protected_branch" - if: $CI_COMMIT_REF_NAME == "develop"
# Pipelines on develop only rebuild what is missing from the mirror
when: always
variables:
SPACK_PIPELINE_TYPE: "spack_protected_branch"
SPACK_COPY_BUILDCACHE: "s3://spack-binaries/${CI_COMMIT_REF_NAME}"
AWS_ACCESS_KEY_ID: ${PROTECTED_MIRRORS_AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${PROTECTED_MIRRORS_AWS_SECRET_ACCESS_KEY}
- if: $CI_COMMIT_REF_NAME =~ /^releases\/v.*/
# Pipelines on release branches always rebuild everything
when: always
variables:
SPACK_PIPELINE_TYPE: "spack_protected_branch"
SPACK_COPY_BUILDCACHE: "s3://spack-binaries/${CI_COMMIT_REF_NAME}"
SPACK_PRUNE_UNTOUCHED: "False"
SPACK_PRUNE_UP_TO_DATE: "False"
AWS_ACCESS_KEY_ID: ${PROTECTED_MIRRORS_AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${PROTECTED_MIRRORS_AWS_SECRET_ACCESS_KEY}
- if: $CI_COMMIT_TAG =~ /^develop-[\d]{4}-[\d]{2}-[\d]{2}$/ || $CI_COMMIT_TAG =~ /^v.*/
# Pipelines on tags (release or dev snapshots) only copy binaries from one mirror to another
when: always
variables:
SPACK_PIPELINE_TYPE: "spack_copy_only"
SPACK_SOURCE_MIRROR: "s3://spack-binaries/SPACK_REPLACE_VERSION/${SPACK_CI_STACK_NAME}"
SPACK_COPY_BUILDCACHE: "s3://spack-binaries/${CI_COMMIT_REF_NAME}"
AWS_ACCESS_KEY_ID: ${PROTECTED_MIRRORS_AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${PROTECTED_MIRRORS_AWS_SECRET_ACCESS_KEY}
- if: $CI_COMMIT_REF_NAME =~ /^pr[\d]+_.*$/
# Pipelines on PR branches rebuild only what's missing, and do extra pruning
when: always
variables:
SPACK_PIPELINE_TYPE: "spack_pull_request"
SPACK_BUILDCACHE_DESTINATION: "s3://spack-binaries-prs/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME}"
SPACK_PRUNE_UNTOUCHED: "True"
SPACK_PRUNE_UNTOUCHED_DEPENDENT_DEPTH: "1"
AWS_ACCESS_KEY_ID: ${PR_MIRRORS_AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${PR_MIRRORS_AWS_SECRET_ACCESS_KEY}
.generate-base: .generate-base:
stage: generate stage: generate
@ -99,10 +105,11 @@ default:
- always - always
.generate: .generate:
extends: [ ".generate-base" ] extends: [ ".base-job", ".generate-base" ]
tags: ["spack", "public", "medium", "x86_64"] tags: ["spack", "public", "medium", "x86_64"]
.generate-deprecated: .generate-deprecated:
extends: [ ".base-job" ]
stage: generate stage: generate
script: script:
- uname -a || true - uname -a || true
@ -134,45 +141,30 @@ default:
tags: ["spack", "public", "medium", "x86_64"] tags: ["spack", "public", "medium", "x86_64"]
.generate-aarch64: .generate-aarch64:
extends: [ ".generate" ] extends: [ ".base-job", ".generate" ]
tags: ["spack", "public", "medium", "aarch64"] tags: ["spack", "public", "medium", "aarch64"]
.pr-generate:
extends: [ ".pr", ".generate" ]
.pr-generate-deprecated:
extends: [ ".pr", ".generate-deprecated" ]
.pr-generate-aarch64:
extends: [ ".pr", ".generate-aarch64" ]
.protected-generate:
extends: [ ".protected", ".generate" ]
.protected-generate-deprecated:
extends: [ ".protected", ".generate-deprecated" ]
.protected-generate-aarch64:
extends: [ ".protected", ".generate-aarch64" ]
.build: .build:
extends: [ ".base-job" ]
stage: build stage: build
.pr-build:
extends: [ ".pr", ".build", ".aws-pr-creds" ]
.protected-build:
extends: [ ".protected", ".build", ".aws-protected-creds" ]
protected-publish: protected-publish:
# Copy binaries from stack-specific mirrors to a root mirror
stage: publish stage: publish
extends: [ ".protected", ".aws-protected-creds" ] only:
- /^develop$/
- /^releases\/v.*/
- /^v.*/
- /^develop-[\d]{4}-[\d]{2}-[\d]{2}$/
image: "ghcr.io/spack/python-aws-bash:0.0.1" image: "ghcr.io/spack/python-aws-bash:0.0.1"
tags: ["spack", "public", "medium", "aws", "x86_64"] tags: ["spack", "public", "medium", "aws", "x86_64"]
retry: retry:
max: 2 max: 2
when: ["runner_system_failure", "stuck_or_timeout_failure"] when: ["runner_system_failure", "stuck_or_timeout_failure"]
variables: variables:
SPACK_BUILDCACHE_DESTINATION: "s3://spack-binaries/${CI_COMMIT_REF_NAME}/${SPACK_CI_STACK_NAME}"
SPACK_COPY_BUILDCACHE: "s3://spack-binaries/${CI_COMMIT_REF_NAME}"
SPACK_PIPELINE_TYPE: "spack_protected_branch"
AWS_ACCESS_KEY_ID: ${PROTECTED_MIRRORS_AWS_ACCESS_KEY_ID} AWS_ACCESS_KEY_ID: ${PROTECTED_MIRRORS_AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY: ${PROTECTED_MIRRORS_AWS_SECRET_ACCESS_KEY} AWS_SECRET_ACCESS_KEY: ${PROTECTED_MIRRORS_AWS_SECRET_ACCESS_KEY}
KUBERNETES_CPU_REQUEST: 4000m KUBERNETES_CPU_REQUEST: 4000m
@ -182,7 +174,9 @@ protected-publish:
- spack --version - spack --version
- export COPY_SPECS_DIR=${CI_PROJECT_DIR}/jobs_scratch_dir/specs_to_copy - export COPY_SPECS_DIR=${CI_PROJECT_DIR}/jobs_scratch_dir/specs_to_copy
- spack buildcache sync --manifest-glob "${COPY_SPECS_DIR}/*.json" - spack buildcache sync --manifest-glob "${COPY_SPECS_DIR}/*.json"
- spack buildcache update-index "${SPACK_COPY_BUILDCACHE}" - curl -fLsS https://spack.github.io/keys/spack-public-binary-key.pub -o /tmp/spack-public-binary-key.pub
- aws s3 cp /tmp/spack-public-binary-key.pub "${SPACK_COPY_BUILDCACHE}/build_cache/_pgp/spack-public-binary-key.pub"
- spack buildcache update-index --keys "${SPACK_COPY_BUILDCACHE}"
######################################## ########################################
# TEMPLATE FOR ADDING ANOTHER PIPELINE # TEMPLATE FOR ADDING ANOTHER PIPELINE
@ -208,33 +202,19 @@ protected-publish:
# SPACK_CI_STACK_NAME: my-super-cool-stack # SPACK_CI_STACK_NAME: my-super-cool-stack
# tags: [ "all", "tags", "your", "job", "needs"] # tags: [ "all", "tags", "your", "job", "needs"]
# #
# my-super-cool-stack-pr-generate: # my-super-cool-stack-generate:
# extends: [ ".pr-generate", ".my-super-cool-stack" ] # extends: [ ".generate", ".my-super-cool-stack" ]
# #
# my-super-cool-stack-protected-generate: # my-super-cool-stack-build:
# extends: [ ".protected-generate", ".my-super-cool-stack" ] # extends: [ ".build", ".my-super-cool-stack" ]
#
# my-super-cool-stack-pr-build:
# extends: [ ".pr-build", ".my-super-cool-stack" ]
# trigger: # trigger:
# include: # include:
# - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml # - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
# job: my-super-cool-stack-pr-generate # job: my-super-cool-stack-generate
# strategy: depend # strategy: depend
# needs: # needs:
# - artifacts: True # - artifacts: True
# job: my-super-cool-stack-pr-generate # job: my-super-cool-stack-generate
#
# my-super-cool-stack-protected-build:
# extends: [ ".protected-build", ".my-super-cool-stack" ]
# trigger:
# include:
# - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
# job: my-super-cool-stack-protected-generate
# strategy: depend
# needs:
# - artifacts: True
# job: my-super-cool-stack-protected-generate
######################################## ########################################
# E4S Mac Stack # E4S Mac Stack
@ -362,35 +342,20 @@ protected-publish:
variables: variables:
SPACK_CI_STACK_NAME: e4s SPACK_CI_STACK_NAME: e4s
e4s-pr-generate: e4s-generate:
extends: [ ".e4s", ".pr-generate"] extends: [ ".e4s", ".generate"]
image: ecpe4s/ubuntu20.04-runner-x86_64:2023-01-01 image: ecpe4s/ubuntu20.04-runner-x86_64:2023-01-01
e4s-protected-generate: e4s-build:
extends: [ ".e4s", ".protected-generate"] extends: [ ".e4s", ".build" ]
image: ecpe4s/ubuntu20.04-runner-x86_64:2023-01-01
e4s-pr-build:
extends: [ ".e4s", ".pr-build" ]
trigger: trigger:
include: include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: e4s-pr-generate job: e4s-generate
strategy: depend strategy: depend
needs: needs:
- artifacts: True - artifacts: True
job: e4s-pr-generate job: e4s-generate
e4s-protected-build:
extends: [ ".e4s", ".protected-build" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: e4s-protected-generate
strategy: depend
needs:
- artifacts: True
job: e4s-protected-generate
######################################## ########################################
# GPU Testing Pipeline # GPU Testing Pipeline
@ -400,35 +365,20 @@ e4s-protected-build:
variables: variables:
SPACK_CI_STACK_NAME: gpu-tests SPACK_CI_STACK_NAME: gpu-tests
gpu-tests-pr-generate: gpu-tests-generate:
extends: [ ".gpu-tests", ".pr-generate"] extends: [ ".gpu-tests", ".generate"]
image: ecpe4s/ubuntu20.04-runner-x86_64:2023-01-01 image: ecpe4s/ubuntu20.04-runner-x86_64:2023-01-01
gpu-tests-protected-generate: gpu-tests-build:
extends: [ ".gpu-tests", ".protected-generate"] extends: [ ".gpu-tests", ".build" ]
image: ecpe4s/ubuntu20.04-runner-x86_64:2023-01-01
gpu-tests-pr-build:
extends: [ ".gpu-tests", ".pr-build" ]
trigger: trigger:
include: include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: gpu-tests-pr-generate job: gpu-tests-generate
strategy: depend strategy: depend
needs: needs:
- artifacts: True - artifacts: True
job: gpu-tests-pr-generate job: gpu-tests-generate
gpu-tests-protected-build:
extends: [ ".gpu-tests", ".protected-build" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: gpu-tests-protected-generate
strategy: depend
needs:
- artifacts: True
job: gpu-tests-protected-generate
######################################## ########################################
# E4S OneAPI Pipeline # E4S OneAPI Pipeline
@ -438,35 +388,20 @@ gpu-tests-protected-build:
variables: variables:
SPACK_CI_STACK_NAME: e4s-oneapi SPACK_CI_STACK_NAME: e4s-oneapi
e4s-oneapi-pr-generate: e4s-oneapi-generate:
extends: [ ".e4s-oneapi", ".pr-generate"] extends: [ ".e4s-oneapi", ".generate"]
image: ecpe4s/ubuntu20.04-runner-x86_64-oneapi:2023-01-01 image: ecpe4s/ubuntu20.04-runner-x86_64-oneapi:2023-01-01
e4s-oneapi-protected-generate: e4s-oneapi-build:
extends: [ ".e4s-oneapi", ".protected-generate"] extends: [ ".e4s-oneapi", ".build" ]
image: ecpe4s/ubuntu20.04-runner-x86_64-oneapi:2023-01-01
e4s-oneapi-pr-build:
extends: [ ".e4s-oneapi", ".pr-build" ]
trigger: trigger:
include: include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: e4s-oneapi-pr-generate job: e4s-oneapi-generate
strategy: depend strategy: depend
needs: needs:
- artifacts: True - artifacts: True
job: e4s-oneapi-pr-generate job: e4s-oneapi-generate
e4s-oneapi-protected-build:
extends: [ ".e4s-oneapi", ".protected-build" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: e4s-oneapi-protected-generate
strategy: depend
needs:
- artifacts: True
job: e4s-oneapi-protected-generate
######################################## ########################################
# E4S on Power # E4S on Power
@ -480,33 +415,19 @@ e4s-oneapi-protected-build:
variables: variables:
SPACK_CI_STACK_NAME: e4s-power SPACK_CI_STACK_NAME: e4s-power
e4s-power-pr-generate: e4s-power-generate:
extends: [ ".e4s-power", ".pr-generate", ".e4s-power-generate-tags-and-image"] extends: [ ".e4s-power", ".generate", ".e4s-power-generate-tags-and-image"]
e4s-power-protected-generate: e4s-power-build:
extends: [ ".e4s-power", ".protected-generate", ".e4s-power-generate-tags-and-image"] extends: [ ".e4s-power", ".build" ]
e4s-power-pr-build:
extends: [ ".e4s-power", ".pr-build" ]
trigger: trigger:
include: include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: e4s-power-pr-generate job: e4s-power-generate
strategy: depend strategy: depend
needs: needs:
- artifacts: True - artifacts: True
job: e4s-power-pr-generate job: e4s-power-generate
e4s-power-protected-build:
extends: [ ".e4s-power", ".protected-build" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: e4s-power-protected-generate
strategy: depend
needs:
- artifacts: True
job: e4s-power-protected-generate
######################################### #########################################
# Build tests for different build-systems # Build tests for different build-systems
@ -516,33 +437,19 @@ e4s-power-protected-build:
variables: variables:
SPACK_CI_STACK_NAME: build_systems SPACK_CI_STACK_NAME: build_systems
build_systems-pr-generate: build_systems-generate:
extends: [ ".build_systems", ".pr-generate"] extends: [ ".build_systems", ".generate"]
build_systems-protected-generate: build_systems-build:
extends: [ ".build_systems", ".protected-generate"] extends: [ ".build_systems", ".build" ]
build_systems-pr-build:
extends: [ ".build_systems", ".pr-build" ]
trigger: trigger:
include: include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: build_systems-pr-generate job: build_systems-generate
strategy: depend strategy: depend
needs: needs:
- artifacts: True - artifacts: True
job: build_systems-pr-generate job: build_systems-generate
build_systems-protected-build:
extends: [ ".build_systems", ".protected-build" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: build_systems-protected-generate
strategy: depend
needs:
- artifacts: True
job: build_systems-protected-generate
######################################### #########################################
# RADIUSS # RADIUSS
@ -552,35 +459,19 @@ build_systems-protected-build:
variables: variables:
SPACK_CI_STACK_NAME: radiuss SPACK_CI_STACK_NAME: radiuss
# --------- PRs --------- radiuss-generate:
radiuss-pr-generate: extends: [ ".radiuss", ".generate" ]
extends: [ ".radiuss", ".pr-generate" ]
radiuss-pr-build: radiuss-build:
extends: [ ".radiuss", ".pr-build" ] extends: [ ".radiuss", ".build" ]
trigger: trigger:
include: include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: radiuss-pr-generate job: radiuss-generate
strategy: depend strategy: depend
needs: needs:
- artifacts: True - artifacts: True
job: radiuss-pr-generate job: radiuss-generate
# --------- Protected ---------
radiuss-protected-generate:
extends: [ ".radiuss", ".protected-generate" ]
radiuss-protected-build:
extends: [ ".radiuss", ".protected-build" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: radiuss-protected-generate
strategy: depend
needs:
- artifacts: True
job: radiuss-protected-generate
######################################## ########################################
# RADIUSS for AWS # RADIUSS for AWS
@ -600,33 +491,19 @@ radiuss-protected-build:
variables: variables:
SPACK_CI_STACK_NAME: radiuss-aws SPACK_CI_STACK_NAME: radiuss-aws
radiuss-aws-pr-generate: radiuss-aws-generate:
extends: [ ".radiuss-aws", ".pr-generate", ".radiuss-aws-overrides", ".tags-x86_64_v4" ] extends: [ ".radiuss-aws", ".generate", ".radiuss-aws-overrides", ".tags-x86_64_v4" ]
radiuss-aws-protected-generate: radiuss-aws-build:
extends: [ ".radiuss-aws", ".protected-generate", ".radiuss-aws-overrides", ".tags-x86_64_v4" ] extends: [ ".radiuss-aws", ".build" ]
radiuss-aws-pr-build:
extends: [ ".radiuss-aws", ".pr-build" ]
trigger: trigger:
include: include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: radiuss-aws-pr-generate job: radiuss-aws-generate
strategy: depend strategy: depend
needs: needs:
- artifacts: True - artifacts: True
job: radiuss-aws-pr-generate job: radiuss-aws-generate
radiuss-aws-protected-build:
extends: [ ".radiuss-aws", ".protected-build" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: radiuss-aws-protected-generate
strategy: depend
needs:
- artifacts: True
job: radiuss-aws-protected-generate
# Parallel Pipeline for aarch64 (reuses override image, but generates and builds on aarch64) # Parallel Pipeline for aarch64 (reuses override image, but generates and builds on aarch64)
@ -636,33 +513,19 @@ radiuss-aws-protected-build:
variables: variables:
SPACK_CI_STACK_NAME: radiuss-aws-aarch64 SPACK_CI_STACK_NAME: radiuss-aws-aarch64
radiuss-aws-aarch64-pr-generate: radiuss-aws-aarch64-generate:
extends: [ ".radiuss-aws-aarch64", ".pr-generate-aarch64", ".radiuss-aws-overrides" ] extends: [ ".radiuss-aws-aarch64", ".generate-aarch64", ".radiuss-aws-overrides" ]
radiuss-aws-aarch64-protected-generate: radiuss-aws-aarch64-build:
extends: [ ".radiuss-aws-aarch64", ".protected-generate-aarch64", ".radiuss-aws-overrides" ] extends: [ ".radiuss-aws-aarch64", ".build" ]
radiuss-aws-aarch64-pr-build:
extends: [ ".radiuss-aws-aarch64", ".pr-build" ]
trigger: trigger:
include: include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: radiuss-aws-aarch64-pr-generate job: radiuss-aws-aarch64-generate
strategy: depend strategy: depend
needs: needs:
- artifacts: True - artifacts: True
job: radiuss-aws-aarch64-pr-generate job: radiuss-aws-aarch64-generate
radiuss-aws-aarch64-protected-build:
extends: [ ".radiuss-aws-aarch64", ".protected-build" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: radiuss-aws-aarch64-protected-generate
strategy: depend
needs:
- artifacts: True
job: radiuss-aws-aarch64-protected-generate
######################################## ########################################
# ECP Data & Vis SDK # ECP Data & Vis SDK
@ -672,35 +535,20 @@ radiuss-aws-aarch64-protected-build:
variables: variables:
SPACK_CI_STACK_NAME: data-vis-sdk SPACK_CI_STACK_NAME: data-vis-sdk
data-vis-sdk-pr-generate: data-vis-sdk-generate:
extends: [ ".data-vis-sdk", ".pr-generate"] extends: [ ".data-vis-sdk", ".generate"]
image: ecpe4s/ubuntu20.04-runner-x86_64:2023-01-01 image: ecpe4s/ubuntu20.04-runner-x86_64:2023-01-01
data-vis-sdk-protected-generate: data-vis-sdk-build:
extends: [ ".data-vis-sdk", ".protected-generate"] extends: [ ".data-vis-sdk", ".build" ]
image: ecpe4s/ubuntu20.04-runner-x86_64:2023-01-01
data-vis-sdk-pr-build:
extends: [ ".data-vis-sdk", ".pr-build" ]
trigger: trigger:
include: include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: data-vis-sdk-pr-generate job: data-vis-sdk-generate
strategy: depend strategy: depend
needs: needs:
- artifacts: True - artifacts: True
job: data-vis-sdk-pr-generate job: data-vis-sdk-generate
data-vis-sdk-protected-build:
extends: [ ".data-vis-sdk", ".protected-build" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: data-vis-sdk-protected-generate
strategy: depend
needs:
- artifacts: True
job: data-vis-sdk-protected-generate
######################################## ########################################
# AWS AHUG Applications (x86_64) # AWS AHUG Applications (x86_64)
@ -717,34 +565,19 @@ data-vis-sdk-protected-build:
variables: variables:
SPACK_CI_STACK_NAME: aws-ahug SPACK_CI_STACK_NAME: aws-ahug
aws-ahug-pr-generate: aws-ahug-generate:
extends: [ ".aws-ahug", ".pr-generate", ".aws-ahug-overrides", ".tags-x86_64_v4" ] extends: [ ".aws-ahug", ".generate", ".aws-ahug-overrides", ".tags-x86_64_v4" ]
aws-ahug-protected-generate: aws-ahug-build:
extends: [ ".aws-ahug", ".protected-generate", ".aws-ahug-overrides", ".tags-x86_64_v4" ] extends: [ ".aws-ahug", ".build" ]
aws-ahug-pr-build:
extends: [ ".aws-ahug", ".pr-build" ]
trigger: trigger:
include: include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: aws-ahug-pr-generate job: aws-ahug-generate
strategy: depend strategy: depend
needs: needs:
- artifacts: True - artifacts: True
job: aws-ahug-pr-generate job: aws-ahug-generate
aws-ahug-protected-build:
extends: [ ".aws-ahug", ".protected-build" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: aws-ahug-protected-generate
strategy: depend
needs:
- artifacts: True
job: aws-ahug-protected-generate
# Parallel Pipeline for aarch64 (reuses override image, but generates and builds on aarch64) # Parallel Pipeline for aarch64 (reuses override image, but generates and builds on aarch64)
.aws-ahug-aarch64: .aws-ahug-aarch64:
@ -752,33 +585,19 @@ aws-ahug-protected-build:
variables: variables:
SPACK_CI_STACK_NAME: aws-ahug-aarch64 SPACK_CI_STACK_NAME: aws-ahug-aarch64
aws-ahug-aarch64-pr-generate: aws-ahug-aarch64-generate:
extends: [ ".aws-ahug-aarch64", ".pr-generate-aarch64", ".aws-ahug-overrides" ] extends: [ ".aws-ahug-aarch64", ".generate-aarch64", ".aws-ahug-overrides" ]
aws-ahug-aarch64-protected-generate: aws-ahug-aarch64-build:
extends: [ ".aws-ahug-aarch64", ".protected-generate-aarch64", ".aws-ahug-overrides" ] extends: [ ".aws-ahug-aarch64", ".build" ]
aws-ahug-aarch64-pr-build:
extends: [ ".aws-ahug-aarch64", ".pr-build" ]
trigger: trigger:
include: include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: aws-ahug-aarch64-pr-generate job: aws-ahug-aarch64-generate
strategy: depend strategy: depend
needs: needs:
- artifacts: True - artifacts: True
job: aws-ahug-aarch64-pr-generate job: aws-ahug-aarch64-generate
aws-ahug-aarch64-protected-build:
extends: [ ".aws-ahug-aarch64", ".protected-build" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: aws-ahug-aarch64-protected-generate
strategy: depend
needs:
- artifacts: True
job: aws-ahug-aarch64-protected-generate
######################################## ########################################
# AWS ISC Applications (x86_64) # AWS ISC Applications (x86_64)
@ -795,34 +614,19 @@ aws-ahug-aarch64-protected-build:
variables: variables:
SPACK_CI_STACK_NAME: aws-isc SPACK_CI_STACK_NAME: aws-isc
aws-isc-pr-generate: aws-isc-generate:
extends: [ ".aws-isc", ".pr-generate", ".aws-isc-overrides", ".tags-x86_64_v4" ] extends: [ ".aws-isc", ".generate", ".aws-isc-overrides", ".tags-x86_64_v4" ]
aws-isc-protected-generate: aws-isc-build:
extends: [ ".aws-isc", ".protected-generate", ".aws-isc-overrides", ".tags-x86_64_v4" ] extends: [ ".aws-isc", ".build" ]
aws-isc-pr-build:
extends: [ ".aws-isc", ".pr-build" ]
trigger: trigger:
include: include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: aws-isc-pr-generate job: aws-isc-generate
strategy: depend strategy: depend
needs: needs:
- artifacts: True - artifacts: True
job: aws-isc-pr-generate job: aws-isc-generate
aws-isc-protected-build:
extends: [ ".aws-isc", ".protected-build" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: aws-isc-protected-generate
strategy: depend
needs:
- artifacts: True
job: aws-isc-protected-generate
# Parallel Pipeline for aarch64 (reuses override image, but generates and builds on aarch64) # Parallel Pipeline for aarch64 (reuses override image, but generates and builds on aarch64)
@ -831,33 +635,19 @@ aws-isc-protected-build:
variables: variables:
SPACK_CI_STACK_NAME: aws-isc-aarch64 SPACK_CI_STACK_NAME: aws-isc-aarch64
aws-isc-aarch64-pr-generate: aws-isc-aarch64-generate:
extends: [ ".aws-isc-aarch64", ".pr-generate-aarch64", ".aws-isc-overrides" ] extends: [ ".aws-isc-aarch64", ".generate-aarch64", ".aws-isc-overrides" ]
aws-isc-aarch64-protected-generate: aws-isc-aarch64-build:
extends: [ ".aws-isc-aarch64", ".protected-generate-aarch64", ".aws-isc-overrides" ] extends: [ ".aws-isc-aarch64", ".build" ]
aws-isc-aarch64-pr-build:
extends: [ ".aws-isc-aarch64", ".pr-build" ]
trigger: trigger:
include: include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: aws-isc-aarch64-pr-generate job: aws-isc-aarch64-generate
strategy: depend strategy: depend
needs: needs:
- artifacts: True - artifacts: True
job: aws-isc-aarch64-pr-generate job: aws-isc-aarch64-generate
aws-isc-aarch64-protected-build:
extends: [ ".aws-isc-aarch64", ".protected-build" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: aws-isc-aarch64-protected-generate
strategy: depend
needs:
- artifacts: True
job: aws-isc-aarch64-protected-generate
######################################## ########################################
@ -868,35 +658,20 @@ aws-isc-aarch64-protected-build:
variables: variables:
SPACK_CI_STACK_NAME: tutorial SPACK_CI_STACK_NAME: tutorial
tutorial-pr-generate: tutorial-generate:
extends: [ ".tutorial", ".pr-generate"] extends: [ ".tutorial", ".generate"]
image: ghcr.io/spack/tutorial-ubuntu-22.04:v2023-05-07 image: ghcr.io/spack/tutorial-ubuntu-22.04:v2023-05-07
tutorial-protected-generate: tutorial-build:
extends: [ ".tutorial", ".protected-generate"] extends: [ ".tutorial", ".build" ]
image: ghcr.io/spack/tutorial-ubuntu-22.04:v2023-05-07
tutorial-pr-build:
extends: [ ".tutorial", ".pr-build" ]
trigger: trigger:
include: include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: tutorial-pr-generate job: tutorial-generate
strategy: depend strategy: depend
needs: needs:
- artifacts: True - artifacts: True
job: tutorial-pr-generate job: tutorial-generate
tutorial-protected-build:
extends: [ ".tutorial", ".protected-build" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: tutorial-protected-generate
strategy: depend
needs:
- artifacts: True
job: tutorial-protected-generate
####################################### #######################################
# Machine Learning - Linux x86_64 (CPU) # Machine Learning - Linux x86_64 (CPU)
@ -906,37 +681,20 @@ tutorial-protected-build:
variables: variables:
SPACK_CI_STACK_NAME: ml-linux-x86_64-cpu SPACK_CI_STACK_NAME: ml-linux-x86_64-cpu
.ml-linux-x86_64-cpu-generate: ml-linux-x86_64-cpu-generate:
extends: [ .ml-linux-x86_64-cpu, ".tags-x86_64_v4" ] extends: [ ".generate", .ml-linux-x86_64-cpu, ".tags-x86_64_v4" ]
image: ghcr.io/spack/linux-ubuntu22.04-x86_64_v2:nightly image: ghcr.io/spack/linux-ubuntu22.04-x86_64_v2:nightly
ml-linux-x86_64-cpu-pr-generate: ml-linux-x86_64-cpu-build:
extends: [ ".pr-generate", ".ml-linux-x86_64-cpu-generate" ] extends: [ ".build", ".ml-linux-x86_64-cpu" ]
ml-linux-x86_64-cpu-protected-generate:
extends: [ ".protected-generate", ".ml-linux-x86_64-cpu-generate" ]
ml-linux-x86_64-cpu-pr-build:
extends: [ ".pr-build", ".ml-linux-x86_64-cpu" ]
trigger: trigger:
include: include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: ml-linux-x86_64-cpu-pr-generate job: ml-linux-x86_64-cpu-generate
strategy: depend strategy: depend
needs: needs:
- artifacts: True - artifacts: True
job: ml-linux-x86_64-cpu-pr-generate job: ml-linux-x86_64-cpu-generate
ml-linux-x86_64-cpu-protected-build:
extends: [ ".protected-build", ".ml-linux-x86_64-cpu" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: ml-linux-x86_64-cpu-protected-generate
strategy: depend
needs:
- artifacts: True
job: ml-linux-x86_64-cpu-protected-generate
######################################## ########################################
# Machine Learning - Linux x86_64 (CUDA) # Machine Learning - Linux x86_64 (CUDA)
@ -946,37 +704,20 @@ ml-linux-x86_64-cpu-protected-build:
variables: variables:
SPACK_CI_STACK_NAME: ml-linux-x86_64-cuda SPACK_CI_STACK_NAME: ml-linux-x86_64-cuda
.ml-linux-x86_64-cuda-generate: ml-linux-x86_64-cuda-generate:
extends: [ .ml-linux-x86_64-cuda, ".tags-x86_64_v4" ] extends: [ ".generate", .ml-linux-x86_64-cuda, ".tags-x86_64_v4" ]
image: ghcr.io/spack/linux-ubuntu22.04-x86_64_v2:nightly image: ghcr.io/spack/linux-ubuntu22.04-x86_64_v2:nightly
ml-linux-x86_64-cuda-pr-generate: ml-linux-x86_64-cuda-build:
extends: [ ".pr-generate", ".ml-linux-x86_64-cuda-generate" ] extends: [ ".build", ".ml-linux-x86_64-cuda" ]
ml-linux-x86_64-cuda-protected-generate:
extends: [ ".protected-generate", ".ml-linux-x86_64-cuda-generate" ]
ml-linux-x86_64-cuda-pr-build:
extends: [ ".pr-build", ".ml-linux-x86_64-cuda" ]
trigger: trigger:
include: include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: ml-linux-x86_64-cuda-pr-generate job: ml-linux-x86_64-cuda-generate
strategy: depend strategy: depend
needs: needs:
- artifacts: True - artifacts: True
job: ml-linux-x86_64-cuda-pr-generate job: ml-linux-x86_64-cuda-generate
ml-linux-x86_64-cuda-protected-build:
extends: [ ".protected-build", ".ml-linux-x86_64-cuda" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: ml-linux-x86_64-cuda-protected-generate
strategy: depend
needs:
- artifacts: True
job: ml-linux-x86_64-cuda-protected-generate
######################################## ########################################
# Machine Learning - Linux x86_64 (ROCm) # Machine Learning - Linux x86_64 (ROCm)
@ -986,38 +727,20 @@ ml-linux-x86_64-cuda-protected-build:
variables: variables:
SPACK_CI_STACK_NAME: ml-linux-x86_64-rocm SPACK_CI_STACK_NAME: ml-linux-x86_64-rocm
.ml-linux-x86_64-rocm-generate: ml-linux-x86_64-rocm-generate:
extends: [ .ml-linux-x86_64-rocm, ".tags-x86_64_v4" ] extends: [ ".generate", .ml-linux-x86_64-rocm, ".tags-x86_64_v4" ]
image: ghcr.io/spack/linux-ubuntu22.04-x86_64_v2:nightly image: ghcr.io/spack/linux-ubuntu22.04-x86_64_v2:nightly
ml-linux-x86_64-rocm-pr-generate: ml-linux-x86_64-rocm-build:
extends: [ ".pr-generate", ".ml-linux-x86_64-rocm-generate" ] extends: [ ".build", ".ml-linux-x86_64-rocm" ]
ml-linux-x86_64-rocm-protected-generate:
extends: [ ".protected-generate", ".ml-linux-x86_64-rocm-generate" ]
ml-linux-x86_64-rocm-pr-build:
extends: [ ".pr-build", ".ml-linux-x86_64-rocm" ]
trigger: trigger:
include: include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: ml-linux-x86_64-rocm-pr-generate job: ml-linux-x86_64-rocm-generate
strategy: depend strategy: depend
needs: needs:
- artifacts: True - artifacts: True
job: ml-linux-x86_64-rocm-pr-generate job: ml-linux-x86_64-rocm-generate
ml-linux-x86_64-rocm-protected-build:
extends: [ ".protected-build", ".ml-linux-x86_64-rocm" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: ml-linux-x86_64-rocm-protected-generate
strategy: depend
needs:
- artifacts: True
job: ml-linux-x86_64-rocm-protected-generate
######################################## ########################################
# Deprecated CI testing # Deprecated CI testing
@ -1026,30 +749,16 @@ ml-linux-x86_64-rocm-protected-build:
variables: variables:
SPACK_CI_STACK_NAME: deprecated SPACK_CI_STACK_NAME: deprecated
deprecated-ci-pr-generate: deprecated-ci-generate:
extends: [ ".pr-generate-deprecated", ".deprecated-ci" ] extends: [ ".generate-deprecated", ".deprecated-ci" ]
deprecated-ci-protected-generate: deprecated-ci-build:
extends: [ ".protected-generate-deprecated", ".deprecated-ci" ] extends: [ ".build", ".deprecated-ci" ]
deprecated-ci-pr-build:
extends: [ ".pr-build", ".deprecated-ci" ]
trigger: trigger:
include: include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml - artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: deprecated-ci-pr-generate job: deprecated-ci-generate
strategy: depend strategy: depend
needs: needs:
- artifacts: True - artifacts: True
job: deprecated-ci-pr-generate job: deprecated-ci-generate
deprecated-ci-protected-build:
extends: [ ".protected-build", ".deprecated-ci" ]
trigger:
include:
- artifact: jobs_scratch_dir/cloud-ci-pipeline.yml
job: deprecated-ci-protected-generate
strategy: depend
needs:
- artifacts: True
job: deprecated-ci-protected-generate

View File

@ -36,6 +36,34 @@ ci:
- aws s3 sync --exclude "*" --include "*spec.json.sig*" /tmp ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache - aws s3 sync --exclude "*" --include "*spec.json.sig*" /tmp ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache
- aws s3 cp /tmp/public_keys ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/_pgp --recursive --exclude "*" --include "*.pub" - aws s3 cp /tmp/public_keys ${SPACK_REMOTE_MIRROR_OVERRIDE}/build_cache/_pgp --recursive --exclude "*" --include "*.pub"
- copy-job:
tags: ["service", "x86_64"]
image: "ghcr.io/spack/python-aws-bash:0.0.1"
before_script:
- - if [[ $CI_COMMIT_TAG == "v"* ]]; then export SPACK_REPLACE_VERSION=$(echo "$CI_COMMIT_TAG" | sed 's/\(v[[:digit:]]\+\.[[:digit:]]\+\).*/releases\/\1/'); fi
- if [[ $CI_COMMIT_TAG == "develop-"* ]]; then export SPACK_REPLACE_VERSION=develop; fi
- export SPACK_BUILDCACHE_SOURCE=${SPACK_SOURCE_MIRROR//SPACK_REPLACE_VERSION/${SPACK_REPLACE_VERSION}}
script:
- - cd ${SPACK_CONCRETE_ENV_DIR}
- spack env activate --without-view .
- echo Copying environment specs from ${SRC_MIRROR} to ${SPACK_BUILDCACHE_DESTINATION}
- spack buildcache sync "${SPACK_BUILDCACHE_SOURCE}" "${SPACK_BUILDCACHE_DESTINATION}"
- curl -fLsS https://spack.github.io/keys/spack-public-binary-key.pub -o /tmp/spack-public-binary-key.pub
- aws s3 cp /tmp/spack-public-binary-key.pub "${SPACK_BUILDCACHE_DESTINATION}/build_cache/_pgp/spack-public-binary-key.pub"
- spack buildcache update-index --keys "${SPACK_BUILDCACHE_DESTINATION}"
when: "always"
retry:
max: 2
when:
- "runner_system_failure"
- "stuck_or_timeout_failure"
- "script_failure"
interruptible: true
variables:
CI_JOB_SIZE: "medium"
KUBERNETES_CPU_REQUEST: "4000m"
KUBERNETES_MEMORY_REQUEST: "16G"
- reindex-job: - reindex-job:
tags: ["service"] tags: ["service"]
variables: variables: