]> Vexing Labs - letters.git/commitdiff
updated rbac, working push
authorAdam A.G. Shamblin <adam@vexingworkshop.com>
Fri, 12 Nov 2021 22:57:45 +0000 (15:57 -0700)
committerAdam A.G. Shamblin <adam@vexingworkshop.com>
Fri, 12 Nov 2021 22:57:45 +0000 (15:57 -0700)
charts/pipeline/templates/pipeline.yaml
charts/pipeline/templates/rbac.yaml
charts/pipeline/templates/trigger.yaml

index a33bc0176db9aa15022661621f4633b18cb6f511..77f982e267fddeba887bbe08e3da616e5c44c065 100644 (file)
@@ -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
index 010ab9bf2314369461839a7fa95edf76c4c0b002..34e9ea98de8f8bf806e32a1d9064ec84256e0211 100644 (file)
@@ -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
index d55698471d3bae2f3a7be1086a102ecd51541f07..78403c9a82780cf9bacbd12623c2f459589f9b08 100644 (file)
@@ -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)