From 057ee67589804a7abe410217b123c15dc903439f Mon Sep 17 00:00:00 2001 From: Simon Baird Date: Thu, 5 Oct 2023 11:54:02 -0400 Subject: [PATCH] Move config to new per-source config The old style global config still works, but since the referenced Jira was complete, it's now deprecated. Ref: https://issues.redhat.com/browse/HACBS-2428 --- default/policy.yaml | 16 +++++++--------- everything/policy.yaml | 12 +++++------- github-default/policy.yaml | 12 +++++------- minimal/policy.yaml | 12 +++++------- redhat-no-hermetic/policy.yaml | 14 ++++++-------- redhat/policy.yaml | 12 +++++------- slsa1/policy.yaml | 14 ++++++-------- slsa2/policy.yaml | 16 +++++++--------- slsa3/policy.yaml | 18 ++++++++---------- src/policy-github.yaml.tmpl | 12 +++++------- src/policy-rhtap.yaml.tmpl | 11 +++++------ 11 files changed, 64 insertions(+), 85 deletions(-) diff --git a/default/policy.yaml b/default/policy.yaml index b6f8da4..e51d99d 100644 --- a/default/policy.yaml +++ b/default/policy.yaml @@ -32,12 +32,10 @@ sources: data: - oci::quay.io/redhat-appstudio-tekton-catalog/data-acceptable-bundles:latest - github.com/release-engineering/rhtap-ec-policy//data - -configuration: - include: - - '@slsa1' - - '@slsa2' - - '@slsa3' - - exclude: - [] + config: + include: + - '@slsa1' + - '@slsa2' + - '@slsa3' + exclude: + [] diff --git a/everything/policy.yaml b/everything/policy.yaml index 0347ba9..a78bb8a 100644 --- a/everything/policy.yaml +++ b/everything/policy.yaml @@ -32,10 +32,8 @@ sources: data: - oci::quay.io/redhat-appstudio-tekton-catalog/data-acceptable-bundles:latest - github.com/release-engineering/rhtap-ec-policy//data - -configuration: - include: - - '*' - - exclude: - [] + config: + include: + - '*' + exclude: + [] diff --git a/github-default/policy.yaml b/github-default/policy.yaml index 62a04c6..c76a99d 100644 --- a/github-default/policy.yaml +++ b/github-default/policy.yaml @@ -15,10 +15,8 @@ sources: - github.com/enterprise-contract/ec-policies//policy/lib - github.com/enterprise-contract/ec-policies//policy/release data: [] - -configuration: - include: - - '@github' - - exclude: - [] + config: + include: + - '@github' + exclude: + [] diff --git a/minimal/policy.yaml b/minimal/policy.yaml index 7033f95..6ea3247 100644 --- a/minimal/policy.yaml +++ b/minimal/policy.yaml @@ -34,10 +34,8 @@ sources: data: - oci::quay.io/redhat-appstudio-tekton-catalog/data-acceptable-bundles:latest - github.com/release-engineering/rhtap-ec-policy//data - -configuration: - include: - - '@minimal' - - exclude: - [] + config: + include: + - '@minimal' + exclude: + [] diff --git a/redhat-no-hermetic/policy.yaml b/redhat-no-hermetic/policy.yaml index 894c400..f6d96eb 100644 --- a/redhat-no-hermetic/policy.yaml +++ b/redhat-no-hermetic/policy.yaml @@ -32,11 +32,9 @@ sources: data: - oci::quay.io/redhat-appstudio-tekton-catalog/data-acceptable-bundles:latest - github.com/release-engineering/rhtap-ec-policy//data - -configuration: - include: - - '@redhat' - - exclude: - - hermetic_build_task - - tasks.required_tasks_found:prefetch-dependencies + config: + include: + - '@redhat' + exclude: + - hermetic_build_task + - tasks.required_tasks_found:prefetch-dependencies diff --git a/redhat/policy.yaml b/redhat/policy.yaml index 9f462e0..17541f9 100644 --- a/redhat/policy.yaml +++ b/redhat/policy.yaml @@ -32,10 +32,8 @@ sources: data: - oci::quay.io/redhat-appstudio-tekton-catalog/data-acceptable-bundles:latest - github.com/release-engineering/rhtap-ec-policy//data - -configuration: - include: - - '@redhat' - - exclude: - [] + config: + include: + - '@redhat' + exclude: + [] diff --git a/slsa1/policy.yaml b/slsa1/policy.yaml index ad61142..b2fa0d9 100644 --- a/slsa1/policy.yaml +++ b/slsa1/policy.yaml @@ -34,11 +34,9 @@ sources: data: - oci::quay.io/redhat-appstudio-tekton-catalog/data-acceptable-bundles:latest - github.com/release-engineering/rhtap-ec-policy//data - -configuration: - include: - - '@minimal' - - '@slsa1' - - exclude: - [] + config: + include: + - '@minimal' + - '@slsa1' + exclude: + [] diff --git a/slsa2/policy.yaml b/slsa2/policy.yaml index b72b7d8..8672175 100644 --- a/slsa2/policy.yaml +++ b/slsa2/policy.yaml @@ -34,12 +34,10 @@ sources: data: - oci::quay.io/redhat-appstudio-tekton-catalog/data-acceptable-bundles:latest - github.com/release-engineering/rhtap-ec-policy//data - -configuration: - include: - - '@minimal' - - '@slsa1' - - '@slsa2' - - exclude: - [] + config: + include: + - '@minimal' + - '@slsa1' + - '@slsa2' + exclude: + [] diff --git a/slsa3/policy.yaml b/slsa3/policy.yaml index 1f90a4d..091797f 100644 --- a/slsa3/policy.yaml +++ b/slsa3/policy.yaml @@ -32,13 +32,11 @@ sources: data: - oci::quay.io/redhat-appstudio-tekton-catalog/data-acceptable-bundles:latest - github.com/release-engineering/rhtap-ec-policy//data - -configuration: - include: - - '@minimal' - - '@slsa1' - - '@slsa2' - - '@slsa3' - - exclude: - [] + config: + include: + - '@minimal' + - '@slsa1' + - '@slsa2' + - '@slsa3' + exclude: + [] diff --git a/src/policy-github.yaml.tmpl b/src/policy-github.yaml.tmpl index 204fbb0..c5335db 100644 --- a/src/policy-github.yaml.tmpl +++ b/src/policy-github.yaml.tmpl @@ -20,11 +20,9 @@ sources: - github.com/enterprise-contract/ec-policies//policy/lib - github.com/enterprise-contract/ec-policies//policy/release data: [] - -configuration: - include: - {{ .include | toYAML | strings.Indent 4 | strings.TrimSpace }} - - exclude: - {{ .exclude | toYAML | strings.Indent 4 | strings.TrimSpace }} + config: + include: + {{ .include | toYAML | strings.Indent 8 | strings.TrimSpace }} + exclude: + {{ .exclude | toYAML | strings.Indent 8 | strings.TrimSpace }} {{- end -}} diff --git a/src/policy-rhtap.yaml.tmpl b/src/policy-rhtap.yaml.tmpl index 73d367e..08c3690 100644 --- a/src/policy-rhtap.yaml.tmpl +++ b/src/policy-rhtap.yaml.tmpl @@ -37,11 +37,10 @@ sources: data: - oci::quay.io/redhat-appstudio-tekton-catalog/data-acceptable-bundles:latest - github.com/release-engineering/rhtap-ec-policy//data + config: + include: + {{ .include | toYAML | strings.Indent 8 | strings.TrimSpace }} + exclude: + {{ .exclude | toYAML | strings.Indent 8 | strings.TrimSpace }} -configuration: - include: - {{ .include | toYAML | strings.Indent 4 | strings.TrimSpace }} - - exclude: - {{ .exclude | toYAML | strings.Indent 4 | strings.TrimSpace }} {{- end -}}