Skip to content

Commit

Permalink
Remove redundant examples tests
Browse files Browse the repository at this point in the history
Currently, we run a large number of examples tests that are duplicated
in v1 and v1beta1. These tests are meant to test specific features,
such as params and workspaces, that have the same syntax and implementation
in v1 and v1beta1. Since we have conversion integration tests, these
duplicated examples tests are likely adding little value.

In addition, examples tests are the flakiest set of tests in the repo
and often time out. Removing redundant examples tests should make our CI
less flaky.

This commit moves any examples tests that were solely present in v1beta1 to v1,
leaving only those that use features that weren't migrated to v1.
It deletes any examples that were duplicated between v1 and v1beta1.
  • Loading branch information
lbernick committed Jul 7, 2023
1 parent 9586306 commit a9be783
Show file tree
Hide file tree
Showing 123 changed files with 89 additions and 4,936 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: pipelinerun-test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ stringData:
-----END OPENSSH PRIVATE KEY-----
---
kind: PipelineRun
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
metadata:
generateName: isolated-workspaces-
spec:
timeout: 60s
timeouts:
pipeline: 60s
workspaces:
- name: ssh-credentials
secret:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: large-result-task
Expand All @@ -19,7 +19,7 @@ spec:
cat /dev/urandom | head -c 2500 | base64 | tee $(results.result4.path);
cat /dev/urandom | head -c 2500 | base64 | tee $(results.result5.path);
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: print-large-results
Expand All @@ -40,7 +40,7 @@ spec:
echo "$(params.param4)";
echo "$(params.param5)";
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: large-result-pipeline
Expand All @@ -67,7 +67,7 @@ spec:
- name: large-result
value: $(tasks.large-task.results.result1)
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: large-result-pipeline-run
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: platform-browsers
Expand All @@ -16,12 +16,13 @@ spec:
script: |
echo "Visit $(params.url) on $(params.platform) using $(params.browser)."
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: matrixed-pr-
spec:
serviceAccountName: "default"
taskRunTemplate:
serviceAccountName: "default"
pipelineSpec:
tasks:
- name: get-platforms
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: platform-browsers
Expand All @@ -17,7 +17,7 @@ spec:
script: |
echo "$(params.platform) and $(params.browser)"
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: matrixed-pipeline
Expand Down Expand Up @@ -48,12 +48,13 @@ spec:
taskRef:
name: platform-browsers
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: matrixed-pr-
spec:
serviceAccountName: "default"
taskRunTemplate:
serviceAccountName: "default"
params:
- name: platforms
value:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: mytask
Expand All @@ -15,12 +15,13 @@ spec:
script: |
echo "$(params.IMAGE) and $(params.DOCKERFILE)"
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: explicit-combos
spec:
serviceAccountName: 'default'
taskRunTemplate:
serviceAccountName: 'default'
pipelineSpec:
tasks:
- name: matrix-include
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: mytask
Expand All @@ -23,12 +23,13 @@ spec:
script: |
echo $(params.GOARCH) and $(params.version) flags? $(params.flags) context? $(params.context) package? $(params.package)
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: matrixed-include-pr
spec:
serviceAccountName: default
taskRunTemplate:
serviceAccountName: default
pipelineSpec:
tasks:
- name: matrix-include
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: platform-browsers
Expand All @@ -15,12 +15,13 @@ spec:
script: |
echo "$(params.platform) and $(params.browser)"
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: matrixed-pr-
spec:
serviceAccountName: "default"
taskRunTemplate:
serviceAccountName: "default"
pipelineSpec:
tasks:
- name: platforms-and-browsers
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: git-resolver-
spec:
workspaces:
- name: output # this workspace name must be declared in the Pipeline
- name: output # this workspace name must be declared in the Pipeline
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce # access mode may affect how you can use this volume in parallel tasks
- ReadWriteOnce # access mode may affect how you can use this volume in parallel tasks
resources:
requests:
storage: 1Gi
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
name: pipelinerun-array-indexing-results
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: write-param-to-result
Expand Down Expand Up @@ -26,7 +26,7 @@ spec:
#!/usr/bin/env bash
echo -n "{\"foo\":\"$(params.arg.url)\",\"bar\":\"$(params.arg.commit)\"}" | tee $(results.object-result.path)
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: echo-param
Expand Down Expand Up @@ -60,7 +60,7 @@ spec:
echo "validate the arg.bar successfully"
fi
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: pipeline-test
Expand All @@ -84,7 +84,7 @@ spec:
taskRef:
name: echo-param
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: pipelinerun-object-param-result-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: pipelinerun-object-results-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: pipelinerun-with-when-expressions-using-array-results-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: pipelinerun-write-and-read-array-results-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: deploy
Expand Down Expand Up @@ -89,7 +89,7 @@ spec:
fi
---
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: pipelinerun-param-array-indexing-
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: tekton.dev/v1beta1
apiVersion: tekton.dev/v1
kind: PipelineRun
metadata:
generateName: pipelinerun-object-param-result
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/pipelineruns/no-ci/hub-resolver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
pipelineRef:
resolver: hub
params:
- name: catalog # optional
- name: catalog # optional
value: Tekton
- name: kind
value: pipeline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ spec:
serviceAccountName: 'default'
pipelineSpec:
tasks:
- name: task1 # successful task
- name: task1 # successful task
taskSpec:
steps:
- image: ubuntu
name: hello
script: |
echo "Hello World!"
- name: task2 # skipped task
- name: task2 # skipped task
when:
- input: "true"
operator: "notin"
Expand All @@ -26,7 +26,7 @@ spec:
script: |
exit 0
finally:
- name: task3 # this task verifies the status of dag tasks, it fails if verification fails
- name: task3 # this task verifies the status of dag tasks, it fails if verification fails
params:
- name: task1Status
value: "$(tasks.task1.status)"
Expand All @@ -43,7 +43,7 @@ spec:
if [[ $(params.task1Status) != "Succeeded" || $(params.task2Status) != "None" ]]; then
exit 1;
fi
- name: task4 # this task verifies the aggregate status of all tasks, it fails if verification fails
- name: task4 # this task verifies the aggregate status of all tasks, it fails if verification fails
params:
- name: aggregateStatus
value: "$(tasks.status)"
Expand Down
2 changes: 1 addition & 1 deletion examples/v1/pipelineruns/pipelinerun-with-final-tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
- name: clone
image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:latest
securityContext:
runAsUser: 0 # This needs root, and git-init is nonroot by default
runAsUser: 0 # This needs root, and git-init is nonroot by default
script: |
CHECKOUT_DIR="$(workspaces.output.path)/$(params.subdirectory)"
Expand Down
Loading

0 comments on commit a9be783

Please sign in to comment.