Pipelines: Set a pipeline type variable (#24505)

Spack pipelines need to take specific actions internally that depend
on whether the pipeline is being run on a PR to spack or a merge to
the develop branch.  Pipelines can also run in other repositories,
which represents other possible use cases than just the two mentioned
above.  This PR creates a "SPACK_PIPELINE_TYPE" gitlab variable which
is propagated to rebuild jobs, and is also used internally to determine
which pipeline-specific tasks to run.

One goal of the PR is fix an issue where rebuild jobs which failed on
develop pipelines did not properly report the broken full hash to the
"broken-specs-url".
This commit is contained in:
Scott Wittenburg
2021-06-24 16:15:19 -06:00
committed by GitHub
parent 010b431692
commit d7405ddd39
4 changed files with 19 additions and 15 deletions

View File

@@ -12,13 +12,13 @@ default:
- /^github\/pr[\d]+_.*$/
variables:
SPACK_PR_BRANCH: ${CI_COMMIT_REF_NAME}
SPACK_IS_PR_PIPELINE: "True"
SPACK_PIPELINE_TYPE: "spack_pull_request"
.develop:
only:
- /^github\/develop$/
variables:
SPACK_IS_PR_PIPELINE: "False"
SPACK_PIPELINE_TYPE: "spack_protected_branch"
.generate:
stage: generate