File tree Expand file tree Collapse file tree 5 files changed +57
-7
lines changed
gitops/argocd/pipeline-service
manifests/test/tekton-chains Expand file tree Collapse file tree 5 files changed +57
-7
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ apiVersion : v1
3
+ kind : Service
4
+ metadata :
5
+ name : tekton-chains
6
+ namespace : openshift-pipelines
7
+ labels :
8
+ app.kubernetes.io/instance : default
9
+ app.kubernetes.io/part-of : tekton-chains
10
+ spec :
11
+ ports :
12
+ - name : metrics
13
+ port : 9090
14
+ protocol : TCP
15
+ targetPort : 9090
16
+ selector :
17
+ app.kubernetes.io/name : controller
18
+ app.kubernetes.io/component : controller
19
+ app.kubernetes.io/instance : default
20
+ app.kubernetes.io/part-of : tekton-chains
Original file line number Diff line number Diff line change @@ -8,3 +8,5 @@ resources:
8
8
- tekton-config.yaml
9
9
- config-pac.yaml
10
10
- config-logging.yaml
11
+ # Manully add ConfigMap and Service until PLNSRVCE-1359 is fixed
12
+ - chains-observability-service.yaml
Original file line number Diff line number Diff line change 2
2
apiVersion : kustomize.config.k8s.io/v1beta1
3
3
kind : Kustomization
4
4
resources :
5
- #
6
- # For now we'll use the official release directly rather than downloading
7
- # it and checking it in.
8
- #
9
- # To list available releases:
10
- # curl -s https://storage.googleapis.com/tekton-releases/ | xq | grep -E 'chains/.*/release.yaml'
11
- #
12
5
- namespace.yaml
13
6
- chains-secrets-config.yaml
14
7
- public-key.yaml
Original file line number Diff line number Diff line change
1
+ ---
2
+ kind : PipelineRun
3
+ apiVersion : tekton.dev/v1beta1
4
+ metadata :
5
+ generateName : tekton-chains-metrics-
6
+ spec :
7
+ serviceAccountName : chains-test
8
+ pipelineSpec :
9
+ tasks :
10
+ - name : chains-metrics-curl
11
+ taskSpec :
12
+ steps :
13
+ - image : registry.access.redhat.com/ubi8/ubi-minimal:8.7
14
+ name : chains-metrics-curl
15
+ securityContext :
16
+ runAsNonRoot : true
17
+ script : |
18
+ stats="$(curl http://tekton-chains.openshift-pipelines.svc.cluster.local:9090/metrics 2> /dev/null | grep 'github.com.tektoncd.chains')"
19
+ if [ -z "$stats" ]; then
20
+ echo "FAILED: tekton chains metrics is not available/working"
21
+ exit 1
22
+ fi
23
+ echo "SUCCESS: tekton chains metrics is available/working"
Original file line number Diff line number Diff line change @@ -228,6 +228,18 @@ test_chains() {
228
228
# exit 1
229
229
# fi
230
230
231
+ echo -n " - Metrics: "
232
+ prName=" $( kubectl create -n " $NAMESPACE " -f " $SCRIPT_DIR /manifests/test/tekton-chains/tekton-chains-metrics.yaml" | awk ' {print $1}' ) "
233
+ wait_for_pipeline " $prName " " $NAMESPACE "
234
+ if [ " $( kubectl get " $prName " -n " $NAMESPACE " \
235
+ -o ' jsonpath={.status.conditions[0].reason}' ) " = " Succeeded" ]; then
236
+ echo " OK"
237
+ else
238
+ echo " Failed"
239
+ echo " [ERROR] Tekton Chains metrics is not available/working" >&2
240
+ exit 1
241
+ fi
242
+
231
243
echo
232
244
}
233
245
You can’t perform that action at this time.
0 commit comments