Skip to content
Snippets Groups Projects
Commit a0f7e84f authored by Tim Jaacks's avatar Tim Jaacks
Browse files

Rename pipeline stages to reflect YAML filenames

parent d25cdebf
No related branches found
No related tags found
1 merge request!204Rename pipeline stages to reflect YAML filenames
Pipeline #29476 waiting for manual action with stages
in 18 minutes and 24 seconds
...@@ -15,13 +15,14 @@ workflow: ...@@ -15,13 +15,14 @@ workflow:
- if: $CI_PIPELINE_SOURCE == "parent_pipeline" - if: $CI_PIPELINE_SOURCE == "parent_pipeline"
stages: stages:
- infrastructure - manifest-integration-jobs
# -------------------------------------------------------------------------------------- # --------------------------------------------------------------------------------------
# Stage: infrastructure # Merge request pipeline
# -------------------------------------------------------------------------------------- # --------------------------------------------------------------------------------------
integrate: integrate:
extends: .infrastructure extends: .infrastructure
stage: manifest-integration-jobs
rules: rules:
- if: $CI_MERGE_REQUEST_IID - if: $CI_MERGE_REQUEST_IID
cache: cache:
...@@ -47,37 +48,8 @@ integrate: ...@@ -47,37 +48,8 @@ integrate:
paths: paths:
- manifest_revision - manifest_revision
yamllint:
extends: .yamllint
# --------------------------------------------------------------------------------------
# Stage: merge
# --------------------------------------------------------------------------------------
merge:
extends: .infrastructure
rules:
- if: $CI_COMMIT_BRANCH == $SOURCE_BRANCH
script:
- cd ${CI_PROJECT_DIR}
- .gitlab-ci/scripts/merge_into_manifest.py
--gitlab-url=${CI_SERVER_URL}
--token=${GITBOT_TOKEN}
--manifest-project=${TARGET_PROJECT}
--manifest-branch=${TARGET_BRANCH}
--project=${CI_PROJECT_PATH}
--project-branch=${SOURCE_BRANCH}
--commit=${CI_COMMIT_SHA}
--save-revision-to=manifest_revision
--recipe-name=${BB_RECIPE_NAME}
artifacts:
paths:
- manifest_revision
# --------------------------------------------------------------------------------------
# Stage: build
# --------------------------------------------------------------------------------------
build: build:
stage: infrastructure stage: manifest-integration-jobs
needs: ["integrate"] needs: ["integrate"]
rules: rules:
# Do not run build if the "skip build" label is set on the merge request # Do not run build if the "skip build" label is set on the merge request
...@@ -91,11 +63,9 @@ build: ...@@ -91,11 +63,9 @@ build:
branch: "integrate/${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}/into/${TARGET_BRANCH}" branch: "integrate/${CI_PROJECT_NAME}/${CI_COMMIT_REF_NAME}/into/${TARGET_BRANCH}"
strategy: depend strategy: depend
# --------------------------------------------------------------------------------------
# Stage: check
# --------------------------------------------------------------------------------------
check: check:
extends: .infrastructure extends: .infrastructure
stage: manifest-integration-jobs
rules: rules:
# Do not run check if the "skip build" label is set on the merge request # Do not run check if the "skip build" label is set on the merge request
- if: $CI_MERGE_REQUEST_LABELS =~ /skip build/ - if: $CI_MERGE_REQUEST_LABELS =~ /skip build/
...@@ -128,3 +98,27 @@ check: ...@@ -128,3 +98,27 @@ check:
--project=${CI_PROJECT_PATH} --project=${CI_PROJECT_PATH}
--merge-request=${MERGE_REQUEST} --merge-request=${MERGE_REQUEST}
${PARENT_MR} ${PARENT_MR}
# --------------------------------------------------------------------------------------
# Master pipeline
# --------------------------------------------------------------------------------------
merge:
extends: .infrastructure
stage: manifest-integration-jobs
rules:
- if: $CI_COMMIT_BRANCH == $SOURCE_BRANCH
script:
- cd ${CI_PROJECT_DIR}
- .gitlab-ci/scripts/merge_into_manifest.py
--gitlab-url=${CI_SERVER_URL}
--token=${GITBOT_TOKEN}
--manifest-project=${TARGET_PROJECT}
--manifest-branch=${TARGET_BRANCH}
--project=${CI_PROJECT_PATH}
--project-branch=${SOURCE_BRANCH}
--commit=${CI_COMMIT_SHA}
--save-revision-to=manifest_revision
--recipe-name=${BB_RECIPE_NAME}
artifacts:
paths:
- manifest_revision
...@@ -12,7 +12,7 @@ workflow: ...@@ -12,7 +12,7 @@ workflow:
- if: $CI_PIPELINE_SOURCE == "parent_pipeline" - if: $CI_PIPELINE_SOURCE == "parent_pipeline"
stages: stages:
- infrastructure - manifest-integration-pipelines
# -------------------------------------------------------------------------------------- # --------------------------------------------------------------------------------------
# Generate job # Generate job
...@@ -29,6 +29,7 @@ stages: ...@@ -29,6 +29,7 @@ stages:
generate: generate:
extends: extends:
- .infrastructure - .infrastructure
stage: manifest-integration-pipelines
script: script:
# The job generation script implicitly passes the OS environment to the template, so # The job generation script implicitly passes the OS environment to the template, so
# that the template has access to all GitLab CI variables. Hence there is no need # that the template has access to all GitLab CI variables. Hence there is no need
...@@ -59,7 +60,7 @@ generate: ...@@ -59,7 +60,7 @@ generate:
or SOURCE_BRANCH == CI_COMMIT_REF_NAME %} or SOURCE_BRANCH == CI_COMMIT_REF_NAME %}
{{ TARGET_PROJECT }}:{{ TARGET_BRANCH }}: {{ TARGET_PROJECT }}:{{ TARGET_BRANCH }}:
stage: infrastructure stage: manifest-integration-pipelines
needs: needs:
- generate - generate
variables: variables:
......
...@@ -6,7 +6,7 @@ include: ...@@ -6,7 +6,7 @@ include:
- local: common.yml - local: common.yml
stages: stages:
- infrastructure - manifest-integration
variables: variables:
MANIFEST_FILE: "default.xml" MANIFEST_FILE: "default.xml"
...@@ -50,18 +50,18 @@ workflow: ...@@ -50,18 +50,18 @@ workflow:
# - if: $INTEGRATION =~ /^$CI_COMMIT_BRANCH:/m # - if: $INTEGRATION =~ /^$CI_COMMIT_BRANCH:/m
- if: $CI_COMMIT_BRANCH == $MASTER_BRANCH - if: $CI_COMMIT_BRANCH == $MASTER_BRANCH
# --------------------------------------------------------------------------------------
# Stage: infrastructure
# --------------------------------------------------------------------------------------
.skip-for-gitlab-ci-integrations: .skip-for-gitlab-ci-integrations:
rules: rules:
- if: $CI_COMMIT_REF_NAME !~ /^integrate\/gitlab-ci\/.*/ - if: $CI_COMMIT_REF_NAME !~ /^integrate\/gitlab-ci\/.*/
# --------------------------------------------------------------------------------------
# Manifest integration jobs
# --------------------------------------------------------------------------------------
generate-pipelines: generate-pipelines:
extends: extends:
- .infrastructure - .infrastructure
- .skip-for-gitlab-ci-integrations - .skip-for-gitlab-ci-integrations
stage: manifest-integration
script: script:
# The job generation script implicitly passes the OS environment to the template, so # The job generation script implicitly passes the OS environment to the template, so
# that the template has access to all GitLab CI variables. Hence there is no need # that the template has access to all GitLab CI variables. Hence there is no need
...@@ -77,7 +77,7 @@ generate-pipelines: ...@@ -77,7 +77,7 @@ generate-pipelines:
trigger-pipelines: trigger-pipelines:
extends: extends:
- .skip-for-gitlab-ci-integrations - .skip-for-gitlab-ci-integrations
stage: infrastructure stage: manifest-integration
needs: needs:
- generate-pipelines - generate-pipelines
trigger: trigger:
...@@ -87,5 +87,5 @@ trigger-pipelines: ...@@ -87,5 +87,5 @@ trigger-pipelines:
strategy: depend strategy: depend
yamllint: yamllint:
extends: extends: .yamllint
- .yamllint stage: manifest-integration
...@@ -6,8 +6,8 @@ include: ...@@ -6,8 +6,8 @@ include:
- local: common.yml - local: common.yml
stages: stages:
- manifest-pipeline
- retrigger - retrigger
- infrastructure
- build - build
workflow: workflow:
...@@ -37,6 +37,7 @@ workflow: ...@@ -37,6 +37,7 @@ workflow:
- if: $CI_PIPELINE_SOURCE == "api" - if: $CI_PIPELINE_SOURCE == "api"
- if: $CI_PIPELINE_SOURCE == "pipeline" - if: $CI_PIPELINE_SOURCE == "pipeline"
- if: $CI_PIPELINE_SOURCE == "web" - if: $CI_PIPELINE_SOURCE == "web"
stage: manifest-pipeline
.short_master_pipeline: .short_master_pipeline:
rules: rules:
...@@ -52,23 +53,7 @@ workflow: ...@@ -52,23 +53,7 @@ workflow:
- if: $CI_COMMIT_REF_NAME == $MASTER_BRANCH - if: $CI_COMMIT_REF_NAME == $MASTER_BRANCH
# -------------------------------------------------------------------------------------- # --------------------------------------------------------------------------------------
# Stage: retrigger # Full build pipeline (runs in merge requests, and on master if manually triggered)
# --------------------------------------------------------------------------------------
retrigger:
extends:
- .infrastructure
- .short_master_pipeline
stage: retrigger
script:
- .gitlab-ci/scripts/retrigger_integrating_projects.py
--gitlab-url=${CI_SERVER_URL}
--token=${GITBOT_TOKEN}
--manifest-project=${CI_PROJECT_PATH}
--manifest-branch=${MASTER_BRANCH}
--group=${RETRIGGER_GROUP}
# --------------------------------------------------------------------------------------
# Stage: infrastructure
# -------------------------------------------------------------------------------------- # --------------------------------------------------------------------------------------
generate-build-jobs: generate-build-jobs:
extends: extends:
...@@ -86,10 +71,9 @@ generate-build-jobs: ...@@ -86,10 +71,9 @@ generate-build-jobs:
paths: paths:
- build-jobs.yml - build-jobs.yml
trigger-build-jobs: build-jobs:
extends: extends:
- .full_build_pipeline - .full_build_pipeline
stage: infrastructure
needs: ["generate-build-jobs"] needs: ["generate-build-jobs"]
trigger: trigger:
include: include:
...@@ -103,8 +87,21 @@ yamllint: ...@@ -103,8 +87,21 @@ yamllint:
- .full_build_pipeline - .full_build_pipeline
# -------------------------------------------------------------------------------------- # --------------------------------------------------------------------------------------
# Stage: build # Short master pipeline (runs on master after merging a merge request)
# -------------------------------------------------------------------------------------- # --------------------------------------------------------------------------------------
retrigger:
extends:
- .infrastructure
- .short_master_pipeline
stage: retrigger
script:
- .gitlab-ci/scripts/retrigger_integrating_projects.py
--gitlab-url=${CI_SERVER_URL}
--token=${GITBOT_TOKEN}
--manifest-project=${CI_PROJECT_PATH}
--manifest-branch=${MASTER_BRANCH}
--group=${RETRIGGER_GROUP}
build:merge_request: build:merge_request:
extends: extends:
- .infrastructure - .infrastructure
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment