-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ppc64le nightly tests for pipelines
- Add secret & resource details to docs. - Update nightly test EventListener to include ppc64le architecture. - Add TriggerTemplate for nightly pipeline tests on ppc64le. - Add cronjob to trigger nightly ppc64le pipeline tests. - Add tasks to deploy, test & clean pipeline components on remote ppc64le cluster. - Add service account for triggering nightly tests. Signed-off-by: Siddhesh Ghadi <[email protected]>
- Loading branch information
Showing
18 changed files
with
412 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Cron Job to daily cleanup pr/tr from the default namespace in the dogfooding cluster |
20 changes: 20 additions & 0 deletions
20
tekton/cronjobs/dogfooding/cleanup/bastion-p-nightly/cronjob.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,20 @@ | ||
apiVersion: batch/v1beta1 | ||
kind: CronJob | ||
metadata: | ||
name: cleanup-trigger | ||
spec: | ||
schedule: "0 11 * * *" | ||
concurrencyPolicy: Forbid | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: trigger | ||
env: | ||
- name: NAMESPACE | ||
value: "bastion-p" | ||
- name: CLUSTER_RESOURCE | ||
value: "dogfooding-tektoncd-cleaner" | ||
- name: CLEANUP_KEEP | ||
value: "20" |
5 changes: 5 additions & 0 deletions
5
tekton/cronjobs/dogfooding/cleanup/bastion-p-nightly/kustomization.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,5 @@ | ||
bases: | ||
- ../../../bases/cleanup | ||
patchesStrategicMerge: | ||
- cronjob.yaml | ||
nameSuffix: "-dogfooding-bastion-p" |
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 |
---|---|---|
|
@@ -4,3 +4,4 @@ resources: | |
- bastion-z-nightly | ||
- tekton-ci-nightly | ||
- tekton-nightly-nightly | ||
- bastion-p-nightly |
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,3 +1,4 @@ | ||
namespace: default | ||
resources: | ||
- s390x | ||
- ppc64le |
3 changes: 3 additions & 0 deletions
3
tekton/cronjobs/dogfooding/nightly-tests/ppc64le/kustomization.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,3 @@ | ||
namespace: default | ||
resources: | ||
- pipeline-nightly-test |
1 change: 1 addition & 0 deletions
1
tekton/cronjobs/dogfooding/nightly-tests/ppc64le/pipeline-nightly-test/README.md
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 @@ | ||
Cron Job to run nightly pipeline e2e tests. |
26 changes: 26 additions & 0 deletions
26
tekton/cronjobs/dogfooding/nightly-tests/ppc64le/pipeline-nightly-test/cronjob.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,26 @@ | ||
apiVersion: batch/v1beta1 | ||
kind: CronJob | ||
metadata: | ||
name: nightly-test-trigger | ||
spec: | ||
schedule: "0 1 * * *" | ||
concurrencyPolicy: Forbid | ||
jobTemplate: | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: trigger | ||
env: | ||
- name: SINK_URL | ||
value: "http://el-test-nightly.default.svc.cluster.local:8080" | ||
- name: TARGET_PROJECT | ||
value: "pipeline" | ||
- name: NAMESPACE | ||
value: "bastion-p" | ||
- name: REGISTRY | ||
value: "ppc64le-cluster.bastion-p.svc.cluster.local:443" | ||
- name: TARGET_ARCH | ||
value: "ppc64le" | ||
- name: REMOTE_SECRET_NAME | ||
value: "ppc64le-kubeconfig" |
5 changes: 5 additions & 0 deletions
5
tekton/cronjobs/dogfooding/nightly-tests/ppc64le/pipeline-nightly-test/kustomization.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,5 @@ | ||
bases: | ||
- ../../../../bases/nightly-tests | ||
patchesStrategicMerge: | ||
- cronjob.yaml | ||
nameSuffix: "-pipeline-ppc64le" |
49 changes: 49 additions & 0 deletions
49
tekton/resources/nightly-tests/bastion-p/cleanup_tekton.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,49 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: cleanup-tekton-nightly | ||
spec: | ||
workspaces: | ||
- name: k8s-config | ||
description: workspace to get k8s config file | ||
mountPath: /root/.kube | ||
- name: source-code | ||
description: workspace with source code for tekton component | ||
mountPath: /workspace | ||
params: | ||
- name: package | ||
- name: resources | ||
description: space separated list of resources to be deleted | ||
default: "conditions pipelineresources tasks pipelines taskruns pipelineruns" | ||
- name: plumbing-path | ||
description: path in the workspace for plumbing source code | ||
default: src/github.com/tektoncd/plumbing | ||
steps: | ||
- name: cleanup-resources | ||
image: gcr.io/tekton-releases/dogfooding/kubectl:latest | ||
env: | ||
- name: KUBECONFIG | ||
value: /root/.kube/config | ||
command: | ||
- /bin/sh | ||
args: | ||
- -ce | ||
- | | ||
kubectl delete ns -l tekton.dev/test-e2e=true | ||
for res in $(params.resources); do | ||
kubectl delete --ignore-not-found=true ${res}.tekton.dev --all || return true | ||
done | ||
- name: uninstall-tekton-project | ||
image: gcr.io/tekton-releases/dogfooding/test-runner:latest | ||
workingdir: /workspace/src/$(params.package) | ||
env: | ||
- name: KUBECONFIG | ||
value: /root/.kube/config | ||
command: | ||
- /bin/bash | ||
args: | ||
- -ce | ||
- | | ||
source $(workspaces.source-code.path)/$(params.plumbing-path)/scripts/library.sh | ||
ko delete --ignore-not-found=true -f config/ | ||
wait_until_object_does_not_exist namespace tekton-pipelines |
48 changes: 48 additions & 0 deletions
48
tekton/resources/nightly-tests/bastion-p/deploy_tekton_component.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,48 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: deploy-tekton-project-nightly | ||
spec: | ||
workspaces: | ||
- name: k8s-config | ||
description: workspace to get k8s config file | ||
mountPath: /root/.kube | ||
- name: registry-credentials | ||
description: workspace to get registry credentials | ||
mountPath: /tekton/home/.docker | ||
- name: registry-certificate | ||
description: workspace to get registry self-signed certificate | ||
mountPath: /opt/ssl/certs | ||
- name: source-code | ||
description: workspace with source code for tekton component | ||
mountPath: /workspace | ||
params: | ||
- name: package | ||
description: package to install | ||
- name: container-registry | ||
description: container registry used to publish build images | ||
- name: target-arch | ||
description: target architecture for tests (s390x, ppc64le, arm64) | ||
steps: | ||
- name: deploy | ||
workingdir: /workspace/src/$(params.package) | ||
image: gcr.io/tekton-releases/dogfooding/test-runner:latest | ||
env: | ||
- name: GOPATH | ||
value: /workspace | ||
- name: KO_DOCKER_REPO | ||
value: $(params.container-registry) | ||
- name: KUBECONFIG | ||
value: /root/.kube/config | ||
- name: SSL_CERT_FILE | ||
value: /opt/ssl/certs/registry.crt | ||
command: | ||
- /bin/bash | ||
args: | ||
- -ce | ||
- | | ||
# busybox binary in distroless image doesn't work on ppc64le | ||
# https://bugs.busybox.net/show_bug.cgi?id=13491 | ||
sed -i 's/gcr.io\/distroless\/base@sha256:[a-zA-Z0-9]*/registry.access.redhat.com\/ubi8\/ubi-minimal:latest/g' config/controller.yaml | ||
ko apply --platform=linux/$(params.target-arch) -f config/ | ||
kubectl wait -n tekton-pipelines --for=condition=ready pods --all --timeout=120s |
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,8 @@ | ||
namespace: bastion-p | ||
commonAnnotations: | ||
managed-by: Tekton | ||
|
||
resources: | ||
- deploy_tekton_component.yaml | ||
- test_tekton_component.yaml | ||
- cleanup_tekton.yaml |
57 changes: 57 additions & 0 deletions
57
tekton/resources/nightly-tests/bastion-p/test_tekton_component.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,57 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: test-e2e-tekton-component | ||
spec: | ||
workspaces: | ||
- name: k8s-config | ||
description: workspace to get k8s config file | ||
mountPath: /root/.kube | ||
- name: source-code | ||
description: workspace with source code for tekton component | ||
mountPath: /workspace | ||
params: | ||
- name: package | ||
description: package (and its children) under test | ||
- name: tests-path | ||
description: path to the tests within "tests" git resource | ||
default: ./test | ||
- name: plumbing-path | ||
description: path in the workspace for plumbing source code | ||
default: src/github.com/tektoncd/plumbing | ||
- name: timeout | ||
description: timeout for the go test runner | ||
default: 45m | ||
- name: container-registry | ||
description: container registry used to push images during tests e.g. gcr.io/tekton-e2e-tests or icr.io/tekton-e2e-tests | ||
- name: tags | ||
default: e2e | ||
- name: target-arch | ||
description: target architecture for tests (s390x, ppc64le, arm64) | ||
steps: | ||
- name: run-e2e-tests | ||
image: gcr.io/tekton-releases/dogfooding/test-runner:latest | ||
workingdir: $(workspaces.source-code.path)/src/$(params.package) | ||
env: | ||
- name: REPO_ROOT_DIR | ||
value: $(workspaces.source-code.path)/src/$(params.package) | ||
- name: GOPATH | ||
value: /workspace | ||
- name: KO_DOCKER_REPO | ||
value: $(params.container-registry) | ||
- name: TEST_RUNTIME_ARCH | ||
value: $(params.target-arch) | ||
- name: SYSTEM_NAMESPACE | ||
value: tekton-pipelines | ||
- name: KUBECONFIG | ||
value: /root/.kube/config | ||
command: | ||
- /bin/bash | ||
args: | ||
- -ce | ||
- | | ||
source $(workspaces.source-code.path)/$(params.plumbing-path)/scripts/library.sh | ||
# extend test timeout (from 10 minutes to 20 minutes) to resolve https://github.com/tektoncd/pipeline/issues/3627 | ||
sed -i 's/timeout = 10/timeout = 20/g' test/wait.go | ||
header "Running Go $(params.tags) tests" | ||
report_go_test -v -count=1 -tags=$(params.tags) -timeout=$(params.timeout) $(params.tests-path) -kubeconfig /root/.kube/config |
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
Oops, something went wrong.