Skip to content

Commit

Permalink
Re-enable EC Task checks
Browse files Browse the repository at this point in the history
  • Loading branch information
lcarva committed Jan 29, 2024
1 parent fc7e8fa commit dd33949
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 35 deletions.
17 changes: 8 additions & 9 deletions .tekton/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,14 @@ spec:
workspaces:
- name: source
workspace: workspace
# This will be re-enabled as part of https://issues.redhat.com/browse/EC-332
# - name: ec-task-checks
# runAfter:
# - fetch-repository
# taskRef:
# name: ec-checks
# workspaces:
# - name: source
# workspace: workspace
- name: ec-task-checks
runAfter:
- fetch-repository
taskRef:
name: ec-checks
workspaces:
- name: source
workspace: workspace
- name: check-task-migration-md
runAfter:
- fetch-repository
Expand Down
8 changes: 8 additions & 0 deletions .tekton/push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ spec:
workspaces:
- name: output
workspace: workspace
- name: ec-task-checks
runAfter:
- clone-repository
taskRef:
name: ec-checks
workspaces:
- name: source
workspace: workspace
- name: build-container
params:
- name: IMAGE
Expand Down
44 changes: 18 additions & 26 deletions .tekton/tasks/ec-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,26 @@ spec:
- name: validate-all-tasks
workingDir: "$(workspaces.source.path)/source"
image: quay.io/enterprise-contract/ec-cli:snapshot
command: [ec]
args:
- validate
- definition
- "--file"
- "./all_tasks-ec"
- "--policy"
- "git::https://github.com/enterprise-contract/ec-policies//policy/task"
- "--policy"
- "git::https://github.com/enterprise-contract/ec-policies//policy/lib"
- "--data"
- "git::https://github.com/release-engineering/rhtap-ec-policy//data"
- "--strict"
script: |
set -euo pipefail
# Generate list of file parameters, e.g. --file=foo.yaml --file=bar.yaml
files=$(find all_tasks-ec -name '*.yaml' -printf '--file=%p ')
policy='enterprise-contract-service/redhat-trusted-tasks'
ec validate input --policy "${policy}" --output yaml --strict=true ${files}
- name: validate-build-tasks
workingDir: "$(workspaces.source.path)/source"
image: quay.io/enterprise-contract/ec-cli:snapshot
command: [ec]
args:
- validate
- definition
- "--file"
- "./build_tasks-ec"
- "--policy"
- "git::https://github.com/enterprise-contract/ec-policies//policy/build_task"
- "--policy"
- "git::https://github.com/enterprise-contract/ec-policies//policy/lib"
- "--data"
- "git::https://github.com/release-engineering/rhtap-ec-policy//data"
- "--strict"
script: |
set -euo pipefail
# Generate list of file parameters, e.g. --file=foo.yaml --file=bar.yaml
files=$(find build_tasks-ec -name '*.yaml' -printf '--file=%p ')
policy='./policies/build-tasks.yaml'
ec validate input --policy "${policy}" --output yaml --strict=true ${files}
workspaces:
- name: source

0 comments on commit dd33949

Please sign in to comment.