-
Notifications
You must be signed in to change notification settings - Fork 137
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 mapping between Status.Steps and Status.TaskSpec.Steps #1188
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
136 changes: 136 additions & 0 deletions
136
pkg/chains/formats/slsa/testdata/pipeline-v1beta1/taskrun4.json
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,136 @@ | ||
{ | ||
"metadata": { | ||
"name": "mismatch Status.Step.Name and Status.TaskSpec.Step.Name", | ||
"labels": { | ||
"tekton.dev/pipelineTask": "build" | ||
} | ||
}, | ||
"spec": { | ||
"params": [ | ||
{ | ||
"name": "IMAGE", | ||
"value": "test.io/test/image" | ||
}, | ||
{ | ||
"name": "CHAINS-GIT_COMMIT", | ||
"value": "sha:taskrun" | ||
}, | ||
{ | ||
"name": "CHAINS-GIT_URL", | ||
"value": "https://git.test.com" | ||
} | ||
], | ||
"taskRef": { | ||
"name": "build", | ||
"kind": "Task" | ||
}, | ||
"serviceAccountName": "default" | ||
}, | ||
"status": { | ||
"startTime": "2021-03-29T09:50:00Z", | ||
"completionTime": "2021-03-29T09:50:15Z", | ||
"conditions": [ | ||
{ | ||
"type": "Succeeded", | ||
"status": "True", | ||
"lastTransitionTime": "2021-03-29T09:50:15Z", | ||
"reason": "Succeeded", | ||
"message": "All Steps have completed executing" | ||
} | ||
], | ||
"podName": "test-pod-name", | ||
"steps": [ | ||
{ | ||
"name": "unnamed-", | ||
"container": "step-step1", | ||
"imageID": "docker-pullable://gcr.io/test7/test7@sha256:d4b63d3e24d6eef04a6dc0795cf8a73470688803d97c52cffa3c8d4efd3397b6" | ||
}, | ||
{ | ||
"name": "step2", | ||
"container": "step-step2", | ||
"imageID": "docker-pullable://gcr.io/test8/test8@sha256:4d6dd704ef58cb214dd826519929e92a978a57cdee43693006139c0080fd6fac" | ||
}, | ||
{ | ||
"name": "step3", | ||
"container": "step-step3", | ||
"imageID": "docker-pullable://gcr.io/test9/test9@sha256:f1a8b8549c179f41e27ff3db0fe1a1793e4b109da46586501a8343637b1d0478" | ||
} | ||
], | ||
"taskResults": [ | ||
{ | ||
"name": "IMAGE_DIGEST", | ||
"value": "sha256:827521c857fdcd4374f4da5442fbae2edb01e7fbae285c3ec15673d4c1daecb7" | ||
}, | ||
{ | ||
"name": "IMAGE_URL", | ||
"value": "gcr.io/my/image" | ||
} | ||
], | ||
"taskSpec": { | ||
"params": [ | ||
{ | ||
"name": "IMAGE", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "filename", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "DOCKERFILE", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "CONTEXT", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "EXTRA_ARGS", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "BUILDER_IMAGE", | ||
"type": "string" | ||
}, { | ||
"name": "CHAINS-GIT_COMMIT", | ||
"type": "string", | ||
"default": "sha:task" | ||
}, { | ||
"name": "CHAINS-GIT_URL", | ||
"type": "string", | ||
"default": "https://defaultgit.test.com" | ||
} | ||
], | ||
"steps": [ | ||
{ | ||
"name": "step1" | ||
}, | ||
{ | ||
"name": "step2" | ||
}, | ||
{ | ||
"name": "step3" | ||
} | ||
], | ||
"results": [ | ||
{ | ||
"name": "IMAGE_DIGEST", | ||
"description": "Digest of the image just built." | ||
}, | ||
{ | ||
"name": "filename_DIGEST", | ||
"description": "Digest of the file just built." | ||
} | ||
] | ||
}, | ||
"provenance": { | ||
"refSource": { | ||
"uri": "github.com/test", | ||
"digest": { | ||
"sha1": "ab123" | ||
}, | ||
"entryPoint": "build.yaml" | ||
} | ||
} | ||
} | ||
} |
141 changes: 141 additions & 0 deletions
141
pkg/chains/formats/slsa/testdata/pipeline-v1beta1/taskrun5.json
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,141 @@ | ||
{ | ||
"metadata": { | ||
"name": "mismatch size between Status.Steps and Status.TaskSpec.Steps", | ||
"labels": { | ||
"tekton.dev/pipelineTask": "build" | ||
} | ||
}, | ||
"spec": { | ||
"params": [ | ||
{ | ||
"name": "IMAGE", | ||
"value": "test.io/test/image" | ||
}, | ||
{ | ||
"name": "CHAINS-GIT_COMMIT", | ||
"value": "sha:taskrun" | ||
}, | ||
{ | ||
"name": "CHAINS-GIT_URL", | ||
"value": "https://git.test.com" | ||
} | ||
], | ||
"taskRef": { | ||
"name": "build", | ||
"kind": "Task" | ||
}, | ||
"serviceAccountName": "default" | ||
}, | ||
"status": { | ||
"startTime": "2021-03-29T09:50:00Z", | ||
"completionTime": "2021-03-29T09:50:15Z", | ||
"conditions": [ | ||
{ | ||
"type": "Succeeded", | ||
"status": "True", | ||
"lastTransitionTime": "2021-03-29T09:50:15Z", | ||
"reason": "Succeeded", | ||
"message": "All Steps have completed executing" | ||
} | ||
], | ||
"podName": "test-pod-name", | ||
"steps": [ | ||
{ | ||
"name": "step1", | ||
"container": "step-step1", | ||
"imageID": "docker-pullable://gcr.io/test10/test10@sha256:d4b63d3e24d6eef04a6dc0795cf8a73470688803d97c52cffa3c8d4efd3397b6" | ||
}, | ||
{ | ||
"name": "step2", | ||
"container": "step-step2", | ||
"imageID": "docker-pullable://gcr.io/test11/test11@sha256:4d6dd704ef58cb214dd826519929e92a978a57cdee43693006139c0080fd6fac" | ||
}, | ||
{ | ||
"name": "step3", | ||
"container": "step-step3", | ||
"imageID": "docker-pullable://gcr.io/test12/test12@sha256:f1a8b8549c179f41e27ff3db0fe1a1793e4b109da46586501a8343637b1d0478" | ||
}, | ||
{ | ||
"name": "step4", | ||
"container": "step-step3", | ||
"imageID": "docker-pullable://gcr.io/test13/test13@sha256:f1a8b8549c179f41e27ff3db0fe1a1793e4b109da46586501a8343637b1d0478" | ||
} | ||
], | ||
"taskResults": [ | ||
{ | ||
"name": "IMAGE_DIGEST", | ||
"value": "sha256:827521c857fdcd4374f4da5442fbae2edb01e7fbae285c3ec15673d4c1daecb7" | ||
}, | ||
{ | ||
"name": "IMAGE_URL", | ||
"value": "gcr.io/my/image" | ||
} | ||
], | ||
"taskSpec": { | ||
"params": [ | ||
{ | ||
"name": "IMAGE", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "filename", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "DOCKERFILE", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "CONTEXT", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "EXTRA_ARGS", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "BUILDER_IMAGE", | ||
"type": "string" | ||
}, { | ||
"name": "CHAINS-GIT_COMMIT", | ||
"type": "string", | ||
"default": "sha:task" | ||
}, { | ||
"name": "CHAINS-GIT_URL", | ||
"type": "string", | ||
"default": "https://defaultgit.test.com" | ||
} | ||
], | ||
"steps": [ | ||
{ | ||
"name": "step1" | ||
}, | ||
{ | ||
"name": "step2" | ||
}, | ||
{ | ||
"name": "step3" | ||
} | ||
], | ||
"results": [ | ||
{ | ||
"name": "IMAGE_DIGEST", | ||
"description": "Digest of the image just built." | ||
}, | ||
{ | ||
"name": "filename_DIGEST", | ||
"description": "Digest of the file just built." | ||
} | ||
] | ||
}, | ||
"provenance": { | ||
"refSource": { | ||
"uri": "github.com/test", | ||
"digest": { | ||
"sha1": "ab123" | ||
}, | ||
"entryPoint": "build.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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we mark the
TaskRun
as "failed to sign" or something ? (so that the controller doesn't pick it up later on).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we dont have a way to do this today, i reference a discussion here about that #979