From 36b1fbffb2f24506079e46a8155877c19f648473 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Wed, 15 Feb 2023 22:59:10 +0100 Subject: Add linting pipeline Signed-off-by: Georg Pfuetzenreuter --- .pipeline.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to '.pipeline.yml') diff --git a/.pipeline.yml b/.pipeline.yml index 9450491..1c8955d 100644 --- a/.pipeline.yml +++ b/.pipeline.yml @@ -1,6 +1,17 @@ skip_clone: true pipeline: + lint: + image: registry.opensuse.org/home/crameleon/libertacasa/containers/containerfile/libertacasa/pipeline-lint:latest + secrets: [ci_netrc_username, ci_netrc_password, ci_netrc_machine] + when: + event: [push] + commands: + - git clone --single-branch -b $CI_COMMIT_BRANCH $CI_REPO_LINK ../salt-libertacasa-linting + - cd ../salt-libertacasa-linting + - find . -type f \( -name '*.yaml' -o -name '*.yml' \) -exec yamllint -f colored -s {} + + - find . -name '*.sls' -exec salt-lint --severity -x 204 {} + + check: image: registry.opensuse.org/home/crameleon/libertacasa/containers/containerfile/libertacasa/pipeline:latest secrets: [ ci_netrc_username, ci_netrc_password, ci_netrc_machine ] -- cgit v1.2.3 From cd93d792fff7bde02f75aa9d704de644be290b1a Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Wed, 15 Feb 2023 23:00:20 +0100 Subject: Address yamllint errors/warnings - remove spaces, add headers - add ignore for line-lengths in .pipeline.yml Signed-off-by: Georg Pfuetzenreuter --- .pipeline.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to '.pipeline.yml') diff --git a/.pipeline.yml b/.pipeline.yml index 1c8955d..1c2352f 100644 --- a/.pipeline.yml +++ b/.pipeline.yml @@ -1,3 +1,5 @@ +--- +# yamllint disable rule:line-length skip_clone: true pipeline: @@ -14,7 +16,7 @@ pipeline: check: image: registry.opensuse.org/home/crameleon/libertacasa/containers/containerfile/libertacasa/pipeline:latest - secrets: [ ci_netrc_username, ci_netrc_password, ci_netrc_machine ] + secrets: [ci_netrc_username, ci_netrc_password, ci_netrc_machine] when: event: [push] commands: @@ -40,5 +42,5 @@ pipeline: event: [push] instance: woodpecker-orpheus.intranet.squirrelcube.com commands: - #- rolesyncer + # - rolesyncer - bin/rolesyncer.py -- cgit v1.2.3