diff --git a/prow/jobs/kyma-project/keda-manager/keda-manager-build.yaml b/prow/jobs/kyma-project/keda-manager/keda-manager-build.yaml index 9987f40daa32..2cfe1cdc60fc 100644 --- a/prow/jobs/kyma-project/keda-manager/keda-manager-build.yaml +++ b/prow/jobs/kyma-project/keda-manager/keda-manager-build.yaml @@ -12,7 +12,7 @@ presubmits: # runs on PRs prow.k8s.io/pubsub.runID: "pre-keda-module-build" prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" - run_if_changed: '^keda.yaml$|^.env$|^hack/ci/*/.*$|^pkg/*/.*$|^controllers/*/.*$|^charts/*/.*$|^api/*/.*$|^config.yaml$|^Dockerfile$|^(go.mod|go.sum)$|^*/(.*.go|Makefile|.*.sh)|^PROJECT$|^config/*/.*$|^docs/*/.*$' + skip_if_only_changed: '^docs/|^examples/|\.md$' skip_report: false decorate: true cluster: untrusted-workload @@ -55,7 +55,7 @@ presubmits: # runs on PRs prow.k8s.io/pubsub.runID: "pre-keda-manager-operator-build" prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" - always_run: true + skip_if_only_changed: '^docs/|^examples/|\.md$' skip_report: false decorate: true cluster: untrusted-workload @@ -108,7 +108,7 @@ postsubmits: # runs on main prow.k8s.io/pubsub.runID: "post-keda-module-build" prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" - run_if_changed: '^keda.yaml$|^.env$|^hack/ci/*/.*$|^pkg/*/.*$|^controllers/*/.*$|^charts/*/.*$|^api/*/.*$|^config.yaml$|^Dockerfile$|^(go.mod|go.sum)$|^*/(.*.go|Makefile|.*.sh)|^PROJECT$|^config/*/.*$|^docs/*/.*$' + skip_if_only_changed: '^docs/|^examples/|\.md$' skip_report: false decorate: true cluster: trusted-workload @@ -150,7 +150,7 @@ postsubmits: # runs on main prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" preset-signify-prod-secret: "true" - always_run: true + skip_if_only_changed: '^docs/|^examples/|\.md$' skip_report: false decorate: true cluster: trusted-workload diff --git a/prow/jobs/kyma-project/keda-manager/keda-manager-lint.yaml b/prow/jobs/kyma-project/keda-manager/keda-manager-lint.yaml index f24e8137a812..7556aeeaa039 100644 --- a/prow/jobs/kyma-project/keda-manager/keda-manager-lint.yaml +++ b/prow/jobs/kyma-project/keda-manager/keda-manager-lint.yaml @@ -11,7 +11,7 @@ presubmits: # runs on PRs prow.k8s.io/pubsub.project: "sap-kyma-prow" prow.k8s.io/pubsub.runID: "pre-keda-manager-operator-lint" prow.k8s.io/pubsub.topic: "prowjobs" - run_if_changed: '^(go.mod|go.sum|main.go|.golangci.yaml)$|^*/(.*.go|Makefile|.*.sh)$' + always_run: true optional: true skip_report: false decorate: true diff --git a/prow/jobs/kyma-project/keda-manager/keda-manager-verify.yaml b/prow/jobs/kyma-project/keda-manager/keda-manager-verify.yaml index 4b1db75a5c72..3861802f519a 100644 --- a/prow/jobs/kyma-project/keda-manager/keda-manager-verify.yaml +++ b/prow/jobs/kyma-project/keda-manager/keda-manager-verify.yaml @@ -14,7 +14,7 @@ presubmits: # runs on PRs preset-dind-enabled: "true" preset-docker-push-repository-kyma: "true" preset-sa-kyma-push-images: "true" - run_if_changed: '^(go.mod|go.sum)$|^*/(.*.go|Makefile|Dockerfile|.*.sh)' + skip_if_only_changed: '^docs/|^examples/|\.md$' skip_report: false decorate: true cluster: untrusted-workload @@ -49,7 +49,7 @@ presubmits: # runs on PRs preset-dind-enabled: "true" preset-kind-volume-mounts: "true" preset-kyma-guard-bot-github-token: "true" - always_run: true + skip_if_only_changed: '^docs/|^examples/|\.md$' optional: false skip_report: false decorate: true @@ -98,7 +98,7 @@ postsubmits: # runs on main preset-dind-enabled: "true" preset-kind-volume-mounts: "true" preset-kyma-guard-bot-github-token: "true" - always_run: true + skip_if_only_changed: '^docs/|^examples/|\.md$' optional: true skip_report: false decorate: true @@ -144,7 +144,7 @@ postsubmits: # runs on main preset-dind-enabled: "true" preset-kind-volume-mounts: "true" preset-kyma-guard-bot-github-token: "true" - always_run: true + skip_if_only_changed: '^docs/|^examples/|\.md$' optional: true skip_report: false decorate: true diff --git a/prow/jobs/kyma-project/serverless/serverless-build-operator.yaml b/prow/jobs/kyma-project/serverless/serverless-build-operator.yaml index af358896b8da..03009571d7d6 100644 --- a/prow/jobs/kyma-project/serverless/serverless-build-operator.yaml +++ b/prow/jobs/kyma-project/serverless/serverless-build-operator.yaml @@ -12,7 +12,7 @@ presubmits: # runs on PRs prow.k8s.io/pubsub.runID: "pre-serverless-module-build" prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" - run_if_changed: '^config/operator/.*$|^sec-scanners-config.yaml$|^.version$|^module-config-template.yaml$' + run_if_changed: '^config/|^components/|^sec-scanners-config.yaml$|^.version$|^module-config-template.yaml$' skip_report: false decorate: true cluster: untrusted-workload @@ -56,7 +56,7 @@ presubmits: # runs on PRs prow.k8s.io/pubsub.runID: "pre-serverless-operator-build" prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" - always_run: true + run_if_changed: '^config/|^components/|^sec-scanners-config.yaml$|^.version$|^module-config-template.yaml$' skip_report: false decorate: true cluster: untrusted-workload @@ -113,7 +113,7 @@ postsubmits: # runs on main prow.k8s.io/pubsub.runID: "post-serverless-module-build" prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" - run_if_changed: '^config/operator/.*$|^sec-scanners-config.yaml$|^.version$|^module-config-template.yaml$' + run_if_changed: '^config/|^components/|^sec-scanners-config.yaml$|^.version$|^module-config-template.yaml$' skip_report: false decorate: true cluster: trusted-workload @@ -156,7 +156,7 @@ postsubmits: # runs on main prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" preset-signify-prod-secret: "true" - always_run: true + run_if_changed: '^config/|^components/|^sec-scanners-config.yaml$|^.version$|^module-config-template.yaml$' skip_report: false decorate: true cluster: trusted-workload diff --git a/prow/jobs/kyma-project/serverless/serverless-build.yaml b/prow/jobs/kyma-project/serverless/serverless-build.yaml index 4b13c7f49151..4f26dbc4eab3 100644 --- a/prow/jobs/kyma-project/serverless/serverless-build.yaml +++ b/prow/jobs/kyma-project/serverless/serverless-build.yaml @@ -12,7 +12,7 @@ presubmits: # runs on PRs prow.k8s.io/pubsub.runID: "pre-serverless-controller-build" prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" - run_if_changed: '^components/serverless/' + run_if_changed: '^components/serverless/|^config/serverless/' skip_report: false decorate: true cluster: untrusted-workload @@ -59,7 +59,7 @@ presubmits: # runs on PRs prow.k8s.io/pubsub.runID: "pre-serverless-webhook-build" prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" - run_if_changed: '^components/serverless/' + run_if_changed: '^components/serverless/|^config/serverless/' skip_report: false decorate: true cluster: untrusted-workload @@ -106,7 +106,7 @@ presubmits: # runs on PRs prow.k8s.io/pubsub.runID: "pre-serverless-jobinit-build" prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" - run_if_changed: '^components/serverless/' + run_if_changed: '^components/serverless/|^config/serverless/' skip_report: false decorate: true cluster: untrusted-workload @@ -153,7 +153,7 @@ presubmits: # runs on PRs prow.k8s.io/pubsub.runID: "pre-serverless-registry-gc-build" prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" - run_if_changed: '^components/serverless/' + run_if_changed: '^components/serverless/|^config/serverless/' optional: true skip_report: false decorate: true @@ -206,7 +206,7 @@ postsubmits: # runs on main prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" preset-signify-prod-secret: "true" - run_if_changed: '^components/serverless/' + run_if_changed: '^components/serverless/|^config/serverless/' skip_report: false decorate: true cluster: trusted-workload @@ -256,7 +256,7 @@ postsubmits: # runs on main prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" preset-signify-prod-secret: "true" - run_if_changed: '^components/serverless/' + run_if_changed: '^components/serverless/|^config/serverless/' skip_report: false decorate: true cluster: trusted-workload @@ -306,7 +306,7 @@ postsubmits: # runs on main prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" preset-signify-prod-secret: "true" - run_if_changed: '^components/serverless/' + run_if_changed: '^components/serverless/|^config/serverless/' skip_report: false decorate: true cluster: trusted-workload @@ -356,7 +356,7 @@ postsubmits: # runs on main prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" preset-signify-prod-secret: "true" - run_if_changed: '^components/serverless/' + run_if_changed: '^components/serverless/|^config/serverless/' optional: true skip_report: false decorate: true diff --git a/prow/jobs/kyma-project/serverless/serverless-lint.yaml b/prow/jobs/kyma-project/serverless/serverless-lint.yaml index 77878fdfe816..ecadcd6b3133 100644 --- a/prow/jobs/kyma-project/serverless/serverless-lint.yaml +++ b/prow/jobs/kyma-project/serverless/serverless-lint.yaml @@ -11,7 +11,7 @@ presubmits: # runs on PRs prow.k8s.io/pubsub.project: "sap-kyma-prow" prow.k8s.io/pubsub.runID: "pre-serverless-controller-lint" prow.k8s.io/pubsub.topic: "prowjobs" - run_if_changed: '^components/serverless/(.*\.go|.golangci.yaml)$' + run_if_changed: '^components/serverless/' optional: true skip_report: false decorate: true @@ -44,7 +44,7 @@ presubmits: # runs on PRs prow.k8s.io/pubsub.project: "sap-kyma-prow" prow.k8s.io/pubsub.runID: "pre-serverless-operator-lint" prow.k8s.io/pubsub.topic: "prowjobs" - run_if_changed: '^components/operator/(.*\.go|.golangci.yaml)$' + run_if_changed: '^components/operator/' optional: true skip_report: false decorate: true diff --git a/prow/jobs/kyma-project/serverless/serverless-verify.yaml b/prow/jobs/kyma-project/serverless/serverless-verify.yaml index e8d979a735e4..da1c74676717 100644 --- a/prow/jobs/kyma-project/serverless/serverless-verify.yaml +++ b/prow/jobs/kyma-project/serverless/serverless-verify.yaml @@ -11,7 +11,7 @@ presubmits: # runs on PRs prow.k8s.io/pubsub.project: "sap-kyma-prow" prow.k8s.io/pubsub.runID: "pre-serverless-controller-unit-test" prow.k8s.io/pubsub.topic: "prowjobs" - run_if_changed: '^components/serverless/.*\.go$' + run_if_changed: '^components/serverless/' skip_report: false decorate: true cluster: untrusted-workload @@ -34,18 +34,18 @@ presubmits: # runs on PRs requests: memory: 1Gi cpu: 100m - - name: pre-serverless-operator-tests + - name: pre-serverless-operator-unit-tests annotations: description: "serverless operator tests" owner: "otters" labels: prow.k8s.io/pubsub.project: "sap-kyma-prow" - prow.k8s.io/pubsub.runID: "pre-serverless-operator-tests" + prow.k8s.io/pubsub.runID: "pre-serverless-operator-unit-tests" prow.k8s.io/pubsub.topic: "prowjobs" preset-dind-enabled: "true" preset-docker-push-repository-kyma: "true" preset-sa-kyma-push-images: "true" - run_if_changed: '^(go.mod|go.sum)$|^*/(.*.go|Makefile|Dockerfile|.*.sh)' + run_if_changed: '^components/operator/' skip_report: false decorate: true cluster: untrusted-workload diff --git a/prow/jobs/kyma-project/warden/integration-test.yaml b/prow/jobs/kyma-project/warden/integration-test.yaml index 711f13aa90da..548d1e4418f0 100644 --- a/prow/jobs/kyma-project/warden/integration-test.yaml +++ b/prow/jobs/kyma-project/warden/integration-test.yaml @@ -13,7 +13,7 @@ presubmits: prow.k8s.io/pubsub.topic: "prowjobs" cluster: untrusted-workload decorate: true - run_if_changed: '.*\.go$|charts/' + skip_if_only_changed: '^docs/|\.md$' spec: containers: - image: europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-dind-k3d:v20231122-2a5515a2 diff --git a/prow/jobs/kyma-project/warden/warden.yaml b/prow/jobs/kyma-project/warden/warden.yaml index 41647b5ae0b8..5f611c2ec52c 100644 --- a/prow/jobs/kyma-project/warden/warden.yaml +++ b/prow/jobs/kyma-project/warden/warden.yaml @@ -12,7 +12,7 @@ presubmits: # runs on PRs prow.k8s.io/pubsub.runID: "pre-warden-admission-build" prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" - run_if_changed: '.*\.go|docker/admission/' + skip_if_only_changed: '^docs/|\.md$' skip_report: false decorate: true cluster: untrusted-workload @@ -59,7 +59,7 @@ presubmits: # runs on PRs prow.k8s.io/pubsub.runID: "pre-warden-operator-build" prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" - run_if_changed: '.*\.go|docker/operator/' + skip_if_only_changed: '^docs/|\.md$' skip_report: false decorate: true cluster: untrusted-workload @@ -106,7 +106,7 @@ presubmits: # runs on PRs prow.k8s.io/pubsub.runID: "pre-warden-module-build" prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" - run_if_changed: '^\.env$|^(go\.mod|go\.sum)$|^(.*/)?(.*\.go|Makefile|.*\.sh|.*\.yaml|Dockerfile)$|^PROJECT$' + skip_if_only_changed: '^docs/|\.md$' skip_report: false decorate: true cluster: untrusted-workload @@ -143,7 +143,7 @@ presubmits: # runs on PRs prow.k8s.io/pubsub.project: "sap-kyma-prow" prow.k8s.io/pubsub.runID: "pre-warden-lint" prow.k8s.io/pubsub.topic: "prowjobs" - run_if_changed: '^(go.mod|go.sum|.golangci.yaml)$|^*/(.*.go|Makefile|.*.sh)$' + always_run: true optional: true skip_report: false decorate: true @@ -176,7 +176,7 @@ presubmits: # runs on PRs prow.k8s.io/pubsub.project: "sap-kyma-prow" prow.k8s.io/pubsub.runID: "pre-warden-unit-test" prow.k8s.io/pubsub.topic: "prowjobs" - run_if_changed: '.*\.go$' + skip_if_only_changed: '^docs/|\.md$' skip_report: false decorate: true cluster: untrusted-workload @@ -213,7 +213,7 @@ postsubmits: # runs on main prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" preset-signify-prod-secret: "true" - run_if_changed: '.*\.go|docker/admission/' + skip_if_only_changed: '^docs/|\.md$' skip_report: false decorate: true cluster: trusted-workload @@ -262,7 +262,7 @@ postsubmits: # runs on main prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" preset-signify-prod-secret: "true" - run_if_changed: '.*\.go|docker/operator/' + skip_if_only_changed: '^docs/|\.md$' skip_report: false decorate: true cluster: trusted-workload @@ -310,7 +310,7 @@ postsubmits: # runs on main prow.k8s.io/pubsub.runID: "post-warden-module-build" prow.k8s.io/pubsub.topic: "prowjobs" preset-sa-kyma-push-images: "true" - run_if_changed: '^\.env$|^(go\.mod|go\.sum)$|^(.*/)?(.*\.go|Makefile|.*\.sh|.*\.yaml|Dockerfile)$|^PROJECT$' + skip_if_only_changed: '^docs/|\.md$' skip_report: false decorate: true cluster: trusted-workload @@ -349,7 +349,7 @@ postsubmits: # runs on main prow.k8s.io/pubsub.topic: "prowjobs" preset-dind-enabled: "true" preset-kind-volume-mounts: "true" - always_run: true + skip_if_only_changed: '^docs/|\.md$' optional: true skip_report: false decorate: true diff --git a/templates/data/keda-manager.yaml b/templates/data/keda-manager.yaml index d2337e45d20e..b2231705cdd8 100644 --- a/templates/data/keda-manager.yaml +++ b/templates/data/keda-manager.yaml @@ -33,6 +33,8 @@ templates: limits: limits_memory: 3Gi limits_cpu: 2 + skip_if_only_changed_documentation: + skip_if_only_changed: '^docs/|^examples/|\.md$' jobConfigs: - repoName: github.com/kyma-project/keda-manager jobs: @@ -48,7 +50,6 @@ templates: MODULE_REGISTRY: "europe-docker.pkg.dev/kyma-project/dev/unsigned" IMG: "europe-docker.pkg.dev/kyma-project/dev/keda-manager:PR-${PULL_NUMBER}" MODULE_SHA: "PR-${PULL_NUMBER}" - run_if_changed: "^keda.yaml$|^.env$|^hack/ci/*/.*$|^pkg/*/.*$|^controllers/*/.*$|^charts/*/.*$|^api/*/.*$|^config.yaml$|^Dockerfile$|^(go.mod|go.sum)$|^*/(.*.go|Makefile|.*.sh)|^PROJECT$|^config/*/.*$|^docs/*/.*$" command: "make" args: - "-C" @@ -61,6 +62,8 @@ templates: - image_buildpack-golang # takes latest golang image - jobConfig_default - jobConfig_presubmit + local: + - skip_if_only_changed_documentation - jobConfig: name: post-keda-module-build annotations: @@ -72,7 +75,6 @@ templates: KUSTOMIZE_VERSION: "v4.5.6" MODULE_REGISTRY: "europe-docker.pkg.dev/kyma-project/prod/unsigned" IMG: "europe-docker.pkg.dev/kyma-project/prod/keda-manager:${PULL_BASE_SHA}" - run_if_changed: "^keda.yaml$|^.env$|^hack/ci/*/.*$|^pkg/*/.*$|^controllers/*/.*$|^charts/*/.*$|^api/*/.*$|^config.yaml$|^Dockerfile$|^(go.mod|go.sum)$|^*/(.*.go|Makefile|.*.sh)|^PROJECT$|^config/*/.*$|^docs/*/.*$" command: "make" args: - "-C" @@ -85,12 +87,13 @@ templates: - image_buildpack-golang # takes latest golang image - jobConfig_default - jobConfig_postsubmit + local: + - skip_if_only_changed_documentation - jobConfig: name: pre-keda-manager-operator-build annotations: owner: otters description: keda operator build job - always_run: true args: - "--name=keda-manager" - "--config=/config/kaniko-build-config.yaml" @@ -102,12 +105,12 @@ templates: - jobConfig_presubmit local: - job_build + - skip_if_only_changed_documentation - jobConfig: name: post-keda-manager-operator-build annotations: owner: otters description: keda module build job - always_run: true labels: preset-signify-prod-secret: "true" args: @@ -123,6 +126,7 @@ templates: - jobConfig_postsubmit local: - job_build + - skip_if_only_changed_documentation - jobConfig: name: release-keda-manager-build annotations: @@ -180,7 +184,7 @@ templates: - jobConfig: name: pre-keda-manager-operator-lint image: "europe-docker.pkg.dev/kyma-project/prod/test-infra/golangci-lint:v20230821-fdb47ca7" - run_if_changed: "^(go.mod|go.sum|main.go|.golangci.yaml)$|^*/(.*.go|Makefile|.*.sh)$" + always_run: true annotations: owner: otters description: executes the 'golangci-lint lint' command on keda-manager before any pull request. @@ -211,6 +215,8 @@ templates: request_cpu: "3" limits_memory: "4Gi" limits_cpu: "3" + skip_if_only_changed_documentation: + skip_if_only_changed: '^docs/|^examples/|\.md$' jobConfigs: - repoName: github.com/kyma-project/keda-manager jobs: @@ -219,7 +225,6 @@ templates: annotations: owner: otters description: keda operator tests - run_if_changed: "^(go.mod|go.sum)$|^*/(.*.go|Makefile|Dockerfile|.*.sh)" command: "bash" args: - "-c" @@ -233,12 +238,13 @@ templates: - jobConfig_presubmit - build_labels # default labels - unprivileged + local: + - skip_if_only_changed_documentation - jobConfig: name: pre-keda-manager-verify annotations: owner: otters description: runs keda manager verity job on k3d VM - always_run: "true" optional: "false" args: - bash @@ -253,12 +259,12 @@ templates: - extra_refs_test-infra local: - dind_job_k3d + - skip_if_only_changed_documentation - jobConfig: name: post-keda-manager-verify annotations: owner: otters description: runs keda manager verity job on k3d VM - always_run: "true" optional: "true" args: - bash @@ -273,12 +279,12 @@ templates: - extra_refs_test-infra local: - dind_job_k3d + - skip_if_only_changed_documentation - jobConfig: name: post-keda-manager-upgrade-latest-to-main annotations: owner: otters description: upgrade keda manager test - always_run: "true" optional: "true" args: - bash @@ -293,6 +299,7 @@ templates: - extra_refs_test-infra local: - dind_job_k3d + - skip_if_only_changed_documentation - jobConfig: name: keda-operator-nightly-periodic cron: "0 6 * * 1-5" # "Runs on 7 am every day-of-week from Monday through Friday." diff --git a/templates/data/serverless.yaml b/templates/data/serverless.yaml index cd99b580af9e..1d54d9814177 100644 --- a/templates/data/serverless.yaml +++ b/templates/data/serverless.yaml @@ -2,6 +2,9 @@ templates: - from: generic.tmpl render: - to: ../../prow/jobs/kyma-project/serverless/serverless-build.yaml + localSets: + run_if_changed_serverless: + run_if_changed: "^components/serverless/|^config/serverless/" jobConfigs: - repoName: kyma-project/serverless jobs: @@ -10,7 +13,6 @@ templates: annotations: owner: otters description: function controller build job - run_if_changed: "^components/serverless/" args: - "--name=function-controller" - "--config=/config/kaniko-build-config.yaml" @@ -20,6 +22,8 @@ templates: global: - kaniko_buildpack - jobConfig_presubmit + local: + - run_if_changed_serverless - jobConfig: name: post-serverless-controller-build annotations: @@ -27,7 +31,6 @@ templates: description: function controller build job labels: preset-signify-prod-secret: "true" - run_if_changed: "^components/serverless/" args: - "--name=function-controller" - "--config=/config/kaniko-build-config.yaml" @@ -39,12 +42,13 @@ templates: - kaniko_buildpack - jobConfig_postsubmit - disable_testgrid + local: + - run_if_changed_serverless - jobConfig: name: pre-serverless-webhook-build annotations: owner: otters description: function webhook build job - run_if_changed: "^components/serverless/" args: - "--name=function-webhook" - "--config=/config/kaniko-build-config.yaml" @@ -54,6 +58,8 @@ templates: global: - kaniko_buildpack - jobConfig_presubmit + local: + - run_if_changed_serverless - jobConfig: name: post-serverless-webhook-build annotations: @@ -61,7 +67,6 @@ templates: description: function webhook build job labels: preset-signify-prod-secret: "true" - run_if_changed: "^components/serverless/" args: - "--name=function-webhook" - "--config=/config/kaniko-build-config.yaml" @@ -73,12 +78,13 @@ templates: - kaniko_buildpack - jobConfig_postsubmit - disable_testgrid + local: + - run_if_changed_serverless - jobConfig: name: pre-serverless-jobinit-build annotations: owner: otters description: function jobinit build job - run_if_changed: "^components/serverless/" args: - "--name=function-build-init" - "--config=/config/kaniko-build-config.yaml" @@ -88,6 +94,8 @@ templates: global: - kaniko_buildpack - jobConfig_presubmit + local: + - run_if_changed_serverless - jobConfig: name: post-serverless-jobinit-build annotations: @@ -95,7 +103,6 @@ templates: description: function jobinit build job labels: preset-signify-prod-secret: "true" - run_if_changed: "^components/serverless/" args: - "--name=function-build-init" - "--config=/config/kaniko-build-config.yaml" @@ -107,12 +114,13 @@ templates: - kaniko_buildpack - jobConfig_postsubmit - disable_testgrid + local: + - run_if_changed_serverless - jobConfig: name: pre-serverless-registry-gc-build annotations: owner: otters description: function registry build job - run_if_changed: "^components/serverless/" optional: "true" args: - "--name=function-registry-gc" @@ -123,6 +131,8 @@ templates: global: - kaniko_buildpack - jobConfig_presubmit + local: + - run_if_changed_serverless - jobConfig: name: post-serverless-registry-gc-build annotations: @@ -130,7 +140,6 @@ templates: description: function registry build job labels: preset-signify-prod-secret: "true" - run_if_changed: "^components/serverless/" optional: "true" args: - "--name=function-registry-gc" @@ -143,6 +152,8 @@ templates: - kaniko_buildpack - jobConfig_postsubmit - "disable_testgrid" + local: + - run_if_changed_serverless - from: generic.tmpl render: - to: ../../prow/jobs/kyma-project/serverless/serverless-build-runtimes.yaml @@ -293,6 +304,8 @@ templates: branches: - "^main$" - "^release-*" + run_if_changed_module_data: + run_if_changed: "^config/|^components/|^sec-scanners-config.yaml$|^.version$|^module-config-template.yaml$" jobConfigs: - repoName: kyma-project/serverless jobs: @@ -308,7 +321,6 @@ templates: MODULE_REGISTRY: "europe-docker.pkg.dev/kyma-project/dev/unsigned" IMG: "europe-docker.pkg.dev/kyma-project/dev/serverless-operator:PR-${PULL_NUMBER}" MODULE_SHA: "PR-${PULL_NUMBER}" - run_if_changed: "^config/operator/.*$|^sec-scanners-config.yaml$|^.version$|^module-config-template.yaml$" command: "make" args: - "-C" @@ -321,6 +333,7 @@ templates: - jobConfig_presubmit local: - job_branches + - run_if_changed_module_data - jobConfig: name: post-serverless-module-build annotations: @@ -332,7 +345,6 @@ templates: KUSTOMIZE_VERSION: "v4.5.6" MODULE_REGISTRY: "europe-docker.pkg.dev/kyma-project/prod/unsigned" IMG: "europe-docker.pkg.dev/kyma-project/prod/serverless-operator:${PULL_BASE_SHA}" - run_if_changed: "^config/operator/.*$|^sec-scanners-config.yaml$|^.version$|^module-config-template.yaml$" command: "make" args: - "-C" @@ -345,12 +357,12 @@ templates: - jobConfig_postsubmit local: - job_branches + - run_if_changed_module_data - jobConfig: name: pre-serverless-operator-build annotations: owner: otters description: serverless operator image build - always_run: true command: sh args: - -c @@ -366,12 +378,13 @@ templates: - image-builder-buildkit local: - job_branches + # this image is used by module-build job and this run_if_changed must be superset of run_if_changed in that job + - run_if_changed_module_data - jobConfig: name: post-serverless-operator-build annotations: owner: otters description: build serverless operator - always_run: true labels: preset-signify-prod-secret: "true" command: sh @@ -391,6 +404,8 @@ templates: - image-builder-buildkit local: - job_branches + # this image is used by module-build job and this run_if_changed must be superset of run_if_changed in that job + - run_if_changed_module_data - jobConfig: name: release-serverless-module-build annotations: @@ -457,7 +472,7 @@ templates: args: - "-c" - "cd components/serverless && golangci-lint run -v && echo 'OK!'" - run_if_changed: '^components/serverless/(.*\.go|.golangci.yaml)$' + run_if_changed: '^components/serverless/' branches: - ^main$ inheritedConfigs: @@ -475,7 +490,7 @@ templates: args: - "-c" - "cd components/operator && golangci-lint run -v && echo 'OK!'" - run_if_changed: '^components/operator/(.*\.go|.golangci.yaml)$' + run_if_changed: '^components/operator/' branches: - ^main$ inheritedConfigs: @@ -556,18 +571,18 @@ templates: - "-C" - "components/serverless" - "test" - run_if_changed: '^components/serverless/.*\.go$' + run_if_changed: '^components/serverless/' inheritedConfigs: global: - jobConfig_presubmit - testing - unprivileged - jobConfig: - name: pre-serverless-operator-tests + name: pre-serverless-operator-unit-tests annotations: owner: otters description: serverless operator tests - run_if_changed: "^(go.mod|go.sum)$|^*/(.*.go|Makefile|Dockerfile|.*.sh)" + run_if_changed: '^components/operator/' command: "make" args: - "-C" diff --git a/templates/data/warden.yaml b/templates/data/warden.yaml index da8879d37d65..42439cb3aba4 100644 --- a/templates/data/warden.yaml +++ b/templates/data/warden.yaml @@ -18,6 +18,8 @@ templates: preset-dind-enabled: "true" image: europe-docker.pkg.dev/kyma-project/prod/testimages/e2e-dind-k3d:v20231122-2a5515a2 command: "/init.sh" + skip_if_only_changed_documentation: + skip_if_only_changed: '^docs/|\.md$' jobConfigs: - repoName: "github.com/kyma-project/warden" jobs: @@ -31,11 +33,12 @@ templates: - "--config=/config/kaniko-build-config.yaml" - "--context=." - "--dockerfile=docker/admission/Dockerfile" - run_if_changed: '.*\.go|docker/admission/' inheritedConfigs: global: - kaniko_buildpack - jobConfig_presubmit + local: + - skip_if_only_changed_documentation - jobConfig: name: post-warden-admission-build annotations: @@ -49,11 +52,12 @@ templates: - "--context=." - "--dockerfile=docker/admission/Dockerfile" - "--tag=latest" - run_if_changed: '.*\.go|docker/admission/' inheritedConfigs: global: - kaniko_buildpack - jobConfig_postsubmit + local: + - skip_if_only_changed_documentation - jobConfig: name: pre-warden-operator-build annotations: @@ -64,11 +68,12 @@ templates: - "--config=/config/kaniko-build-config.yaml" - "--context=." - "--dockerfile=docker/operator/Dockerfile" - run_if_changed: '.*\.go|docker/operator/' inheritedConfigs: global: - kaniko_buildpack - jobConfig_presubmit + local: + - skip_if_only_changed_documentation - jobConfig: name: post-warden-operator-build annotations: @@ -82,11 +87,12 @@ templates: - "--context=." - "--dockerfile=docker/operator/Dockerfile" - "--tag=latest" - run_if_changed: '.*\.go|docker/operator/' inheritedConfigs: global: - kaniko_buildpack - jobConfig_postsubmit + local: + - skip_if_only_changed_documentation - jobConfig: name: pre-warden-module-build annotations: @@ -97,7 +103,6 @@ templates: env: MODULE_REGISTRY: "europe-docker.pkg.dev/kyma-project/dev/unsigned" MODULE_SHA: "PR-${PULL_NUMBER}" - run_if_changed: "^\\.env$|^(go\\.mod|go\\.sum)$|^(.*/)?(.*\\.go|Makefile|.*\\.sh|.*\\.yaml|Dockerfile)$|^PROJECT$" command: "make" args: - "ci-module-build" @@ -109,6 +114,8 @@ templates: - image_buildpack-golang # takes latest golang image - jobConfig_default - jobConfig_presubmit + local: + - skip_if_only_changed_documentation - jobConfig: name: post-warden-module-build annotations: @@ -119,7 +126,6 @@ templates: env: MODULE_REGISTRY: "europe-docker.pkg.dev/kyma-project/prod/unsigned" MODULE_SHA: "${PULL_BASE_SHA}" - run_if_changed: "^\\.env$|^(go\\.mod|go\\.sum)$|^(.*/)?(.*\\.go|Makefile|.*\\.sh|.*\\.yaml|Dockerfile)$|^PROJECT$" command: "make" args: - "ci-module-build" @@ -131,13 +137,14 @@ templates: - image_buildpack-golang # takes latest golang image - jobConfig_default - jobConfig_postsubmit + local: + - skip_if_only_changed_documentation - jobConfig: name: post-warden-verify annotations: owner: otters description: LM intergration test optional: true - always_run: true args: - "bash" - "-c" @@ -149,11 +156,12 @@ templates: - jobConfig_postsubmit local: - e2e_dind + - skip_if_only_changed_documentation - jobConfig: image: "europe-docker.pkg.dev/kyma-project/prod/test-infra/golangci-lint:v20230821-fdb47ca7" name: pre-warden-lint optional: true - run_if_changed: "^(go.mod|go.sum|.golangci.yaml)$|^*/(.*.go|Makefile|.*.sh)$" + always_run: true annotations: owner: otters description: executes the 'golangci-lint lint' command before any pull request. @@ -177,10 +185,10 @@ templates: - "test" env: TEST_COVER_OUT: ${ARTIFACTS}/filtered.cov - run_if_changed: '.*\.go$' inheritedConfigs: global: - "jobConfig_presubmit" - "unprivileged" local: - testing + - skip_if_only_changed_documentation