Skip to content
Snippets Groups Projects
Unverified Commit 20403466 authored by Timo Furrer's avatar Timo Furrer
Browse files

Refine pipeline job rules

parent 77e280a1
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,6 @@ include: ...@@ -14,7 +14,6 @@ include:
- .gitlab-ci.yml - .gitlab-ci.yml
- tests/unit.gitlab-ci.yml - tests/unit.gitlab-ci.yml
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- local: tests/integration.gitlab-ci.yml - local: tests/integration.gitlab-ci.yml
rules: rules:
- changes: - changes:
...@@ -27,6 +26,7 @@ include: ...@@ -27,6 +26,7 @@ include:
- tests/iac/**.tf - tests/iac/**.tf
- backports/*.gitlab-ci.yml - backports/*.gitlab-ci.yml
- backports/OpenTofu/*.gitlab-ciyml - backports/OpenTofu/*.gitlab-ciyml
- if: $CI_COMMIT_TAG
# FIXME: we cannot make this work for all use cases because of the following: # FIXME: we cannot make this work for all use cases because of the following:
# - cannot pass parallel.matrix to the component, thus we need to extend it # - cannot pass parallel.matrix to the component, thus we need to extend it
# - that leads to a problem that when this component is ruled out, the extended job fails, # - that leads to a problem that when this component is ruled out, the extended job fails,
...@@ -108,6 +108,15 @@ gitlab-opentofu-image:build: ...@@ -108,6 +108,15 @@ gitlab-opentofu-image:build:
--provenance=false --provenance=false
--push --push
. .
rules:
- if: $CI_COMMIT_TAG
- changes:
- Dockerfile
- .gitlab-ci.yml
- src/**/*
- templates/**/*
- tests/**/*
- backports/**/*
check-readme: check-readme:
stage: test stage: test
...@@ -118,6 +127,14 @@ check-readme: ...@@ -118,6 +127,14 @@ check-readme:
script: script:
- make docs - make docs
- git diff --exit-code - git diff --exit-code
rules:
- if: $CI_COMMIT_TAG
- changes:
- Makefile
- .gitlab-ci.yml
- README.md
- .gitlab/README.md.template
- templates/**/*
check-backports: check-backports:
stage: test stage: test
...@@ -128,6 +145,13 @@ check-backports: ...@@ -128,6 +145,13 @@ check-backports:
script: script:
- make backports - make backports
- git diff --exit-code - git diff --exit-code
rules:
- if: $CI_COMMIT_TAG
- changes:
- Makefile
- .gitlab-ci.yml
- backports/**/*
- templates/**/*
shellcheck: shellcheck:
stage: test stage: test
...@@ -142,7 +166,6 @@ shellcheck: ...@@ -142,7 +166,6 @@ shellcheck:
- src/gitlab-tofu.sh - src/gitlab-tofu.sh
- .gitlab/scripts/*.sh - .gitlab/scripts/*.sh
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# FIXME: see component include why we have to disable this. # FIXME: see component include why we have to disable this.
# container_scanning: # container_scanning:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment