diff --git a/pipelines/j7s-os-pipeline.yaml b/pipelines/j7s-os-pipeline.yaml index d27d963..5b82b7a 100644 --- a/pipelines/j7s-os-pipeline.yaml +++ b/pipelines/j7s-os-pipeline.yaml @@ -57,4 +57,13 @@ spec: - name: registry value: 192.168.1.128:8443 taskRef: - name: j7s-os-buildah \ No newline at end of file + name: j7s-os-buildah + - name: patch-deployment + runAfter: ["build-deploy-image"] + params: + - name: deployment + value: j7s-os-app-deployment + - name: image + value: 192.168.1.128:8443/j7s-os-deploy:latest + taskRef: + name: j7s-os-k8s-deploy \ No newline at end of file diff --git a/runs/j7s-os-test.yaml b/runs/j7s-os-test.yaml index 546851b..e3d8b3d 100644 --- a/runs/j7s-os-test.yaml +++ b/runs/j7s-os-test.yaml @@ -19,4 +19,5 @@ spec: secretName: git-credentials params: - name: image-name - value: cs9-qemu-minimal-ostree.x86_64.repo \ No newline at end of file + value: cs9-qemu-minimal-ostree.x86_64.repo + serviceAccountName: internal-kubectl \ No newline at end of file diff --git a/runs/k8s-action-test.yaml b/runs/k8s-action-test.yaml index 168c00e..0048e83 100644 --- a/runs/k8s-action-test.yaml +++ b/runs/k8s-action-test.yaml @@ -10,4 +10,5 @@ spec: params: - name: script value: | + kubectl version kubectl get deploy \ No newline at end of file diff --git a/tasks/j7s-os-k8s-deploy.yaml b/tasks/j7s-os-k8s-deploy.yaml new file mode 100644 index 0000000..b12ed24 --- /dev/null +++ b/tasks/j7s-os-k8s-deploy.yaml @@ -0,0 +1,25 @@ +apiVersion: tekton.dev/v1beta1 +kind: Task +metadata: + name: j7s-os-k8s-deploy +spec: + params: + - name: deployment + description: The name of the deployment to patch. + - name: image + description: The image to deploy. + steps: + - name: kubectl + image: gcr.io/cloud-builders/kubectl@sha256:c855d060ac961bc7e6bff42d6b9d9ebebee304eca4cce4a2202e51a5da26c043 + script: | + #!/usr/bin/env bash + set -x + kubectl version + kubectl patch deployment $(params.deployment) --patch-file=/dev/stdin <