diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/ci.py | 20 | ||||
-rw-r--r-- | lib/spack/spack/schema/ci.py | 5 |
2 files changed, 21 insertions, 4 deletions
diff --git a/lib/spack/spack/ci.py b/lib/spack/spack/ci.py index f3d6398416..4589b5bca4 100644 --- a/lib/spack/spack/ci.py +++ b/lib/spack/spack/ci.py @@ -531,7 +531,7 @@ class SpackCI: """ 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 = { "jobs": {}, @@ -1207,7 +1207,7 @@ def generate_gitlab_ci_yaml( ).format(c_spec, release_spec) 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( "Pruning {0}/{1}, does not need rebuild.".format( release_spec.name, release_spec.dag_hash() @@ -1298,8 +1298,9 @@ def generate_gitlab_ci_yaml( max_length_needs = length_needs max_needs_job = job_name - output_object[job_name] = job_object - job_id += 1 + if spack_pipeline_type != "spack_copy_only": + output_object[job_name] = job_object + job_id += 1 if print_summary: for phase in phases: @@ -1329,6 +1330,17 @@ def generate_gitlab_ci_yaml( "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 temp_storage_url_prefix: # There were some rebuild jobs scheduled, so we will need to diff --git a/lib/spack/spack/schema/ci.py b/lib/spack/spack/schema/ci.py index 2c22f071de..667960f372 100644 --- a/lib/spack/spack/schema/ci.py +++ b/lib/spack/spack/schema/ci.py @@ -92,6 +92,11 @@ named_attributes_schema = { { "type": "object", "additionalProperties": False, + "properties": {"copy-job": attributes_schema, "copy-job-remove": attributes_schema}, + }, + { + "type": "object", + "additionalProperties": False, "properties": { "reindex-job": attributes_schema, "reindex-job-remove": attributes_schema, |