Skip to content

Commit

Permalink
Use PAC resolver for unit test Task
Browse files Browse the repository at this point in the history
With support for custom Tasks, there is no longer a requirement that all
Tasks must come from a Tekton Bundle.

Signed-off-by: Luiz Carvalho <[email protected]>
  • Loading branch information
lcarva committed May 29, 2024
1 parent 4438528 commit 9836590
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 48 deletions.
10 changes: 2 additions & 8 deletions .tekton/database-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch == "main" && ( "60-load-db.sh".pathChanged() || "examples/deployment/docker/db_server/mysql.cnf".pathChanged() || "storage/mysql/schema/storage.sql".pathChanged() || ".tekton/database-pull-request.yaml".pathChanged() || "Dockerfile.database.rh".pathChanged() || "trigger-konflux-builds.txt".pathChanged() )
pipelinesascode.tekton.dev/task: "[.tekton/trillian-unit-test.yaml]"
creationTimestamp: null
labels:
appstudio.openshift.io/application: trillian
Expand Down Expand Up @@ -384,14 +385,7 @@ spec:
runAfter:
- prefetch-dependencies
taskRef:
params:
- name: name
value: go-unit-test
- name: bundle
value: quay.io/securesign/trillian-unit-test@sha256:56557b0303473a81a9326c3f64575941879bd1dc2c15360c7a3cee9eb7ad25ad
- name: kind
value: task
resolver: bundles
name: go-unit-test
workspaces:
- name: source
workspace: workspace
Expand Down
10 changes: 2 additions & 8 deletions .tekton/database-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ metadata:
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "main"
pipelinesascode.tekton.dev/task: "[.tekton/trillian-unit-test.yaml]"
creationTimestamp: null
labels:
appstudio.openshift.io/application: trillian
Expand Down Expand Up @@ -381,14 +382,7 @@ spec:
runAfter:
- prefetch-dependencies
taskRef:
params:
- name: name
value: go-unit-test
- name: bundle
value: quay.io/securesign/trillian-unit-test@sha256:56557b0303473a81a9326c3f64575941879bd1dc2c15360c7a3cee9eb7ad25ad
- name: kind
value: task
resolver: bundles
name: go-unit-test
workspaces:
- name: source
workspace: workspace
Expand Down
10 changes: 2 additions & 8 deletions .tekton/logserver-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch == "main" && ( "go.mod".pathChanged() || "go.sum".pathChanged() || ".tekton/logserver-pull-request.yaml".pathChanged() || "Dockerfile.logserver.rh".pathChanged() || "cmd/trillian_log_server/***".pathChanged() || "trigger-konflux-builds.txt".pathChanged() )
pipelinesascode.tekton.dev/task: "[.tekton/trillian-unit-test.yaml]"
creationTimestamp: null
labels:
appstudio.openshift.io/application: trillian
Expand Down Expand Up @@ -384,14 +385,7 @@ spec:
runAfter:
- prefetch-dependencies
taskRef:
params:
- name: name
value: go-unit-test
- name: bundle
value: quay.io/securesign/trillian-unit-test@sha256:56557b0303473a81a9326c3f64575941879bd1dc2c15360c7a3cee9eb7ad25ad
- name: kind
value: task
resolver: bundles
name: go-unit-test
workspaces:
- name: source
workspace: workspace
Expand Down
10 changes: 2 additions & 8 deletions .tekton/logserver-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ metadata:
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "main"
pipelinesascode.tekton.dev/task: "[.tekton/trillian-unit-test.yaml]"
creationTimestamp: null
labels:
appstudio.openshift.io/application: trillian
Expand Down Expand Up @@ -381,14 +382,7 @@ spec:
runAfter:
- prefetch-dependencies
taskRef:
params:
- name: name
value: go-unit-test
- name: bundle
value: quay.io/securesign/trillian-unit-test@sha256:56557b0303473a81a9326c3f64575941879bd1dc2c15360c7a3cee9eb7ad25ad
- name: kind
value: task
resolver: bundles
name: go-unit-test
workspaces:
- name: source
workspace: workspace
Expand Down
10 changes: 2 additions & 8 deletions .tekton/logsigner-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ metadata:
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: event == "pull_request" && target_branch == "main" && ( "go.mod".pathChanged() || "go.sum".pathChanged() || ".tekton/logsigner-pull-request.yaml".pathChanged() || "Dockerfile.logsigner.rh".pathChanged() || "cmd/trillian_log_signer/***".pathChanged() || "trigger-konflux-builds.txt".pathChanged() )
pipelinesascode.tekton.dev/task: "[.tekton/trillian-unit-test.yaml]"
creationTimestamp: null
labels:
appstudio.openshift.io/application: trillian
Expand Down Expand Up @@ -384,14 +385,7 @@ spec:
runAfter:
- prefetch-dependencies
taskRef:
params:
- name: name
value: go-unit-test
- name: bundle
value: quay.io/securesign/trillian-unit-test@sha256:56557b0303473a81a9326c3f64575941879bd1dc2c15360c7a3cee9eb7ad25ad
- name: kind
value: task
resolver: bundles
name: go-unit-test
workspaces:
- name: source
workspace: workspace
Expand Down
10 changes: 2 additions & 8 deletions .tekton/logsigner-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ metadata:
build.appstudio.redhat.com/target_branch: '{{target_branch}}'
pipelinesascode.tekton.dev/max-keep-runs: "3"
pipelinesascode.tekton.dev/on-cel-expression: event == "push" && target_branch == "main"
pipelinesascode.tekton.dev/task: "[.tekton/trillian-unit-test.yaml]"
creationTimestamp: null
labels:
appstudio.openshift.io/application: trillian
Expand Down Expand Up @@ -381,14 +382,7 @@ spec:
runAfter:
- prefetch-dependencies
taskRef:
params:
- name: name
value: go-unit-test
- name: bundle
value: quay.io/securesign/trillian-unit-test@sha256:56557b0303473a81a9326c3f64575941879bd1dc2c15360c7a3cee9eb7ad25ad
- name: kind
value: task
resolver: bundles
name: go-unit-test
workspaces:
- name: source
workspace: workspace
Expand Down

0 comments on commit 9836590

Please sign in to comment.