From 47efdc63346fcfe3bb48c4ee8db870c453416514 Mon Sep 17 00:00:00 2001 From: lcarva Date: Fri, 10 May 2024 09:02:13 +0000 Subject: [PATCH] sync ec-cli task definitions --- .../0.1/verify-definition.yaml | 4 ++-- .../0.1/verify-enterprise-contract.yaml | 19 ++++++++++++------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/tasks/verify-definition/0.1/verify-definition.yaml b/tasks/verify-definition/0.1/verify-definition.yaml index 54786f9..8d058f9 100644 --- a/tasks/verify-definition/0.1/verify-definition.yaml +++ b/tasks/verify-definition/0.1/verify-definition.yaml @@ -60,13 +60,13 @@ spec: value: "$(params.HOMEDIR)" steps: - name: version - image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:39e5ff875e7b5eb99573735166894829c9856b69adf51a325e58aaba01d63ff8 + image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:a536ecae450d0e129d045454316f3808445bb0038271bc86a165f89548283bbd command: [ec] args: - version - name: validate workingDir: "$(workspaces.output.path)" - image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:39e5ff875e7b5eb99573735166894829c9856b69adf51a325e58aaba01d63ff8 + image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:a536ecae450d0e129d045454316f3808445bb0038271bc86a165f89548283bbd command: [ec] args: - validate diff --git a/tasks/verify-enterprise-contract/0.1/verify-enterprise-contract.yaml b/tasks/verify-enterprise-contract/0.1/verify-enterprise-contract.yaml index 8974e92..0abad08 100644 --- a/tasks/verify-enterprise-contract/0.1/verify-enterprise-contract.yaml +++ b/tasks/verify-enterprise-contract/0.1/verify-enterprise-contract.yaml @@ -110,6 +110,10 @@ spec: type: string description: Run policy checks with the provided time. default: "now" + - name: EXTRA_RULE_DATA + type: string + description: Merge additional Rego variables into the policy data. Use syntax "key=value,key2=value2..." + default: "" workspaces: - name: data @@ -127,13 +131,13 @@ spec: steps: - name: version - image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:39e5ff875e7b5eb99573735166894829c9856b69adf51a325e58aaba01d63ff8 + image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:a536ecae450d0e129d045454316f3808445bb0038271bc86a165f89548283bbd command: [ec] args: - version - name: initialize-tuf - image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:39e5ff875e7b5eb99573735166894829c9856b69adf51a325e58aaba01d63ff8 + image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:a536ecae450d0e129d045454316f3808445bb0038271bc86a165f89548283bbd script: |- set -euo pipefail @@ -150,7 +154,7 @@ spec: value: "$(params.TUF_MIRROR)" - name: validate - image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:39e5ff875e7b5eb99573735166894829c9856b69adf51a325e58aaba01d63ff8 + image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:a536ecae450d0e129d045454316f3808445bb0038271bc86a165f89548283bbd command: [ec] args: - validate @@ -170,6 +174,7 @@ spec: - "--strict=false" - "--show-successes" - "--effective-time=$(params.EFFECTIVE_TIME)" + - "--extra-rule-data=$(params.EXTRA_RULE_DATA)" - "--output" - "yaml=$(params.HOMEDIR)/report.yaml" - "--output" @@ -199,26 +204,26 @@ spec: memory: 2Gi - name: report - image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:39e5ff875e7b5eb99573735166894829c9856b69adf51a325e58aaba01d63ff8 + image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:a536ecae450d0e129d045454316f3808445bb0038271bc86a165f89548283bbd command: [cat] args: - "$(params.HOMEDIR)/report.yaml" - name: report-json - image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:39e5ff875e7b5eb99573735166894829c9856b69adf51a325e58aaba01d63ff8 + image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:a536ecae450d0e129d045454316f3808445bb0038271bc86a165f89548283bbd command: [cat] args: - "$(params.HOMEDIR)/report-json.json" - name: summary - image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:39e5ff875e7b5eb99573735166894829c9856b69adf51a325e58aaba01d63ff8 + image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:a536ecae450d0e129d045454316f3808445bb0038271bc86a165f89548283bbd command: [jq] args: - "." - "$(results.TEST_OUTPUT.path)" - name: assert - image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:39e5ff875e7b5eb99573735166894829c9856b69adf51a325e58aaba01d63ff8 + image: quay.io/enterprise-contract/ec-cli:snapshot@sha256:a536ecae450d0e129d045454316f3808445bb0038271bc86a165f89548283bbd command: [jq] args: - "--argjson"