--- apiVersion: tekton.dev/v1beta1 kind: Task metadata: name: deploy-helmfile-base namespace: {{ .Values.pipelineNamespace }} labels: {{- include "tekton-pipelines.labels" . | nindent 4 }} spec: params: - name: namespace type: string - name: environment type: string steps: - name: get-ssh-key image: alpine/k8s:1.29.2 script: |- #!/bin/sh kubectl get secret "$(params.environment)"-config \ --namespace "$(params.namespace)" -o yaml \ | yq '.data.kubeconfig' \ | base64 -d > /tmp/outputs/config chmod 0600 /tmp/outputs/config - name: annonate-an-env-cm-installing image: alpine/k8s:1.29.2 script: |- #!/bin/sh kubectl annotate --overwrite configmap \ "$(params.environment)" \ --namespace "$(params.namespace)" \ "softplayer.net/status=installing-dependencies" - name: deploy-helmfile image: ghcr.io/helmfile/helmfile:v0.163.1 env: - name: KUBECONFIG value: /tmp/outputs/config script: |- #!/bin/sh mkdir -p /src git clone https://git.badhouseplants.net/softplayer/softplayer-helmfile.git /src/helmfile cd /src/helmfile/workload && helmfile sync - name: annonate-an-env-cm-ready image: alpine/k8s:1.29.2 script: |- #!/bin/sh kubectl annotate --overwrite configmap \ "$(params.environment)" \ --namespace "$(params.namespace)" \ "softplayer.net/status=ready" workspaces: - name: outputs description: A folder to store outputs optional: false mountPath: /tmp/outputs