From: Adam A.G. Shamblin Date: Fri, 12 Nov 2021 22:57:45 +0000 (-0700) Subject: updated rbac, working push X-Git-Url: https://git.vexinglabs.com/?a=commitdiff_plain;h=d405e6801dbc637f47c50e5beae2623a7237a38e;p=letters.git updated rbac, working push --- diff --git a/charts/pipeline/templates/pipeline.yaml b/charts/pipeline/templates/pipeline.yaml index a33bc01..77f982e 100644 --- a/charts/pipeline/templates/pipeline.yaml +++ b/charts/pipeline/templates/pipeline.yaml @@ -7,9 +7,6 @@ spec: - name: repo-url type: string description: git repo to clone - - name: branch - type: string - description: git branch to clone - name: image type: string description: name of the image to build @@ -26,8 +23,6 @@ spec: params: - name: url value: $(params.repo-url) - - name: branch - value: $(params.branch) workspaces: - name: output workspace: source diff --git a/charts/pipeline/templates/rbac.yaml b/charts/pipeline/templates/rbac.yaml index 010ab9b..34e9ea9 100644 --- a/charts/pipeline/templates/rbac.yaml +++ b/charts/pipeline/templates/rbac.yaml @@ -16,6 +16,7 @@ rules: resources: - clusterinterceptors - eventlisteners + - pipelineruns - triggers - triggertemplates - triggerbindings @@ -23,6 +24,15 @@ rules: - get - list - watch + - apiGroups: + - tekton.dev + resources: + - pipelineruns + verbs: + - get + - list + - watch + - create --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding diff --git a/charts/pipeline/templates/trigger.yaml b/charts/pipeline/templates/trigger.yaml index d556984..78403c9 100644 --- a/charts/pipeline/templates/trigger.yaml +++ b/charts/pipeline/templates/trigger.yaml @@ -28,7 +28,7 @@ spec: name: "cel" params: - name: "filter" - value: "body.ref == ['refs/head/main']" + value: "body.ref == 'refs/heads/master'" bindings: - ref: letters-binding template: @@ -42,10 +42,8 @@ spec: params: - name: repo-url value: $(body.repository.url) - - name: branch - value: main - name: image - value: $() + value: ghcr.io/coyote240/letters:$(body.head_commit.id) --- apiVersion: triggers.tekton.dev/v1beta1 kind: TriggerTemplate @@ -55,9 +53,6 @@ spec: params: - name: repo-url description: git repo to clone - - name: branch - description: git branch to clone - default: main - name: image description: published image resourcetemplates: @@ -65,25 +60,24 @@ spec: kind: PipelineRun metadata: generateName: letters-run- - pipelineRef: - name: letters-deploy - workspaces: - - name: source - volumeClaimTemplate: - spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi - storageClassName: do-block-storage - - name: dockerconfig - secret: - secretName: github-docker-config - params: - - name: repo-url - value: $(tt.params.repo-url) - - name: branch - value: $(tt.params.branch) - - name: image - value: $(tt.params.image) + spec: + pipelineRef: + name: letters-deploy + workspaces: + - name: source + volumeClaimTemplate: + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 1Gi + storageClassName: do-block-storage + - name: dockerconfig + secret: + secretName: github-docker-config + params: + - name: repo-url + value: $(tt.params.repo-url) + - name: image + value: $(tt.params.image)