Skip to content
Snippets Groups Projects
Verified Commit 2d8d7343 authored by Sheogorath's avatar Sheogorath :european_castle:
Browse files

ci(images): Reduce builds by only check for changes from default branch

This patch tries to use the GitLab CI feature that allows to
detect changes from a specific branch, in this case the default
branch, and this way hopefully reduces the amount of
unnecessarily build images that originate from gitlab starting
a full build by default on a new branch.

References:
https://docs.gitlab.com/15.4/ee/ci/yaml/#ruleschangescompare_to
parent 4c172abb
No related branches found
No related tags found
No related merge requests found
...@@ -36,4 +36,6 @@ chart-helm-unittest: ...@@ -36,4 +36,6 @@ chart-helm-unittest:
rules: rules:
- if: '$CI_PIPELINE_SOURCE == "push"' - if: '$CI_PIPELINE_SOURCE == "push"'
changes: changes:
paths:
- charts/${CHART}/**/* - charts/${CHART}/**/*
compare_to: $CI_DEFAULT_BRANCH
...@@ -54,7 +54,9 @@ container-build-dev: ...@@ -54,7 +54,9 @@ container-build-dev:
rules: rules:
- if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push"' - if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "push"'
changes: changes:
paths:
- images/${IMAGE}/**/* - images/${IMAGE}/**/*
- images/.utils/* - images/.utils/*
compare_to: $CI_DEFAULT_BRANCH
tags: tags:
- hetzner - hetzner
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment