From 3d8b7024e4299f8ca1cdc3211520bf2574b4f2ad Mon Sep 17 00:00:00 2001 From: Bastian de Byl Date: Fri, 25 Sep 2020 15:01:26 -0400 Subject: [PATCH] Fixed linting in CI --- .drone.yml | 5 +---- .lint.sh | 7 +++++++ 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100755 .lint.sh diff --git a/.drone.yml b/.drone.yml index e7f56bd..eef53a5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,7 +10,4 @@ steps: - name: lint image: bdebyl/yamllint command: - - export YML_FILES=$(find ansible/ -name '*.yml' -not -name '*vault*') - - source $PWD/.lint-vars.sh - - ansible-lint -x $ANSIBLE_LINT_SKIP_LIST $YML_FILES - - yamllint $YML_FILES + - .lint.sh diff --git a/.lint.sh b/.lint.sh new file mode 100755 index 0000000..5de4cd3 --- /dev/null +++ b/.lint.sh @@ -0,0 +1,7 @@ +#!/bin/sh +export YML_FILES="$(find ansible/ -name '*.yml' -not -name '*vault*')" + +# Source the lint variables file (shared with Makefile) +. ./.lint-vars.sh +ansible-lint -x "$ANSIBLE_LINT_SKIP_LIST" $YML_FILES +yamllint $YML_FILES