-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report tekton yaml validation error to the user
The validation errors occurring in PipelineRuns as reported by the tekton controller within the .tekton directory are now reported directly in the event logs of the user namespaces along with the pipelinerun name where the error has occurred, this let a user troubleshoot the issue even if she or he doesn't have access to the controller log. Signed-off-by: Chmouel Boudjnah <[email protected]>
- Loading branch information
1 parent
5ecb9ea
commit 655c751
Showing
7 changed files
with
143 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
pkg/pipelineascode/testdata/invalid_tekton_yaml/.tekton/on-comment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
name: bad-tekton-yaml | ||
annotations: | ||
pipelinesascode.tekton.dev/max-keep-runs: "2" | ||
pipelinesascode.tekton.dev/task: ".tekton/remotetask.yaml" | ||
pipelinesascode.tekton.dev/on-comment: "/make-me-a-sandwich" | ||
spec: | ||
pipelineSpec: | ||
tasks: | ||
taskSpec: | ||
steps: | ||
- name: noop-task | ||
image: registry.access.redhat.com/ubi9/ubi-micro | ||
script: | | ||
echo "make me a sandwich" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
generateName: bad-generate-name | ||
spec: | ||
pipelineSpec: | ||
tasks: | ||
taskSpec: | ||
steps: | ||
- name: hello-moto | ||
image: scratch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
name: bad-name | ||
spec: | ||
pipelineSpec: | ||
tasks: | ||
taskSpec: | ||
steps: | ||
- name: hello-moto | ||
image: scratch |