Skip to content

Commit

Permalink
Merge pull request #1969 from scoheb/KONFLUX-4136-update-task
Browse files Browse the repository at this point in the history
feat(KONFLUX-4136): add new reduce step
  • Loading branch information
lcarva authored Sep 18, 2024
2 parents c796ba5 + 908b47d commit 120ea78
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
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

0 comments on commit 120ea78

Please sign in to comment.