Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(KONFLUX-4136): add new reduce step #1969

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/modules/ROOT/pages/verify-enterprise-contract.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ paths can be provided by using the `:` separator.
*WORKERS* (`string`):: Number of parallel workers to use for policy evaluation.
+
*Default*: `1`
*SINGLE_COMPONENT* (`string`):: Reduce the Snapshot to only the component whose build caused the Snapshot to be created
+
*Default*: `false`
*SINGLE_COMPONENT_CUSTOM_RESOURCE* (`string`):: Name, including kind, of the Kubernetes resource to query for labels when single component mode is enabled, e.g. pr/somepipeline.

+
*Default*: `unknown`
*SINGLE_COMPONENT_CUSTOM_RESOURCE_NS* (`string`):: Kubernetes namespace where the SINGLE_COMPONENT_NAME is found. Only used when single component mode is enabled.


== Results

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,25 @@ spec:
description: Number of parallel workers to use for policy evaluation.
default: "1"

- name: SINGLE_COMPONENT
description: Reduce the Snapshot to only the component whose build caused the Snapshot to be created
type: string
default: "false"

- name: SINGLE_COMPONENT_CUSTOM_RESOURCE
description: >
Name, including kind, of the Kubernetes resource to query for labels when single
component mode is enabled, e.g. pr/somepipeline.
type: string
default: "unknown"

- name: SINGLE_COMPONENT_CUSTOM_RESOURCE_NS
description: >
Kubernetes namespace where the SINGLE_COMPONENT_NAME is found. Only used
when single component mode is enabled.
type: string
default: ""

workspaces:
- name: data
description: The workspace where the snapshot spec json file resides
Expand Down Expand Up @@ -168,6 +187,21 @@ spec:
- name: TUF_MIRROR
value: "$(params.TUF_MIRROR)"

- name: reduce
env:
- name: SNAPSHOT
value: $(params.IMAGES)
- name: SINGLE_COMPONENT
value: $(params.SINGLE_COMPONENT)
- name: CUSTOM_RESOURCE
value: $(params.SINGLE_COMPONENT_CUSTOM_RESOURCE)
- name: CUSTOM_RESOURCE_NAMESPACE
value: $(params.SINGLE_COMPONENT_CUSTOM_RESOURCE_NS)
- name: SNAPSHOT_PATH
value: $(params.HOMEDIR)/snapshot.json
image: quay.io/enterprise-contract/ec-cli:snapshot
onError: continue # progress even if the step fails so we can see the debug logs
command: [reduce-snapshot.sh]
- name: validate
image: quay.io/enterprise-contract/ec-cli:snapshot
onError: continue # progress even if the step fails so we can see the debug logs
Expand All @@ -177,7 +211,7 @@ spec:
- image
- "--verbose"
- "--images"
- "$(params.IMAGES)"
- "/tekton/home/snapshot.json"
- "--policy"
- "$(params.POLICY_CONFIGURATION)"
- "--public-key"
Expand Down
Loading