mirror of
https://github.com/bvanroll/cicdTest.git
synced 2025-08-29 03:52:44 +00:00
pls werk
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
21
manifests/test.yaml
Normal file
21
manifests/test.yaml
Normal file
@@ -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
|
Reference in New Issue
Block a user