Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix an issue with InvalidMatrixParameterTypes along with updating the matrix example with additional validations #7064

Merged
merged 1 commit into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions examples/v1/pipelineruns/alpha/pipelinerun-with-matrix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,46 @@ spec:
- name: echo
image: ubuntu
script: exit 1
- name: matrix-with-task-using-onerror
matrix:
params:
- name: version
value:
- "1"
- "2"
taskSpec:
params:
- name: version
steps:
- name: echo
image: ubuntu
onError: continue
pritidesai marked this conversation as resolved.
Show resolved Hide resolved
script: exit 1
- name: matrix-with-task-retries
retries: 1
params:
- name: pipelineTask-retries
value: $(context.pipelineTask.retries)
matrix:
params:
- name: version
value:
- "1"
- "2"
taskSpec:
params:
- name: version
- name: pipelineTask-retries
steps:
- image: alpine
script: |
#!/usr/bin/env sh
if [ "$(context.task.retry-count)" == "$(params.pipelineTask-retries)" ]; then
echo "This is the last retry."
exit 0;
fi
echo "The PipelineTask has retried $(context.task.retry-count) times."
exit 1
finally:
- name: matrix-params-with-empty-array-skipped-in-finally
matrix:
Expand Down
2 changes: 1 addition & 1 deletion pkg/reconciler/pipelinerun/pipelinerun.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const (
// all of the running TaskRuns as timed out failed.
ReasonCouldntTimeOut = "PipelineRunCouldntTimeOut"
// ReasonInvalidMatrixParameterTypes indicates a matrix contains invalid parameter types
ReasonInvalidMatrixParameterTypes = "ReasonInvalidMatrixParameterTypes"
ReasonInvalidMatrixParameterTypes = "InvalidMatrixParameterTypes"
// ReasonInvalidTaskResultReference indicates a task result was declared
// but was not initialized by that task
ReasonInvalidTaskResultReference = "InvalidTaskResultReference"
Expand Down
Loading