-
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 nightly e2e tests for cli on ppc64le
Signed-off-by: Siddhesh Ghadi <[email protected]>
- Loading branch information
Showing
9 changed files
with
302 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
tekton/cronjobs/dogfooding/nightly-tests/ppc64le/cli-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 cli e2e tests on ppc64le hardware. |
26 changes: 26 additions & 0 deletions
26
tekton/cronjobs/dogfooding/nightly-tests/ppc64le/cli-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 3 * * *" | ||
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: "cli" | ||
- 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/cli-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: "-cli-ppc64le" |
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ namespace: default | |
resources: | ||
- pipeline-nightly-test | ||
- triggers-nightly-test | ||
- cli-nightly-test |
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
51 changes: 51 additions & 0 deletions
51
tekton/resources/nightly-tests/bastion-p/test_tekton_cli.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,51 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: Task | ||
metadata: | ||
name: test-e2e-tekton-cli | ||
spec: | ||
params: | ||
- name: package | ||
description: package (and its children) under test | ||
- name: tests-path | ||
description: path to the tests within "tests" git resource | ||
default: ./test/e2e | ||
- 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: 20m | ||
- name: tags | ||
default: e2e | ||
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 | ||
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: KUBECONFIG | ||
value: /root/.kube/config | ||
- name: TEST_CLIENT_BINARY | ||
value: $(workspaces.source-code.path)/src/$(params.package)/tkn | ||
- name: TEST_CLUSTERTASK_LIST_EMPTY | ||
value: "yes" | ||
command: | ||
- /bin/bash | ||
args: | ||
- -ce | ||
- | | ||
source $(workspaces.source-code.path)/$(params.plumbing-path)/scripts/library.sh | ||
go build -o tkn $(params.package)/cmd/tkn | ||
for testsuite in clustertask eventListener pipeline pipelinerun resource task; do | ||
header "Running Go $(params.tags) ${testsuite} tests" | ||
report_go_test -v -count=1 -tags=$(params.tags) -timeout=$(params.timeout) $(params.tests-path)/${testsuite} | ||
done |
204 changes: 204 additions & 0 deletions
204
tekton/resources/nightly-tests/cli-deploy-test-ppc64le-template.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,204 @@ | ||
# Copyright 2021 The Tekton Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
apiVersion: triggers.tekton.dev/v1alpha1 | ||
kind: TriggerTemplate | ||
metadata: | ||
name: tekton-cli-nightly-test-ppc64le | ||
spec: | ||
params: | ||
- name: containerRegistry | ||
- name: targetArch | ||
- name: namespace | ||
- name: remoteSecret | ||
resourcetemplates: | ||
- apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
generateName: tekton-cli-$(tt.params.targetArch)-nightly-run- | ||
namespace: $(tt.params.namespace) | ||
spec: | ||
timeout: 2h | ||
workspaces: | ||
# this workspace will be used to share info between tasks | ||
- name: shared-workspace | ||
volumeClaimTemplate: | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
# this workspace will be used to store k8s config | ||
- name: k8s-config | ||
secret: | ||
secretName: $(tt.params.remoteSecret) | ||
# this workspace will be used to store registry credentials | ||
- name: registry-credentials | ||
secret: | ||
secretName: registry-credentials | ||
# this workspace will be used to store registry self-signed certificate | ||
- name: registry-certificate | ||
secret: | ||
secretName: registry-certificate | ||
pipelineSpec: | ||
workspaces: | ||
- name: shared-workspace | ||
- name: k8s-config | ||
- name: registry-credentials | ||
- name: registry-certificate | ||
params: | ||
- name: package | ||
- name: container-registry | ||
- name: target-arch | ||
tasks: | ||
- name: git-clone-plumbing | ||
taskRef: | ||
name: git-clone | ||
params: | ||
- name: url | ||
value: https://github.com/tektoncd/plumbing | ||
- name: revision | ||
value: main | ||
- name: subdirectory | ||
value: src/github.com/tektoncd/plumbing | ||
workspaces: | ||
- name: output | ||
workspace: shared-workspace | ||
subPath: source-code | ||
- name: git-clone-pipeline | ||
runAfter: [git-clone-plumbing] | ||
taskRef: | ||
name: git-clone | ||
params: | ||
- name: url | ||
value: https://github.com/tektoncd/pipeline | ||
- name: revision | ||
value: main | ||
- name: subdirectory | ||
value: src/github.com/tektoncd/pipeline | ||
workspaces: | ||
- name: output | ||
workspace: shared-workspace | ||
subPath: source-code | ||
- name: git-clone-triggers | ||
runAfter: [git-clone-pipeline] | ||
taskRef: | ||
name: git-clone | ||
params: | ||
- name: url | ||
value: https://github.com/tektoncd/triggers | ||
- name: revision | ||
value: main | ||
- name: subdirectory | ||
value: src/github.com/tektoncd/triggers | ||
workspaces: | ||
- name: output | ||
workspace: shared-workspace | ||
subPath: source-code | ||
- name: git-clone-cli | ||
runAfter: [git-clone-triggers] | ||
taskRef: | ||
name: git-clone | ||
params: | ||
- name: url | ||
value: https://github.com/tektoncd/cli | ||
- name: revision | ||
value: main | ||
- name: subdirectory | ||
value: src/github.com/tektoncd/cli | ||
workspaces: | ||
- name: output | ||
workspace: shared-workspace | ||
subPath: source-code | ||
- name: deploy-pipeline | ||
runAfter: [git-clone-triggers] | ||
taskRef: | ||
name: deploy-tekton-project-nightly | ||
workspaces: | ||
- name: k8s-config | ||
workspace: k8s-config | ||
- name: registry-credentials | ||
workspace: registry-credentials | ||
- name: registry-certificate | ||
workspace: registry-certificate | ||
- name: source-code | ||
workspace: shared-workspace | ||
subPath: source-code | ||
retries: 2 | ||
params: | ||
- name: package | ||
value: github.com/tektoncd/pipeline | ||
- name: container-registry | ||
value: $(params.container-registry) | ||
- name: target-arch | ||
value: $(params.target-arch) | ||
- name: deploy-triggers | ||
runAfter: [deploy-pipeline] | ||
taskRef: | ||
name: deploy-tekton-project-nightly | ||
workspaces: | ||
- name: k8s-config | ||
workspace: k8s-config | ||
- name: registry-credentials | ||
workspace: registry-credentials | ||
- name: registry-certificate | ||
workspace: registry-certificate | ||
- name: source-code | ||
workspace: shared-workspace | ||
subPath: source-code | ||
retries: 2 | ||
params: | ||
- name: package | ||
value: github.com/tektoncd/triggers | ||
- name: container-registry | ||
value: $(params.container-registry) | ||
- name: target-arch | ||
value: $(params.target-arch) | ||
- name: e2e-test-cli | ||
runAfter: [deploy-triggers] | ||
taskRef: | ||
name: test-e2e-tekton-cli | ||
workspaces: | ||
- name: k8s-config | ||
workspace: k8s-config | ||
- name: source-code | ||
workspace: shared-workspace | ||
subPath: source-code | ||
retries: 2 | ||
params: | ||
- name: package | ||
value: $(params.package) | ||
finally: | ||
- name: cleanup | ||
taskRef: | ||
name: cleanup-tekton-nightly | ||
workspaces: | ||
- name: k8s-config | ||
workspace: k8s-config | ||
- name: source-code | ||
workspace: shared-workspace | ||
subPath: source-code | ||
retries: 2 | ||
params: | ||
- name: package | ||
value: github.com/tektoncd/pipeline | ||
- name: triggers | ||
value: "Yes" | ||
params: | ||
- name: package | ||
value: github.com/tektoncd/cli | ||
- name: container-registry | ||
value: $(tt.params.containerRegistry) | ||
- name: target-arch | ||
value: $(tt.params.targetArch) |
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