From 64ba03841dbf96b4800c8eeb201427dcdaea90d6 Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Fri, 24 Dec 2021 16:02:58 +0700 Subject: [PATCH] style(ci): use common image, workingDir and command --- .tekton/external.yaml | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/.tekton/external.yaml b/.tekton/external.yaml index e7e521d2..5e7f2be6 100644 --- a/.tekton/external.yaml +++ b/.tekton/external.yaml @@ -16,46 +16,34 @@ spec: workspaces: - name: source stepTemplate: + image: hashicorp/terraform:1.1.2 + workingDir: /workspace/source/external envFrom: - secretRef: name: terraform-env-vars volumeMounts: - name: terraform-credentials mountPath: /root/.terraform.d/ + command: + - terraform volumes: - name: terraform-credentials secret: secretName: terraform-credentials steps: - name: lint - image: hashicorp/terraform:1.1.2 - workingDir: $(workspaces.source.path)/external - command: - - terraform args: - fmt - -recursive - -diff - -check - name: init - image: hashicorp/terraform:1.1.2 - workingDir: $(workspaces.source.path)/external - command: - - terraform args: - init - name: plan - image: hashicorp/terraform:1.1.2 - workingDir: $(workspaces.source.path)/external - command: - - terraform args: - plan - name: apply - image: hashicorp/terraform:1.1.2 - workingDir: $(workspaces.source.path)/external - command: - - terraform args: - apply - -auto-approve