From 62e26958e2132ee66ab3e50f7d88edb95df39d7c Mon Sep 17 00:00:00 2001 From: Simon Cornet Date: Fri, 13 Jun 2025 11:50:33 +0200 Subject: [PATCH] feat(ci): move linting to components --- .gitlab-ci.yml | 6 +++++- .gitlab/linting.yaml | 30 ------------------------------ 2 files changed, 5 insertions(+), 31 deletions(-) delete mode 100644 .gitlab/linting.yaml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fdb0b13..ffbf34d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,5 +14,9 @@ include: # deployment - local: ".gitlab/gitleaks.yaml" - - local: ".gitlab/linting.yaml" - local: ".gitlab/deployment.yaml" + + # linting + - component: "$CI_SERVER_FQDN/components/ansiblelint/ansiblelint@1.0.0" + - component: "$CI_SERVER_FQDN/components/markdownlint/markdownlint@1.0.0" + - component: "$CI_SERVER_FQDN/components/yamllint/yamllint@1.0.2" diff --git a/.gitlab/linting.yaml b/.gitlab/linting.yaml deleted file mode 100644 index 5361ac6..0000000 --- a/.gitlab/linting.yaml +++ /dev/null @@ -1,30 +0,0 @@ ---- - -# linting -ansible-lint: - stage: "linting" - image: "docker.io/pipelinecomponents/ansible-lint:0.79.0" - rules: - - # run only on push to default branch - - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - - when: "never" - - # start linting - script: - - "ansible-lint -c .ansible-lint ." - -# yamllint -yamllint: - stage: "linting" - image: "registry.gitlab.com/pipeline-components/yamllint:0.35.0" - rules: - - # run only on push to default branch - - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' - - when: "never" - - script: - - # run yamllint - - "yamllint ."