Skip to content

Commit

Permalink
Move config to new per-source config
Browse files Browse the repository at this point in the history
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
  • Loading branch information
simonbaird committed Oct 17, 2023
1 parent f2b3ff1 commit 057ee67
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 85 deletions.
16 changes: 7 additions & 9 deletions default/policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
[]
12 changes: 5 additions & 7 deletions everything/policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
[]
12 changes: 5 additions & 7 deletions github-default/policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
[]
12 changes: 5 additions & 7 deletions minimal/policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
[]
14 changes: 6 additions & 8 deletions redhat-no-hermetic/policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 5 additions & 7 deletions redhat/policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
[]
14 changes: 6 additions & 8 deletions slsa1/policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
[]
16 changes: 7 additions & 9 deletions slsa2/policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
[]
18 changes: 8 additions & 10 deletions slsa3/policy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
[]
12 changes: 5 additions & 7 deletions src/policy-github.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
11 changes: 5 additions & 6 deletions src/policy-rhtap.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}

0 comments on commit 057ee67

Please sign in to comment.