-
-
Save markito/9ef0329bce51a454e7ce5a0ed18a1eb1 to your computer and use it in GitHub Desktop.
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
apiVersion: tekton.dev/v1beta1 | |
kind: Pipeline | |
metadata: | |
annotations: | |
kubectl.kubernetes.io/last-applied-configuration: | | |
{"apiVersion":"tekton.dev/v1beta1","kind":"Pipeline","metadata":{"annotations":{},"creationTimestamp":"2020-10-11T21:59:48Z","generation":5,"labels":{"app.kubernetes.io/instance":"qrcode","pipeline.openshift.io/runtime":"python","pipeline.openshift.io/type":"knative"},"managedFields":[{"apiVersion":"tekton.dev/v1beta1","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{".":{},"f:kubectl.kubernetes.io/last-applied-configuration":{}}}},"manager":"kubectl","operation":"Update","time":"2020-10-11T22:03:48Z"},{"apiVersion":"tekton.dev/v1beta1","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:labels":{".":{},"f:app.kubernetes.io/instance":{},"f:pipeline.openshift.io/runtime":{},"f:pipeline.openshift.io/type":{}}},"f:spec":{".":{},"f:params":{},"f:resources":{},"f:tasks":{},"f:workspaces":{}}},"manager":"Mozilla","operation":"Update","time":"2020-10-11T23:12:04Z"}],"name":"qrcode","namespace":"techready2020","resourceVersion":"423542076","selfLink":"/apis/tekton.dev/v1beta1/namespaces/techready2020/pipelines/qrcode","uid":"0d60bc1c-2885-485b-987e-464ea1213f1b"},"spec":{"params":[{"default":"qr-encode","name":"PATH_CONTEXT","type":"string"},{"default":"qrcode","name":"APP_NAME","type":"string"},{"default":"https://github.com/markito/kqr-pay/","name":"GIT_REPO","type":"string"},{"default":"master","name":"GIT_REVISION","type":"string"},{"default":"image-registry.openshift-image-registry.svc:5000/techready2020/qrcode","name":"IMAGE_NAME","type":"string"},{"name":"REVISION","type":"string"},{"name":"PULLREQ","type":"string"}],"tasks":[{"name":"fetch-repository","params":[{"name":"url","value":"$(params.GIT_REPO)"},{"name":"revision","value":"$(params.GIT_REVISION)"},{"name":"subdirectory","value":""},{"name":"deleteExisting","value":"true"}],"taskRef":{"kind":"ClusterTask","name":"git-clone"},"workspaces":[{"name":"output","workspace":"workspace"}]},{"name":"build","params":[{"name":"IMAGE","value":"$(params.IMAGE_NAME)"},{"name":"TLSVERIFY","value":"false"},{"name":"PATH_CONTEXT","value":"$(params.PATH_CONTEXT)"}],"runAfter":["fetch-repository"],"taskRef":{"kind":"ClusterTask","name":"s2i-python-3"},"workspaces":[{"name":"source","workspace":"workspace"}]},{"name":"kn-service-create","params":[{"name":"ARGS","value":["service","update","$(params.APP_NAME)","--image=$(params.IMAGE_NAME)","--revision-name=$(params.REVISION)"]}],"runAfter":["build"],"taskRef":{"kind":"ClusterTask","name":"kn"}},{"name":"kn-tag","params":[{"name":"kn-image","value":"registry.redhat.io/openshift-serverless-1/client-kn-rhel8:0.13.2"},{"name":"ARGS","value":["service","update","$(params.APP_NAME)","--tag=$(params.APP_NAME)-$(params.REVISION)=$(params.APP_NAME)-$(params.REVISION)","--traffic=$(params.APP_NAME)-$(params.REVISION)=0,stable=100"]}],"runAfter":["kn-service-create"],"taskRef":{"kind":"ClusterTask","name":"kn"}}],"workspaces":[{"name":"workspace"}]}} | |
creationTimestamp: "2020-10-11T21:59:48Z" | |
generation: 10 | |
labels: | |
app.kubernetes.io/instance: qrcode | |
pipeline.openshift.io/runtime: python | |
pipeline.openshift.io/type: knative | |
managedFields: | |
- apiVersion: tekton.dev/v1beta1 | |
fieldsType: FieldsV1 | |
fieldsV1: | |
f:metadata: | |
f:annotations: | |
.: {} | |
f:kubectl.kubernetes.io/last-applied-configuration: {} | |
manager: kubectl | |
operation: Update | |
time: "2020-10-11T23:17:34Z" | |
- apiVersion: tekton.dev/v1beta1 | |
fieldsType: FieldsV1 | |
fieldsV1: | |
f:metadata: | |
f:labels: | |
.: {} | |
f:app.kubernetes.io/instance: {} | |
f:pipeline.openshift.io/runtime: {} | |
f:pipeline.openshift.io/type: {} | |
f:spec: | |
.: {} | |
f:params: {} | |
f:resources: {} | |
f:tasks: {} | |
f:workspaces: {} | |
manager: Mozilla | |
operation: Update | |
time: "2020-10-12T02:56:55Z" | |
name: qrcode | |
namespace: techready2020 | |
resourceVersion: "423860502" | |
selfLink: /apis/tekton.dev/v1beta1/namespaces/techready2020/pipelines/qrcode | |
uid: 0d60bc1c-2885-485b-987e-464ea1213f1b | |
spec: | |
params: | |
- default: qr-encode | |
name: PATH_CONTEXT | |
type: string | |
- default: qrcode | |
name: APP_NAME | |
type: string | |
- default: https://github.com/markito/kqr-pay/ | |
name: GIT_REPO | |
type: string | |
- default: master | |
name: GIT_REVISION | |
type: string | |
- default: image-registry.openshift-image-registry.svc:5000/techready2020/qrcode | |
name: IMAGE_NAME | |
type: string | |
- name: REVISION | |
type: string | |
- name: PULLREQ | |
type: string | |
tasks: | |
- name: fetch-repository | |
params: | |
- name: url | |
value: $(params.GIT_REPO) | |
- name: revision | |
value: $(params.GIT_REVISION) | |
- name: subdirectory | |
value: "" | |
- name: deleteExisting | |
value: "true" | |
taskRef: | |
kind: ClusterTask | |
name: git-clone | |
workspaces: | |
- name: output | |
workspace: workspace | |
- name: build | |
params: | |
- name: IMAGE | |
value: $(params.IMAGE_NAME) | |
- name: TLSVERIFY | |
value: "false" | |
- name: PATH_CONTEXT | |
value: $(params.PATH_CONTEXT) | |
runAfter: | |
- fetch-repository | |
taskRef: | |
kind: ClusterTask | |
name: s2i-python-3 | |
workspaces: | |
- name: source | |
workspace: workspace | |
- name: kn-service-create | |
params: | |
- name: ARGS | |
value: | |
- service | |
- update | |
- $(params.APP_NAME) | |
- --image=$(params.IMAGE_NAME) | |
- --revision-name=$(params.REVISION) | |
runAfter: | |
- build | |
taskRef: | |
kind: ClusterTask | |
name: kn | |
- name: kn-tag | |
params: | |
- name: kn-image | |
value: registry.redhat.io/openshift-serverless-1/client-kn-rhel8:0.13.2 | |
- name: ARGS | |
value: | |
- service | |
- update | |
- $(params.APP_NAME) | |
- --tag=$(params.APP_NAME)-$(params.REVISION)=$(params.APP_NAME)-$(params.REVISION) | |
- --traffic=$(params.APP_NAME)-$(params.REVISION)=0,stable=100 | |
runAfter: | |
- kn-service-create | |
taskRef: | |
kind: ClusterTask | |
name: kn | |
- name: github-add-comment | |
params: | |
- name: GITHUB_HOST_URL | |
value: api.github.com | |
- name: REQUEST_URL | |
value: $(params.PULLREQ) | |
- name: COMMENT | |
value: Preview URL for the service $(tasks.kn-list-revision.results.command-output) | |
runAfter: | |
- kn-list-revision | |
taskRef: | |
kind: Task | |
name: github-add-comment | |
- name: kn-list-revision | |
params: | |
- name: APP_NAME | |
value: $(params.APP_NAME) | |
- name: REVISION | |
value: $(params.REVISION) | |
runAfter: | |
- kn-tag | |
taskSpec: | |
params: | |
- name: APP_NAME | |
type: string | |
- name: REVISION | |
type: string | |
results: | |
- description: "" | |
name: command-output | |
steps: | |
- image: registry.redhat.io/openshift-serverless-1/client-kn-rhel8:0.13.2 | |
name: kn-list-revision | |
resources: {} | |
script: | | |
/ko-app/kn service describe $(params.APP_NAME) -o=jsonpath='{.status.traffic[?(@.tag=="$(params.APP_NAME)-$(params.REVISION)")].url}' | /usr/bin/tee $(results.command-output.path); | |
workspaces: | |
- name: workspace |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment