From 8a4da2fa5a751205887e411e4ff2b561b3769305 Mon Sep 17 00:00:00 2001 From: Vincent Demeester Date: Thu, 7 Dec 2023 14:53:02 +0100 Subject: [PATCH] =?UTF-8?q?Add=20SkipIfOnlyChanged=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … to skip building if we are only editing some files that do not affect the tasks. Signed-off-by: Vincent Demeester --- internal/prowgen/config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/prowgen/config.go b/internal/prowgen/config.go index e77a047..16b8982 100644 --- a/internal/prowgen/config.go +++ b/internal/prowgen/config.go @@ -17,6 +17,8 @@ import ( prowv1 "k8s.io/test-infra/prow/apis/prowjobs/v1" ) +var skipIfOnlyChanged = "^(LICENSE|OWNERS|README\.md|\.gitignore|\.goreleaser\.yaml)$|^docs/|^subsystem/|^examples/\^.github/" + type Repository struct { Repo string `json:"repository" yaml:"repository"` Branches []string `json:"branches" yaml:"branches"` @@ -257,6 +259,7 @@ func generateTestFromConfig(repo *Repository) ([]cioperatorapi.TestStepConfigura }}, Workflow: stringPtr("generic-claim"), }, + SkipIfOnlyChanged: skipIfOnlyChanged, }) } default: