File tree Expand file tree Collapse file tree 4 files changed +103
-1
lines changed Expand file tree Collapse file tree 4 files changed +103
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ metadata:
1414 pipelinesascode.tekton.dev/task-4 : " [.tekton/tasks/generate-cluster-name.yaml]"
1515 pipelinesascode.tekton.dev/task-5 : " [.tekton/tasks/pipeline-service-setup.yaml]"
1616 pipelinesascode.tekton.dev/task-6 : " [.tekton/tasks/pipeline-service-tests.yaml]"
17- pipelinesascode.tekton.dev/task-7 : " [git-clone]"
17+ pipelinesascode.tekton.dev/task-7 : " [.tekton/tasks/tekton-results-fetch-sha.yaml]"
18+ pipelinesascode.tekton.dev/task-8 : " [.tekton/tasks/tekton-results-upstream-e2e.yaml]"
19+ pipelinesascode.tekton.dev/task-9 : " [git-clone]"
1820 pipelinesascode.tekton.dev/max-keep-runs : " 5"
1921spec :
2022 pipelineRef :
2628 value : " {{ revision }}"
2729 - name : target_branch
2830 value : " {{ target_branch }}"
31+ - name : results_url
32+ value : " https://github.com/openshift-pipelines/tektoncd-results"
2933 timeouts :
3034 pipeline : " 1h0m0s"
3135 workspaces :
4852 resources :
4953 requests :
5054 storage : 50Mi
55+ - name : tekton-results-source
56+ volumeClaimTemplate :
57+ spec :
58+ accessModes :
59+ - ReadWriteOnce
60+ resources :
61+ requests :
62+ storage : 3Gi
Original file line number Diff line number Diff line change 88 - name : repo_url
99 - name : revision
1010 - name : target_branch
11+ - name : results_url
1112 timeouts :
1213 finally : " 0h20m0s"
1314 workspaces :
1415 - name : source
16+ - name : tekton-results-source
1517 - name : kubeconfig-dir
1618 - name : shared-workspace
1719 tasks :
@@ -107,6 +109,46 @@ spec:
107109 workspace : shared-workspace
108110 - name : source
109111 workspace : source
112+ - name : tekton-results-fetch-sha
113+ taskRef :
114+ name : tekton-results-fetch-sha
115+ runAfter :
116+ - " clone-pipeline-service-git"
117+ params :
118+ - name : target_branch
119+ value : $(params.target_branch)
120+ workspaces :
121+ - name : source
122+ workspace : source
123+ - name : clone-downstream-tekton-results
124+ taskRef :
125+ name : git-clone
126+ runAfter :
127+ - " tekton-results-fetch-sha"
128+ params :
129+ - name : url
130+ value : " $(params.results_url)"
131+ - name : revision
132+ value : " $(tasks.tekton-results-fetch-sha.results.tekton-results-downstream-sha)"
133+ - name : refspec
134+ value : " +refs/heads/*:refs/remotes/origin/*"
135+ workspaces :
136+ - name : output
137+ workspace : tekton-results-source
138+ - name : tekton-results-upstream-e2e
139+ taskRef :
140+ name : tekton-results-upstream-e2e
141+ runAfter :
142+ - " clone-downstream-tekton-results"
143+ - " plnsvc-setup"
144+ params :
145+ - name : target_branch
146+ value : $(params.target_branch)
147+ workspaces :
148+ - name : source
149+ workspace : tekton-results-source
150+ - name : kubeconfig-dir
151+ workspace : kubeconfig-dir
110152 finally :
111153 - name : destroy-cluster
112154 taskRef :
Original file line number Diff line number Diff line change 1+ ---
2+ apiVersion : tekton.dev/v1beta1
3+ kind : Task
4+ metadata :
5+ name : tekton-results-fetch-sha
6+ spec :
7+ workspaces :
8+ - name : source
9+ params :
10+ - name : target_branch
11+ results :
12+ - name : tekton-results-downstream-sha
13+ description : Tekton Results updated SHA in Pipeline Service
14+ steps :
15+ - name : fetch-results-sha
16+ workingDir : $(workspaces.source.path)
17+ image : quay.io/openshift-pipeline/ci:latest
18+ script : |
19+ #! /usr/bin/env bash
20+ echo -n "$(yq '.images[0].newTag' $(workspaces.source.path)/operator/gitops/argocd/pipeline-service/tekton-results/base/kustomization.yaml)" | tee $(results.tekton-results-downstream-sha.path)
Original file line number Diff line number Diff line change 1+ ---
2+ apiVersion : tekton.dev/v1beta1
3+ kind : Task
4+ metadata :
5+ name : tekton-results-upstream-e2e
6+ spec :
7+ params :
8+ - name : target_branch
9+ workspaces :
10+ - name : source
11+ - name : kubeconfig-dir
12+ steps :
13+ - name : execute-tekton-results-upstream-e2e
14+ image : quay.io/redhat-pipeline-service/ci-runner:$(params.target_branch)
15+ workingDir : $(workspaces.source.path)
16+ env :
17+ - name : KUBECONFIG
18+ value : " $(workspaces.kubeconfig-dir.path)/kubeconfig"
19+ script : |
20+ #! /usr/bin/env bash
21+ export SA_TOKEN_PATH=${SA_TOKEN_PATH:-"/tmp/tekton-results/tokens"}
22+ mkdir -p ${SA_TOKEN_PATH}
23+ service_accounts=(all-namespaces-read-access single-namespace-read-access)
24+ for service_account in "${service_accounts[@]}"; do
25+ kubectl create token "$service_account" > "${SA_TOKEN_PATH}"/"$service_account"
26+ done
27+ export CGO_ENABLED=0
28+ go test -v -count=1 --tags=e2e $(workspaces.source.path)/test/e2e/...
You can’t perform that action at this time.
0 commit comments