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

Define yamllint job explicitly in each pipeline

The yamllint job was included in the pipeline implicitly via the
inclusion of common.yml. This is not very transparent. Make the common
definition a base job and extend it explicitly in each pipeline now.

Add infrastructure stage comment header into both yaml files.
parent 686323c6
No related branches found
No related tags found
No related merge requests found
......@@ -34,13 +34,18 @@ variables:
# Include git submodules
GIT_SUBMODULE_STRATEGY: recursive
yamllint:
.yamllint:
extends: .infrastructure
rules:
# Only run this job in the 'parent' pipeline in the manifest, not again in i
# the child pipeline.
# Only run this job in the parent pipeline in the manifest, not again in the child
# pipeline
- if: $CI_PIPELINE_SOURCE == "parent_pipeline"
when: never
- if: $CI_COMMIT_REF_NAME != $MASTER_BRANCH_MANIFEST || $CI_PIPELINE_SOURCE == "api"
# Usually run this job only on non-master branches, i.e. in merge requests
- if: $CI_COMMIT_REF_NAME != $MASTER_BRANCH_MANIFEST
# Additionally run this job if pipeline was triggered by the API, which happens e.g.
# when no pipeline has run in a merge request, so a full build pipeline is needed on
# the master
- if: $CI_PIPELINE_SOURCE == "api"
script:
- yamllint -c .gitlab-ci/.yamllint.yml .*.yml
---
# ---------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------
# Global
# ---------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------
include:
- local: common.yml
......@@ -40,10 +40,9 @@ workflow:
- if: $CI_PROJECT_ROOT_NAMESPACE == "seco-ne"
&& $CI_MERGE_REQUEST_SOURCE_PROJECT_ID == $CI_MERGE_REQUEST_PROJECT_ID
# ---------------------------------------------------------------------------------------
# integrate
# Create a commit in the manifest to pull this change
# ---------------------------------------------------------------------------------------
# --------------------------------------------------------------------------------------
# Stage: infrastructure
# --------------------------------------------------------------------------------------
integrate:
extends: .infrastructure
rules:
......@@ -80,6 +79,9 @@ integrate:
paths:
- manifest_revision
yamllint:
extends: .yamllint
# --------------------------------------------------------------------------------------
# Stage: merge
# --------------------------------------------------------------------------------------
......
......@@ -81,6 +81,9 @@ retrigger:
;
done
# --------------------------------------------------------------------------------------
# Stage: infrastructure
# --------------------------------------------------------------------------------------
generate-build-jobs:
extends: .infrastructure
rules:
......@@ -112,3 +115,6 @@ trigger-build-jobs:
- artifact: build-jobs.yml
job: generate-build-jobs
strategy: depend
yamllint:
extends: .yamllint
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