From 971ad0d0c5ba5084d2aeb294b96df7093e58fcaa Mon Sep 17 00:00:00 2001 From: Cecile Robert-Michon Date: Thu, 23 Mar 2023 22:42:54 +0000 Subject: [PATCH] CAPZ: use regex to run e2e only on relevant files --- ...luster-api-provider-azure-presubmits-main.yaml | 15 ++++++--------- ...provider-azure-presubmits-release-v1beta1.yaml | 15 +++++---------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/config/jobs/kubernetes-sigs/cluster-api-provider-azure/cluster-api-provider-azure-presubmits-main.yaml b/config/jobs/kubernetes-sigs/cluster-api-provider-azure/cluster-api-provider-azure-presubmits-main.yaml index f83dd2d3a2df..2588200916a0 100644 --- a/config/jobs/kubernetes-sigs/cluster-api-provider-azure/cluster-api-provider-azure-presubmits-main.yaml +++ b/config/jobs/kubernetes-sigs/cluster-api-provider-azure/cluster-api-provider-azure-presubmits-main.yaml @@ -56,8 +56,7 @@ presubmits: path_alias: "sigs.k8s.io/cluster-api-provider-azure" optional: false decorate: true - # please see: https://play.golang.org/p/JJSVylVPd53 for more insights - run_if_changed: (^[^d].*$)|(^d$)|(^.[^o].*$)|(^do$)|(^..[^c].*$)|(^doc$)|(^...[^s].*$)|(^docs$)|(^....[^/].*$)|(^[^d][^o][^c][^s]/.*$) + skip_if_only_changed: "^docs/|^\\.github/|\\.md$|^(\\.codespellignore|LICENSE|OWNERS|OWNERS_ALIASES|PROJECT|SECURITY_CONTACTS|Tiltfile|metadata\\.yaml|netlify\\.toml|tilt-provider\\.json)$" max_concurrency: 5 labels: preset-dind-enabled: "true" @@ -126,8 +125,7 @@ presubmits: decorate: true decoration_config: timeout: 4h - # please see: https://play.golang.org/p/JJSVylVPd53 for more insights - run_if_changed: (^[^d].*$)|(^d$)|(^.[^o].*$)|(^do$)|(^..[^c].*$)|(^doc$)|(^...[^s].*$)|(^docs$)|(^....[^/].*$)|(^[^d][^o][^c][^s]/.*$) + skip_if_only_changed: "^docs/|^\\.github/|\\.md$|^(\\.codespellignore|LICENSE|OWNERS|OWNERS_ALIASES|PROJECT|SECURITY_CONTACTS|Tiltfile|metadata\\.yaml|netlify\\.toml|tilt-provider\\.json)$" max_concurrency: 5 labels: preset-dind-enabled: "true" @@ -216,7 +214,7 @@ presubmits: path_alias: "sigs.k8s.io/cluster-api-provider-azure" always_run: false optional: true - run_if_changed: 'test\/e2e|templates\/test|scripts\/ci-conformance.sh' + run_if_changed: 'test\/e2e|templates\/test|scripts\/ci-conformance.sh|Makefile' decorate: true decoration_config: timeout: 4h @@ -250,7 +248,7 @@ presubmits: always_run: false optional: true decorate: true - run_if_changed: 'test\/e2e|templates\/test|scripts\/ci-conformance.sh' + run_if_changed: 'test\/e2e|templates\/test|scripts\/ci-conformance.sh|Makefile' decoration_config: timeout: 4h max_concurrency: 5 @@ -289,7 +287,7 @@ presubmits: path_alias: "sigs.k8s.io/cluster-api-provider-azure" always_run: false optional: true - run_if_changed: 'test\/e2e|templates\/test|scripts\/ci-conformance.sh' + run_if_changed: 'test\/e2e|templates\/test|scripts\/ci-conformance.sh|Makefile' decorate: true decoration_config: timeout: 4h @@ -479,8 +477,7 @@ presubmits: path_alias: "sigs.k8s.io/cluster-api-provider-azure" optional: false decorate: true - # please see: https://play.golang.org/p/JJSVylVPd53 for more insights - run_if_changed: (^[^d].*$)|(^d$)|(^.[^o].*$)|(^do$)|(^..[^c].*$)|(^doc$)|(^...[^s].*$)|(^docs$)|(^....[^/].*$)|(^[^d][^o][^c][^s]/.*$) + skip_if_only_changed: "^docs/|^\\.github/|\\.md$|^(\\.codespellignore|LICENSE|OWNERS|OWNERS_ALIASES|PROJECT|SECURITY_CONTACTS|Tiltfile|metadata\\.yaml|netlify\\.toml|tilt-provider\\.json)$" max_concurrency: 5 labels: preset-dind-enabled: "true" diff --git a/config/jobs/kubernetes-sigs/cluster-api-provider-azure/cluster-api-provider-azure-presubmits-release-v1beta1.yaml b/config/jobs/kubernetes-sigs/cluster-api-provider-azure/cluster-api-provider-azure-presubmits-release-v1beta1.yaml index f57fd17742a5..f99179cad680 100644 --- a/config/jobs/kubernetes-sigs/cluster-api-provider-azure/cluster-api-provider-azure-presubmits-release-v1beta1.yaml +++ b/config/jobs/kubernetes-sigs/cluster-api-provider-azure/cluster-api-provider-azure-presubmits-release-v1beta1.yaml @@ -36,8 +36,7 @@ presubmits: path_alias: "sigs.k8s.io/cluster-api-provider-azure" optional: false decorate: true - # please see: https://play.golang.org/p/JJSVylVPd53 for more insights - run_if_changed: (^[^d].*$)|(^d$)|(^.[^o].*$)|(^do$)|(^..[^c].*$)|(^doc$)|(^...[^s].*$)|(^docs$)|(^....[^/].*$)|(^[^d][^o][^c][^s]/.*$) + skip_if_only_changed: "^docs/|^\\.github/|\\.md$|^(\\.codespellignore|LICENSE|OWNERS|OWNERS_ALIASES|PROJECT|SECURITY_CONTACTS|Tiltfile|metadata\\.yaml|netlify\\.toml|tilt-provider\\.json)$" max_concurrency: 5 labels: preset-dind-enabled: "true" @@ -69,8 +68,7 @@ presubmits: path_alias: "sigs.k8s.io/cluster-api-provider-azure" optional: false decorate: true - # please see: https://play.golang.org/p/JJSVylVPd53 for more insights - run_if_changed: (^[^d].*$)|(^d$)|(^.[^o].*$)|(^do$)|(^..[^c].*$)|(^doc$)|(^...[^s].*$)|(^docs$)|(^....[^/].*$)|(^[^d][^o][^c][^s]/.*$) + skip_if_only_changed: "^docs/|^\\.github/|\\.md$|^(\\.codespellignore|LICENSE|OWNERS|OWNERS_ALIASES|PROJECT|SECURITY_CONTACTS|Tiltfile|metadata\\.yaml|netlify\\.toml|tilt-provider\\.json)$" max_concurrency: 5 labels: preset-dind-enabled: "true" @@ -137,8 +135,7 @@ presubmits: path_alias: "sigs.k8s.io/cluster-api-provider-azure" optional: true decorate: true - # please see: https://play.golang.org/p/JJSVylVPd53 for more insights - run_if_changed: (^[^d].*$)|(^d$)|(^.[^o].*$)|(^do$)|(^..[^c].*$)|(^doc$)|(^...[^s].*$)|(^docs$)|(^....[^/].*$)|(^[^d][^o][^c][^s]/.*$) + skip_if_only_changed: "^docs/|^\\.github/|\\.md$|^(\\.codespellignore|LICENSE|OWNERS|OWNERS_ALIASES|PROJECT|SECURITY_CONTACTS|Tiltfile|metadata\\.yaml|netlify\\.toml|tilt-provider\\.json)$" max_concurrency: 5 labels: preset-dind-enabled: "true" @@ -172,8 +169,7 @@ presubmits: decorate: true decoration_config: timeout: 4h - # please see: https://play.golang.org/p/JJSVylVPd53 for more insights - run_if_changed: (^[^d].*$)|(^d$)|(^.[^o].*$)|(^do$)|(^..[^c].*$)|(^doc$)|(^...[^s].*$)|(^docs$)|(^....[^/].*$)|(^[^d][^o][^c][^s]/.*$) + skip_if_only_changed: "^docs/|^\\.github/|\\.md$|^(\\.codespellignore|LICENSE|OWNERS|OWNERS_ALIASES|PROJECT|SECURITY_CONTACTS|Tiltfile|metadata\\.yaml|netlify\\.toml|tilt-provider\\.json)$" max_concurrency: 5 labels: preset-dind-enabled: "true" @@ -313,8 +309,7 @@ presubmits: path_alias: "sigs.k8s.io/cluster-api-provider-azure" optional: false decorate: true - # please see: https://play.golang.org/p/JJSVylVPd53 for more insights - run_if_changed: (^[^d].*$)|(^d$)|(^.[^o].*$)|(^do$)|(^..[^c].*$)|(^doc$)|(^...[^s].*$)|(^docs$)|(^....[^/].*$)|(^[^d][^o][^c][^s]/.*$) + skip_if_only_changed: "^docs/|^\\.github/|\\.md$|^(\\.codespellignore|LICENSE|OWNERS|OWNERS_ALIASES|PROJECT|SECURITY_CONTACTS|Tiltfile|metadata\\.yaml|netlify\\.toml|tilt-provider\\.json)$" max_concurrency: 5 labels: preset-dind-enabled: "true"