From 1406a1261720ea340724cbe551aff8a5cd6b6f2e Mon Sep 17 00:00:00 2001 From: beppe Date: Mon, 16 Mar 2020 12:11:19 +0100 Subject: [PATCH] tekton pipeline data toegevoegd aan infra repo --- .DS_Store | Bin 0 -> 8196 bytes Tekton/.DS_Store | Bin 0 -> 12292 bytes Tekton/pipeline/.DS_Store | Bin 0 -> 6148 bytes Tekton/pipeline/pipeline.yaml | 120 ++++++++++++++++++ Tekton/resources/.DS_Store | Bin 0 -> 6148 bytes Tekton/resources/create-repo-webhook.yaml | 28 ++++ Tekton/resources/create-webhook.yaml | 51 ++++++++ Tekton/resources/experimental-pvc.yaml | 12 ++ Tekton/resources/master-pvc.yaml | 12 ++ Tekton/resources/namespace.yaml | 7 + Tekton/resources/secrets.yaml | 9 ++ Tekton/runs/.DS_Store | Bin 0 -> 6148 bytes Tekton/runs/pipeline/.DS_Store | Bin 0 -> 6148 bytes Tekton/runs/pipeline/pipelineRun.yaml | 16 +++ Tekton/runs/task/create-repo-webhook.yaml | 28 ++++ Tekton/service-accounts/.DS_Store | Bin 0 -> 6148 bytes .../cluster-role-binding.yaml | 13 ++ Tekton/service-accounts/cluster-role.yaml | 43 +++++++ Tekton/service-accounts/service-account.yaml | 7 + Tekton/tasks/build-and-push.yaml | 32 +++++ Tekton/tasks/create-webhook.yaml | 51 ++++++++ Tekton/tasks/execute-yaml.yaml | 24 ++++ Tekton/tasks/git-clone.yaml | 72 +++++++++++ Tekton/triggers/event-listener.yaml | 36 ++++++ Tekton/triggers/trigger-binding.yaml | 18 +++ Tekton/triggers/trigger-template.yaml | 35 +++++ Utilities/event-listener-debug.yaml | 25 ++++ 27 files changed, 639 insertions(+) create mode 100644 .DS_Store create mode 100644 Tekton/.DS_Store create mode 100644 Tekton/pipeline/.DS_Store create mode 100644 Tekton/pipeline/pipeline.yaml create mode 100644 Tekton/resources/.DS_Store create mode 100644 Tekton/resources/create-repo-webhook.yaml create mode 100644 Tekton/resources/create-webhook.yaml create mode 100644 Tekton/resources/experimental-pvc.yaml create mode 100644 Tekton/resources/master-pvc.yaml create mode 100644 Tekton/resources/namespace.yaml create mode 100644 Tekton/resources/secrets.yaml create mode 100644 Tekton/runs/.DS_Store create mode 100644 Tekton/runs/pipeline/.DS_Store create mode 100644 Tekton/runs/pipeline/pipelineRun.yaml create mode 100644 Tekton/runs/task/create-repo-webhook.yaml create mode 100644 Tekton/service-accounts/.DS_Store create mode 100644 Tekton/service-accounts/cluster-role-binding.yaml create mode 100644 Tekton/service-accounts/cluster-role.yaml create mode 100644 Tekton/service-accounts/service-account.yaml create mode 100644 Tekton/tasks/build-and-push.yaml create mode 100644 Tekton/tasks/create-webhook.yaml create mode 100644 Tekton/tasks/execute-yaml.yaml create mode 100644 Tekton/tasks/git-clone.yaml create mode 100644 Tekton/triggers/event-listener.yaml create mode 100644 Tekton/triggers/trigger-binding.yaml create mode 100644 Tekton/triggers/trigger-template.yaml create mode 100644 Utilities/event-listener-debug.yaml diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..8b4e5fe4d7a2fb4aebb1a375200058f2958200ac GIT binary patch literal 8196 zcmeHM&rcIU6n;}swjg%-C15;kBqk;hLlaE(Kqv*HgcvGC1Odyo9m`k_3F?EHkEXJ$P&_0l8zcjg0m*=5Kr$d1I4%s}p3ReT z#J(?jWhohu4E&c2@b`m;nPc3?l0fg(frS?WAl72Dm$0t#3Zmv?+{cnY?7>8YDxy#& zeuzPYI<{-RT-?W!K%oxA4?c)LGVvo6;*E~>HBTH!T%ar^1CoKm4Di^!7A`>^3~+<- z`?yirS75`#8IxtOO?h&8sct8-Js9lI{j|ThSn+LuyhK$v2@^nJ30z=cWmcV{Z~tSa zXc~^&+xv-xYHClMtW%VFrM|I#F15&3Q?BkVI|<#M;a5rBUCj9P3C7I5x}KRd=xSPR z9b%TN8y2-aWg|yXWcH3><=AS1En7Lqvy&1XiV{}BX|;1>Bib8_^=Q$neVaYnMl9Cb zqs5|EHaEjc`-N!#$b4aKedFQgqi1{>__Fa|N)Qp(d*ySi1y*TfSNv6yx8+rSQPuJ~ z!}SfP8c#>mrskHW)~2?$wlnQ*9i3-8(`rjb&o1R{KI0)~GCN@|)0w<&igWQj}v@l{VFdT6OxgINWF=vw64&ovGscGG|bt_L3YjdWaq2`#CV6MvwQ%06q zV&)OgEM6vU%1w3+d=pf5#YfAPi=v`Jm#E<5sFDdwFVJvTJSp13xS4drAl!sWe7x4- zDZGF;umwBt8Ft}2sUs>mPr6AT=_do^1{oovBuQ?OyFxuwzMbdFLkJ`@h=JP~beP?( zgZ-6G^Few2bz3-1z(#@XJI+xu0p|&MTU@}#O3JoOX612wKKC%(MyE2sf;hcn zpK8PmJ9zwm?db3S$9^4hf|3Erz^^kvYKK$93Dhs2dk&i7v9^YJ9y3o|t|ZV?!NLp2 v5xsC6aqovA)-@F6I&mLM02BKKP213>;;?D}AsQrGsxSyub=@GaDu}^RNJvYvwl~fy>m6%% zosfhe-#ByS>JO#Hy>~IxAWf2 z001er>p6gz06@XWsCE`$Oa;)-;Ga-n76AN8}A z_glzwp`XF4d&@OVhu62XwdI-q>V}r_YA&_yGW9IqqRv{VbnT9}P4`N^*(^C*6kFW2 z%)O-+WAj!_*F&0+UtKd?*KitUasRGuR84!yDN^63%~h*L9ntd)uNME7U6WNgf8(K; z)%n8hZh~P6g9h^=f#}i5vSTz&b-qv*c`736D%^y3U7GQX=C9zLAp<}e&W$~MI@CPkQ#U@H4uD6l-PRz zRO&(wT53RQAgTfOeb6y7S_o)IQ2yz_2QwjAIWr-7z%=>+JWmg3A)p;WxhTqTQKUkY z1TF><;+U^9cBF-Xb_5mTK!iAupk)$xD1^6;ayn-RQV>)=r3R!1k{Y;-S>q7+es&{Q zsnKRju;o4rmo@3)V&K;+)7kvJA2L7RjF#62mbbRUb#phU*Y0k`b!_T1us#NF4LmTh zPrG124O6dxfwTscd#FBm)jhAf$M9>{NBx}y9;z~>OifSSt)Tx`@eRN26%BWt{VN;( zb~Q*ZQ)>6pMs)>UIdnO1QO7qd$8@={RX364&IguLr+Y=_*Lu93iYQPNRZ%yzxx>R; zHlJV6bFW`JTF?*k`Rsz8&%JhZq$(F*$XzdOHunz>KRNpJ3mh2+5`4fQBmVcEUt;Rm zk@t63q<21q-uX$UI10i`Y<)ZSwFrarjYr>*9|bs1AlC=&zmbcAS;sCO-^UopC%{Ko zd${{Cx^NDSQ37|Ux7F|k4^3tiqLZ&iOT%C+{q~bqQTa+4l5f&J?9w?>02Y#uK}kU< zxwuv~@W@b!TB~n6&Tz z6>MfDUXQS$K8P>Xeu(ueWqq*MkJ9v-XA4d&MFg4-bKX(5AChp)p z=KddNk`Ji?se#ed02yDbEV7Sv_h>3UOm^0;W8B2Z0^{ol+7rP9KZ-}nkK&Q?eH3J4 p{Dpva1jQT-|NA8XdCl}cx@L-#m$F{V^`9LaFFzsY$%EJbe*l+qPG0~3 literal 0 HcmV?d00001 diff --git a/Tekton/pipeline/.DS_Store b/Tekton/pipeline/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0.nip.io`" + - name: GitHubUser + description: "The GitHub user" + - name: GitHubRepo + description: "The GitHub repo where the webhook will be created" + - name: GitHubOrg + description: "The GitHub organization where the webhook will be created" + - name: GitHubSecretName + description: "The Secret name for GitHub access token. This is always mounted and must exist" + - name: GitHubAccessTokenKey + description: "The GitHub access token key name" + - name: GitHubSecretStringKey + description: "The GitHub secret string key name" + - name: GitHubDomain + description: "The GitHub domain. Override for GitHub Enterprise" + default: "github.com" + - name: WebhookEvents + description: "List of events the webhook will send notifications for" + default: '[\"push\",\"pull_request\"]' + steps: + - name: create-webhook + image: pstauffer/curl:latest + volumeMounts: + - name: github-secret + mountPath: /var/secret + command: + - sh + args: + - -ce + - | + set -e + echo "Create Webhook" + if [ $(inputs.params.GitHubDomain) = "github.com" ];then + curl -v -d "{\"name\": \"web\",\"active\": true,\"events\": $(inputs.params.WebhookEvents),\"config\": {\"url\": \"$(inputs.params.ExternalDomain)\",\"content_type\": \"json\",\"insecure_ssl\": \"1\" ,\"secret\": \"$(cat /var/secret/$(inputs.params.GitHubSecretStringKey))\"}}" -X POST -u $(inputs.params.GitHubUser):$(cat /var/secret/$(inputs.params.GitHubAccessTokenKey)) -L https://api.github.com/repos/$(inputs.params.GitHubOrg)/$(inputs.params.GitHubRepo)/hooks + else + curl -d "{\"name\": \"web\",\"active\": true,\"events\": $(inputs.params.WebhookEvents),\"config\": {\"url\": \"$(inputs.params.ExternalDomain)/\",\"content_type\": \"json\",\"insecure_ssl\": \"1\" ,\"secret\": \"$(cat /var/secret/$(inputs.params.GitHubSecretStringKey))\"}}" -X POST -u $(inputs.params.GitHubUser):$(cat /var/secret/$(inputs.params.GitHubAccessTokenKey)) -L https://$(inputs.params.GitHubDomain)/api/v3/repos/$(inputs.params.GitHubOrg)/$(inputs.params.GitHubRepo)/hooks + fi \ No newline at end of file diff --git a/Tekton/resources/experimental-pvc.yaml b/Tekton/resources/experimental-pvc.yaml new file mode 100644 index 0000000..172588b --- /dev/null +++ b/Tekton/resources/experimental-pvc.yaml @@ -0,0 +1,12 @@ + +--- +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: workspace-pvc-experimental +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 500Mi \ No newline at end of file diff --git a/Tekton/resources/master-pvc.yaml b/Tekton/resources/master-pvc.yaml new file mode 100644 index 0000000..16c33f5 --- /dev/null +++ b/Tekton/resources/master-pvc.yaml @@ -0,0 +1,12 @@ + +--- +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: master-pvc +spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 500Mi \ No newline at end of file diff --git a/Tekton/resources/namespace.yaml b/Tekton/resources/namespace.yaml new file mode 100644 index 0000000..c61132f --- /dev/null +++ b/Tekton/resources/namespace.yaml @@ -0,0 +1,7 @@ +--- +apiVersion: v1 +kind: Namespace +metadata: + name: tekton-pipeline-istio-project-1 + labels: + istio-injection: enabled #zorgt voor auto sidecar injection \ No newline at end of file diff --git a/Tekton/resources/secrets.yaml b/Tekton/resources/secrets.yaml new file mode 100644 index 0000000..01e7b6b --- /dev/null +++ b/Tekton/resources/secrets.yaml @@ -0,0 +1,9 @@ +--- +apiVersion: v1 +kind: Secret +metadata: + name: github-secret + namespace: tekton-pipeline-istio-project-1 +stringData: + token: GITHUBSECRETTOKEN + secret: random-string-data \ No newline at end of file diff --git a/Tekton/runs/.DS_Store b/Tekton/runs/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..eea73ac238281e534127f0ba458cbd1545ba1716 GIT binary patch literal 6148 zcmeHKPfrs;6rX`A+ah-PQvu^)wJ|Y)Lz|FP4}?-`v>}G-5-b9i-F7G&wmX~MEfs1_ zzk*kdpTUDi6HPoBzW^uWN6@P`-~6e7#pp?h*_X`x-n@BlX5Mc*GaZBw&NZrOgj9r( z0)=5D2Gt3|`dR6bK4}>M#C!}JS;#@eZ2E4GcW4M12pKqQ46wbcAQ$$niwHWhe@&a3 z(D%u7ZOac*sRP{CA31k^Kv7~!Y$&#&Z_}n87(v6&8QvOe6^&rql=?EI_D|g~S1i&j zt78k)2@K029uKyv1YFi1T27TVbF|@9eLjvZIus?UM9b=AtCdb=GSgc6)=Ya^Yh^O2 zX)Tk!*=|Rb@$2c?!e)JMzxA~J?1i8f!%4&?F0l(QLFviVs_eQVQ~aiz=@(V)<{FI+ zUKqLSZR+Lh23f0lR#kV6isjTw0eKSW z);=k#Bfq#lAl1i*rsX{se8vt9e7HLvAr2pJX=}?TL8+|9{fb9zyGVU2u&A?oq<3}Q z2mT8IsTZ6r3N!8k-%BoY^H+%H1NOw1Rt?WHoEpjPZP?J2hgMijcR)soZ<#9eN zG>aZ#Lni0G2{x12#jbKgC@M+{1xQx$vSZXqG?^_5TNH?&Li6YzT0uK#A3aB}&};M- zeMFzpSM(hZU=?4(Q+Ni?;yHX57w{r3;`{iK2=D8D(ktC51mZQoo=KK^0;q_OI>`d5DL_Mhk6)jh|iP7UVi<|EQLwOTGi89cQWgcFAh zgbbWj2H5$aL1CDc*b&H&4ygDO05Ae(E}*MS0n{XBC3XZt4+s{afFcybK`!h(9PFBG zXC-z7ig1MG;{(f?v3#Lm5st9N-4V_T4C|1Akb&b2^oyp-?*H4rfBzp33R@uqAp`#v z12~e`^EpUK-mN{!vAb4-vI&I=^XmxYAyCQdm@Dimo`Avy`ZT5hW+iq6f(0b}Bfx10 KtB`?z%D@jAp7M+U literal 0 HcmV?d00001 diff --git a/Tekton/runs/pipeline/.DS_Store b/Tekton/runs/pipeline/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..5008ddfcf53c02e82d7eee2e57c38e5672ef89f6 GIT binary patch literal 6148 zcmeH~Jr2S!425mzP>H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0H1@V-^m;4Wg<&0T*E43hX&L&p$$qDprKhvt+--jT7}7np#A3 zem<@ulZcFPQ@L2!n>{z**++&mCkOWA81W14cNZlEfg7;MkzE(HCqgga^y>{tEnwC%0;vJ&^%eQ zLs35+`xjp>T0.nip.io`" + - name: GitHubUser + description: "The GitHub user" + - name: GitHubRepo + description: "The GitHub repo where the webhook will be created" + - name: GitHubOrg + description: "The GitHub organization where the webhook will be created" + - name: GitHubSecretName + description: "The Secret name for GitHub access token. This is always mounted and must exist" + - name: GitHubAccessTokenKey + description: "The GitHub access token key name" + - name: GitHubSecretStringKey + description: "The GitHub secret string key name" + - name: GitHubDomain + description: "The GitHub domain. Override for GitHub Enterprise" + default: "github.com" + - name: WebhookEvents + description: "List of events the webhook will send notifications for" + default: '[\"push\",\"pull_request\"]' + steps: + - name: create-webhook + image: pstauffer/curl:latest + volumeMounts: + - name: github-secret + mountPath: /var/secret + command: + - sh + args: + - -ce + - | + set -e + echo "Create Webhook" + if [ $(inputs.params.GitHubDomain) = "github.com" ];then + curl -v -d "{\"name\": \"web\",\"active\": true,\"events\": $(inputs.params.WebhookEvents),\"config\": {\"url\": \"https://$(inputs.params.ExternalDomain)\",\"content_type\": \"json\",\"insecure_ssl\": \"1\" ,\"secret\": \"$(cat /var/secret/$(inputs.params.GitHubSecretStringKey))\"}}" -X POST -u $(inputs.params.GitHubUser):$(cat /var/secret/$(inputs.params.GitHubAccessTokenKey)) -L https://api.github.com/repos/$(inputs.params.GitHubOrg)/$(inputs.params.GitHubRepo)/hooks + else + curl -d "{\"name\": \"web\",\"active\": true,\"events\": $(inputs.params.WebhookEvents),\"config\": {\"url\": \"https://$(inputs.params.ExternalDomain)/\",\"content_type\": \"json\",\"insecure_ssl\": \"1\" ,\"secret\": \"$(cat /var/secret/$(inputs.params.GitHubSecretStringKey))\"}}" -X POST -u $(inputs.params.GitHubUser):$(cat /var/secret/$(inputs.params.GitHubAccessTokenKey)) -L https://$(inputs.params.GitHubDomain)/api/v3/repos/$(inputs.params.GitHubOrg)/$(inputs.params.GitHubRepo)/hooks + fi \ No newline at end of file diff --git a/Tekton/tasks/execute-yaml.yaml b/Tekton/tasks/execute-yaml.yaml new file mode 100644 index 0000000..2fd6950 --- /dev/null +++ b/Tekton/tasks/execute-yaml.yaml @@ -0,0 +1,24 @@ + +--- +apiVersion: tekton.dev/v1alpha1 +kind: Task +metadata: + name: execute-yaml + #namespace: stage-tekton-pipeline +spec: + params: + - name: yaml-location + default: deploy.yaml + - name: command + default: apply + workspaces: + - name: source + mountpath: /source + steps: + - name: deploy-new-app + image: lachlanevenson/k8s-kubectl + command: ["kubectl"] + args: + - "$(params.command)" + - "-f" + - "/source/$(params.yaml-location)" \ No newline at end of file diff --git a/Tekton/tasks/git-clone.yaml b/Tekton/tasks/git-clone.yaml new file mode 100644 index 0000000..b38e1dd --- /dev/null +++ b/Tekton/tasks/git-clone.yaml @@ -0,0 +1,72 @@ +--- +apiVersion: tekton.dev/v1alpha1 +kind: Task +metadata: + name: git-clone +spec: + workspaces: + - name: output + description: workspace the repo will be cloned into + params: + - name: url + description: git url to clone + type: string + - name: revision + description: git revision to checkout (branch, tag, sha, ref…) + type: string + default: master + - name: submodules + description: defines if the resource should initialize and fetch the submodules + type: string + default: "true" + - name: depth + description: performs a shallow clone where only the most recent commit(s) will be fetched + type: string + default: "1" + - name: sslVerify + description: defines if http.sslVerify should be set to true or false in the global git config + type: string + default: "true" + - name: subdirectory + description: subdirectory inside the "output" workspace to clone the git repo into + type: string + default: "src" + - name: deleteExisting + description: clean out the contents of the repo's destination directory (if it already exists) before trying to clone the repo there + type: string + default: "true" + results: + - name: commit + description: The precise commit SHA that was fetched by this Task + steps: + - name: clone + image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:latest + script: | + CHECKOUT_DIR="$(workspaces.output.path)" + cleandir() { + if [[ -d "$CHECKOUT_DIR" ]] ; then + rm -rf "$CHECKOUT_DIR"/* + rm -rf "$CHECKOUT_DIR"/.[!.]* + rm -rf "$CHECKOUT_DIR"/..?* + fi + } + if [[ "$(inputs.params.deleteExisting)" == "true" ]] ; then + cleandir + ls -lah "$CHECKOUT_DIR" + fi + /ko-app/git-init \ + -url "$(inputs.params.url)" \ + -revision "$(inputs.params.revision)" \ + -path "$CHECKOUT_DIR" \ + -sslVerify "$(inputs.params.sslVerify)" \ + -submodules "$(inputs.params.submodules)" \ + -depth "$(inputs.params.depth)" + cd "$CHECKOUT_DIR" + RESULT_SHA="$(git rev-parse HEAD | tr -d '\n')" + EXIT_CODE="$?" + if [ "$EXIT_CODE" != 0 ] + then + exit $EXIT_CODE + fi + # Make sure we don't add a trailing newline to the result! + echo -n "$RESULT_SHA" > $(results.commit.path) \ No newline at end of file diff --git a/Tekton/triggers/event-listener.yaml b/Tekton/triggers/event-listener.yaml new file mode 100644 index 0000000..14a2e16 --- /dev/null +++ b/Tekton/triggers/event-listener.yaml @@ -0,0 +1,36 @@ + +--- +apiVersion: tekton.dev/v1alpha1 +kind: EventListener +metadata: + name: github-event-listener +spec: + serviceAccountName: service-acc + triggers: + - name: github + # interceptors: + # - github: + # eventTypes: + # - pull_request + # - push + bindings: + - name: github-trigger-binding + template: + name: github-trigger-template + +--- +apiVersion: v1 +kind: Service +metadata: + name: manual-service +spec: + ports: + - name: http-listener + port: 8080 + protocol: TCP + targetPort: 8080 + selector: + app.kubernetes.io/managed-by: EventListener + app.kubernetes.io/part-of: Triggers + eventlistener: github-event-listener + type: LoadBalancer \ No newline at end of file diff --git a/Tekton/triggers/trigger-binding.yaml b/Tekton/triggers/trigger-binding.yaml new file mode 100644 index 0000000..c1d7952 --- /dev/null +++ b/Tekton/triggers/trigger-binding.yaml @@ -0,0 +1,18 @@ +--- +apiVersion: tekton.dev/v1alpha1 +kind: TriggerBinding +metadata: + name: github-trigger-binding + #namespace: stage-tekton-pipeline +spec: + params: + - name: gitrevision + value: $(body.repository.default_branch) + - name: gitrepositoryurl + value: $(body.repository.clone_url) + # - name: prurl + # value: $(body.pull_request.html_url) + # - name: repo + # value: $(body.pull_request.base.repo.full_name) + # - name: source + # value: github \ No newline at end of file diff --git a/Tekton/triggers/trigger-template.yaml b/Tekton/triggers/trigger-template.yaml new file mode 100644 index 0000000..b3f9a58 --- /dev/null +++ b/Tekton/triggers/trigger-template.yaml @@ -0,0 +1,35 @@ +--- +apiVersion: tekton.dev/v1alpha1 +kind: TriggerTemplate +metadata: + name: github-trigger-template + #namespace: stage-tekton-pipeline +spec: + params: + - name: gitrevision + description: The git revision + default: master + - name: gitrepositoryurl + description: The git repository url + resourcetemplates: + - apiVersion: tekton.dev/v1alpha1 + kind: PipelineRun + metadata: + name: application-pipeline-run + #namespace: stage-tekton-pipeline + spec: + serviceAccountName: service-acc + pipelineRef: + name: application-pipeline #gebruik dit om de pipeline aan te passen naar andere versies, zolang ze zich in dezelfde #namespace bevinden kunnen we deze pipeline hergebruiken om deployments op de cluster uit te voeren. service-mesh agnostisch. + workspaces: + - name: workspace-master + persistentVolumeClaim: + claimName: workspace-pvc-master + - name: workspace-experimental + persistentVolumeClaim: + claimName: workspace-pvc-experimental + params: + - name: git-url + value: $(inputs.params.gitrepositoryurl) + - name: branch + value: $(inputs.params.gitrevision) \ No newline at end of file diff --git a/Utilities/event-listener-debug.yaml b/Utilities/event-listener-debug.yaml new file mode 100644 index 0000000..3b5ed7c --- /dev/null +++ b/Utilities/event-listener-debug.yaml @@ -0,0 +1,25 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shell-demo +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/managed-by: EventListener + app.kubernetes.io/part-of: Triggers + eventlistener: github-event-listener + template: + metadata: + labels: + app.kubernetes.io/managed-by: EventListener + app.kubernetes.io/part-of: Triggers + eventlistener: github-event-listener + spec: + containers: + - name: network-multitool + image: praqma/network-multitool + imagePullPolicy: "Always" + ports: + - containerPort: 8080 \ No newline at end of file