diff --git a/manifests/full-pipeline.yaml b/manifests/full-pipeline.yaml index 8e4e23d..dd6dd94 100644 --- a/manifests/full-pipeline.yaml +++ b/manifests/full-pipeline.yaml @@ -23,7 +23,6 @@ rules: - "" - "apps" - "deploy" - - "networking.istio.io" # deze zullen we ook moeten aanpassen elke pipeline die we maken, maar, deze pipelines zijn nu specifiek per branch, dus dit zou geen probleem leveren. resources: - pods @@ -204,14 +203,15 @@ spec: - name: branch description: name of the master branch of the repository workspaces: - - name: workspace + - name: workspace-master + - name: workspace-experimental tasks: - name: clone-master taskRef: name: git-clone workspaces: - name: output - workspace: workspace + workspace: workspace-master params: - name: url value: $(inputs.params.git-url) @@ -220,9 +220,11 @@ spec: - name: build-and-push-a taskRef: name: build-and-push + runAfter: + - clone-master workspaces: - name: source - workspace: workspace + workspace: workspace-master params: - name: context value: "server-a" @@ -233,9 +235,11 @@ spec: - name: build-and-push-b-stable taskRef: name: build-and-push + runAfter: + - clone-master workspaces: - name: source - workspace: workspace + workspace: workspace-master params: - name: context value: "server-b" @@ -246,9 +250,11 @@ spec: - name: build-and-push-d taskRef: name: build-and-push + runAfter: + - clone-master workspaces: - name: source - workspace: workspace + workspace: workspace-master params: - name: context value: "server-d" @@ -256,16 +262,12 @@ spec: value: "server-d" - name: version value: "$(inputs.params.master-branch)" - - name: clone-experimental-branch + - name: clone-experimental taskRef: name: git-clone workspaces: - name: output - workspace: workspace - runAfter: - - build-and-push-a - - build-and-push-b-stable - - build-and-push-d + workspace: workspace-experimental params: - name: url value: $(inputs.params.git-url) @@ -276,9 +278,9 @@ spec: name: build-and-push workspaces: - name: source - workspace: workspace + workspace: workspace-experimental runAfter: - - clone-experimental-branch + - clone-experimental params: - name: context value: "server-b" @@ -291,9 +293,12 @@ spec: name: execute-yaml workspaces: - name: source - workspace: workspace + workspace: workspace-master runAfter: - build-and-push-b-experimental + - build-and-push-d + - build-and-push-a + - build-and-push-b-stable params: - name: yaml-location value: "infra.yaml" @@ -302,6 +307,6 @@ spec: name: execute-yaml workspaces: - name: source - workspace: workspace + workspace: workspace-master runAfter: - deploy-infra diff --git a/manifests/github-event-listener.yaml b/manifests/github-event-listener.yaml index 0493306..5f9041f 100644 --- a/manifests/github-event-listener.yaml +++ b/manifests/github-event-listener.yaml @@ -22,10 +22,21 @@ spec: kind: PersistentVolumeClaim apiVersion: v1 metadata: - name: workspace-pvc + name: workspace-pvc-master spec: accessModes: - - ReadWriteMany + - ReadWriteOnce + resources: + requests: + storage: 500Mi +--- +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: workspace-pvc-experimental +spec: + accessModes: + - ReadWriteOnce resources: requests: storage: 500Mi @@ -52,6 +63,13 @@ 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) @@ -77,6 +95,12 @@ rules: - pipelineruns - pipelineresources - taskruns + - pods + - serviceaccounts + - namespaces + - services + - deployments + - deployments.apps verbs: - create - get @@ -102,12 +126,10 @@ apiVersion: tekton.dev/v1alpha1 kind: EventListener metadata: name: github-event-listener - #namespace: stage-tekton-pipeline spec: serviceAccountName: service-acc triggers: - - binding: - name: github-trigger-binding - template: - name: github-trigger-template ---- + - bindings: + - name: github-trigger-binding + template: + name: github-trigger-template diff --git a/manifests/github-webhook-setup.yaml b/manifests/github-webhook-setup.yaml index cd02001..2f2b00b 100644 --- a/manifests/github-webhook-setup.yaml +++ b/manifests/github-webhook-setup.yaml @@ -236,8 +236,8 @@ spec: - name: ExternalDomain value: kube.llocal.host - name: Service - value: getting-started + value: el-github-event-listener - name: ServicePort - value: "443" + value: "8080" timeout: 1000s serviceAccountName: service-acc \ No newline at end of file diff --git a/manifests/test.yaml b/manifests/test.yaml new file mode 100644 index 0000000..c394bd8 --- /dev/null +++ b/manifests/test.yaml @@ -0,0 +1,21 @@ +apiVersion: tekton.dev/v1alpha1 +kind: EventListener +metadata: + name: github-event-listener + #namespace: stage-tekton-pipeline +spec: + serviceAccountName: service-acc + triggers: + - name: github-trigger + interceptors: + - github: + secretRef: + secretName: webhook-secret + secretKey: secret + eventTypes: + - pull_request + - push + bindings: + name: github-trigger-binding + template: + name: github-trigger-template \ No newline at end of file