From 9ae548d7ddbbf8c8c5c96dc3f5dff7ed21511de1 Mon Sep 17 00:00:00 2001 From: Khue Doan Date: Sat, 14 May 2022 21:08:18 +0700 Subject: [PATCH] ci: add lint task back --- .tekton/pipeline.yaml | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/.tekton/pipeline.yaml b/.tekton/pipeline.yaml index b4a9f55a..f19dc785 100644 --- a/.tekton/pipeline.yaml +++ b/.tekton/pipeline.yaml @@ -39,13 +39,45 @@ spec: value: - --cache=true - # TODO lint - - name: metal + - name: lint runAfter: - tools workspaces: - name: source workspace: shared-data + taskSpec: + workspaces: + - name: source + stepTemplate: + image: registry.khuedoan.com/tools:latest + steps: + - name: ansible + workingDir: /workspace/source/metal + command: + - ansible-lint + args: + - -v + - name: yaml + command: + - yamllint + args: + - . + - name: terraform + workingDir: /workspace/source/external + command: + - terraform + args: + - fmt + - -recursive + - -check + - -diff + + - name: metal + runAfter: + - lint + workspaces: + - name: source + workspace: shared-data taskSpec: workspaces: - name: source @@ -70,7 +102,7 @@ spec: - name: bootstrap runAfter: - - tools + - lint workspaces: - name: source workspace: shared-data @@ -92,7 +124,7 @@ spec: - name: external runAfter: - - tools + - lint workspaces: - name: source workspace: shared-data