-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Use generateName where appropriate in TaskRuns; this makes it easier to re-run them multiple times, and we should probably recommend this more widely. - Create YAML resources instead of applying them (this is required to support generateName) - Rename files to remove unnecessary "taskrun-" prefix. - Rename TaskRuns to remove unnecessary "test-" prefix, and in general to match the name of the file -- this should help identifying the file that contains a failed TaskRun.
- Loading branch information
Showing
37 changed files
with
341 additions
and
441 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
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
1 change: 0 additions & 1 deletion
1
examples/taskruns/taskrun-cloud-event.yaml → examples/taskruns/cloud-event.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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
|
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,17 @@ | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: ClusterTask | ||
metadata: | ||
name: clustertask | ||
spec: | ||
steps: | ||
- image: ubuntu | ||
command: ['echo', 'hello'] | ||
--- | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: TaskRun | ||
metadata: | ||
generateName: clustertask- | ||
spec: | ||
taskRef: | ||
name: clustertask | ||
kind: ClusterTask |
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
3 changes: 1 addition & 2 deletions
3
examples/taskruns/taskrun-custom-env.yaml → examples/taskruns/custom-env.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
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
2 changes: 1 addition & 1 deletion
2
examples/taskruns/task-sidecar-dind.yaml → examples/taskruns/dind-sidecar.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
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 was deleted.
Oops, something went wrong.
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,74 @@ | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: TaskRun | ||
metadata: | ||
generateName: git-resource-tag- | ||
spec: | ||
taskSpec: | ||
inputs: | ||
resources: | ||
- name: skaffold | ||
type: git | ||
steps: | ||
- name: read | ||
image: ubuntu | ||
command: ['cat', '/workspace/skaffold/README.md'] | ||
inputs: | ||
resources: | ||
- name: skaffold | ||
resourceSpec: | ||
type: git | ||
params: | ||
- name: revision | ||
value: v0.32.0 | ||
- name: url | ||
value: https://github.com/GoogleContainerTools/skaffold | ||
--- | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: TaskRun | ||
metadata: | ||
generateName: git-resource-branch- | ||
spec: | ||
taskSpec: | ||
inputs: | ||
resources: | ||
- name: skaffold | ||
type: git | ||
steps: | ||
- name: read | ||
image: ubuntu | ||
command: ['cat', '/workspace/skaffold/README.md'] | ||
inputs: | ||
resources: | ||
- name: skaffold | ||
resourceSpec: | ||
type: git | ||
params: | ||
- name: revision | ||
value: master | ||
- name: url | ||
value: https://github.com/GoogleContainerTools/skaffold | ||
--- | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: TaskRun | ||
metadata: | ||
generateName: git-resource-ref- | ||
spec: | ||
taskSpec: | ||
inputs: | ||
resources: | ||
- name: skaffold | ||
type: git | ||
steps: | ||
- name: read | ||
image: ubuntu | ||
command: ['cat', '/workspace/skaffold/README.md'] | ||
inputs: | ||
resources: | ||
- name: skaffold | ||
resourceSpec: | ||
type: git | ||
params: | ||
- name: revision | ||
value: pull/2932/head | ||
- name: url | ||
value: https://github.com/GoogleContainerTools/skaffold |
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
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,36 @@ | ||
apiVersion: tekton.dev/v1alpha1 | ||
kind: TaskRun | ||
metadata: | ||
generateName: pullrequest- | ||
spec: | ||
inputs: | ||
resources: | ||
- name: pr | ||
resourceSpec: | ||
type: pullRequest | ||
params: | ||
- name: url | ||
# I just picked a random PR. The first couple didn't have any interesting comments or labels. | ||
value: https://github.com/tektoncd/pipeline/pull/100 | ||
taskSpec: | ||
inputs: | ||
resources: | ||
- name: pr | ||
type: pullRequest | ||
steps: | ||
- name: dump-workspace | ||
image: ubuntu | ||
command: ["sh"] | ||
args: ["-c", "find $(inputs.resources.pr.path)/* -type f | xargs tail -n +1"] | ||
- name: ensure-approved | ||
image: ubuntu | ||
command: ["/bin/bash"] | ||
args: | ||
- -c | ||
- | | ||
if [ -f "$(inputs.resources.pr.path)/labels/approved" ]; then | ||
echo "PR is approved!" | ||
else | ||
echo "PR is not approved!" | ||
exit 1 | ||
fi |
Oops, something went wrong.