Skip to content

Commit

Permalink
Migrating tekton pipeline integration from prow to tekton
Browse files Browse the repository at this point in the history
This PR allows us to run the tektonCD/pipeline's integration tests on the tekton dogfooding cluster using a pipeline instead of a prow job.

Before merging, the tekton dogfooding cluster needs to be updated as follows:
1. Set up a node pool similar to prow cluster’s “n2-standard-4-kind” node pool.
    - ie. Add same Taints, auto scaling 0-24, us-central1 etc.
2. create a secret for test-account (same as prow) to store the service-account.json credentials
  • Loading branch information
chitrangpatel committed Dec 8, 2022
1 parent ed01965 commit f3d39e3
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tekton/ci/jobs/e2e-kind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,4 @@ spec:
- name: credentials
workspace: credentials
- name: source
workspace: sources
workspace: sources
100 changes: 100 additions & 0 deletions tekton/ci/repos/pipeline/template.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,106 @@
- op: add
path: /spec/resourcetemplates
value:
- apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: run-integration-tests-
labels:
prow.k8s.io/build-id: $(tt.params.buildUUID)
tekton.dev/source-event-id: $(tt.params.sourceEventId)
tekton.dev/check-name: pull-tekton-pipeline-integration-tests-using-tekton
tekton.dev/kind: ci
tekton.dev/pr-number: $(tt.params.pullRequestNumber)
annotations:
tekton.dev/gitRevision: "$(tt.params.gitRevision)"
tekton.dev/gitURL: "$(tt.params.gitRepository)"
spec:
serviceAccountName: tekton-ci-jobs
workspaces:
- name: sources
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
- name: credentials
secret:
secretName: "release-secret"
pipelineRef:
name: kind-e2e
params:
- name: pullRequestNumber
value: $(tt.params.pullRequestNumber)
- name: pullRequestBaseRef
value: $(tt.params.pullRequestBaseRef)
- name: gitRepository
value: "$(tt.params.gitRepository)"
- name: gitCloneDepth
value: $(tt.params.gitCloneDepth)
- name: fileFilterRegex
value: '^(cmd/|examples/|images/|pkg/|test/|go\.)'
- name: checkName
value: pull-tekton-pipeline-integration-tests-using-tekton
- name: gitHubCommand
value: $(tt.params.gitHubCommand)
- name: k8s-version
value: v1.23.x
- name: e2e-script
value: test/e2e-tests.sh
- name: e2e-env
value: test/e2e-tests-kind-prow.env
- apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: run-alpha-integration-tests-
labels:
prow.k8s.io/build-id: $(tt.params.buildUUID)
tekton.dev/source-event-id: $(tt.params.sourceEventId)
tekton.dev/check-name: pull-tekton-pipeline-alpha-integration-tests-using-tekton
tekton.dev/kind: ci
tekton.dev/pr-number: $(tt.params.pullRequestNumber)
annotations:
tekton.dev/gitRevision: "$(tt.params.gitRevision)"
tekton.dev/gitURL: "$(tt.params.gitRepository)"
spec:
serviceAccountName: tekton-ci-jobs
workspaces:
- name: sources
volumeClaimTemplate:
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
- name: credentials
secret:
secretName: "release-secret"
pipelineRef:
name: kind-e2e
params:
- name: pullRequestNumber
value: $(tt.params.pullRequestNumber)
- name: pullRequestBaseRef
value: $(tt.params.pullRequestBaseRef)
- name: gitRepository
value: "$(tt.params.gitRepository)"
- name: gitCloneDepth
value: $(tt.params.gitCloneDepth)
- name: fileFilterRegex
value: '^(cmd/|examples/|images/|pkg/|test/|go\.)'
- name: checkName
value: pull-tekton-pipeline-alpha-integration-tests-using-tekton
- name: gitHubCommand
value: $(tt.params.gitHubCommand)
- name: k8s-version
value: v1.23.x
- name: e2e-script
value: test/e2e-tests.sh
- name: e2e-env
value: test/e2e-tests-kind-prow-alpha.env
- apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
Expand Down

0 comments on commit f3d39e3

Please sign in to comment.