Skip to content

Commit 68df058

Browse files
authored
verify both the app and pelorus w/ tekton (#647)
* verify the basic-python app is running * verify the latest commit deployed is in the committime log * update the pipeline permissions w/ route access * s2i requires committime exporter w/ provider=image * Update Readme Signed-off-by: Wesley Hayutin <weshayutin@gmail.com> Signed-off-by: Wesley Hayutin <weshayutin@gmail.com>
1 parent 62c5d7d commit 68df058

3 files changed

Lines changed: 27 additions & 5 deletions

File tree

demo/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ Help:
1818
./demo-tekton.sh -h
1919
```
2020

21-
|Build Type |Status |
22-
|:------------|:--------------|
23-
| binary | supported |
24-
| buildConfig | supported |
25-
| s2i | [work in progress](https://github.com/konveyor/pelorus/issues/371)|
21+
|Build Type |Status |Notes |
22+
|:------------|:--------------|:----------------------------------------------------|
23+
| binary | supported | requires exporter committime-exporter |
24+
| buildConfig | supported | requires exporter committime-exporter |
25+
| s2i | supported | requires exporter committime-image-exporter with provider=image |
2626

2727
## demo.sh
2828

demo/tekton-demo-setup/02-project.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ rules:
1818
verbs:
1919
- "get"
2020
- "patch"
21+
- apiGroups:
22+
- route.openshift.io
23+
resources:
24+
- "routes"
25+
verbs:
26+
- "get"
2127
---
2228
apiVersion: rbac.authorization.k8s.io/v1
2329
kind: ClusterRoleBinding

demo/tekton-demo-setup/03-build-and-deploy.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,23 @@ objects:
254254
params:
255255
- name: SCRIPT
256256
value: |
257+
printf "Test the basic-python app is running:\n"
257258
curl $(oc get route -n basic-python-tekton basic-python-tekton -o=template='http://{{.spec.host}}') 2>&1 | grep "Hello world!" || exit 2
259+
printf "\n"
260+
printf "Test that Pelorus has found the latest git commit:\n"
261+
printf "Build Type is $(params.BUILD_TYPE)\n"
262+
if [[ "$(params.BUILD_TYPE)" == "buildconfig" ]]; then
263+
printf "test buildconfig: requires exporter named committime-exporter \n"
264+
curl $(oc get route -n pelorus committime-exporter -o=template='http://{{.spec.host | printf "%s\n"}}') | grep "$(tasks.checkout.results.commit)"
265+
fi
266+
if [[ "$(params.BUILD_TYPE)" == "binary" ]]; then
267+
printf "test binary: requires exporter named committime-exporter \n"
268+
curl $(oc get route -n pelorus committime-exporter -o=template='http://{{.spec.host | printf "%s\n"}}') | grep "$(tasks.checkout.results.commit)"
269+
fi
270+
if [[ "$(params.BUILD_TYPE)" == "s2i" ]]; then
271+
printf "test s2i: requires exporter named committime-image-exporter with variable PROVIDER=image \n"
272+
curl $(oc get route -n pelorus committime-image-exporter -o=template='http://{{.spec.host | printf "%s\n"}}') | grep "$(tasks.checkout.results.commit)"
273+
fi
258274
timeout: 2m
259275
retries: 3
260276
taskRef:

0 commit comments

Comments
 (0)