From b119d7e3b58b12d7ba2f32d3502a78380f008da4 Mon Sep 17 00:00:00 2001 From: Tomas Jelinek Date: Fri, 11 Aug 2023 09:41:33 +0200 Subject: [PATCH] ci: add markdownlint to internal gitlab CI --- .gitlab-ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cb1f50cf..1091ccef 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,7 @@ variables: PYTHON_CODE_DIRS: "./library/ ./module_utils/ha_cluster_lsr/ ./tests/unit/" WOKE_CONFIG: "https://raw.githubusercontent.com/linux-system-roles/tox-lsr/main/src/tox_lsr/config_files/woke.yml" - YAMLLINT_CONFIG: "{extends: .yamllint.yml, ignore: [.github/]}" + YAMLLINT_CONFIG: "{extends: .yamllint.yml, ignore: [.github/, .markdownlint.yaml]}" PYENV_ROOT: /root/pyenvs/ansible .rhel8_images: &RHEL8_IMAGES @@ -129,6 +129,7 @@ ansible_test: - mkdir -pv "$ignore_dir" - for file in .sanity-ansible-ignore-*.txt; do if [ -f "$file" ]; then cp "$file" "$ignore_dir/${file//*.sanity-ansible-}"; fi; done # wokeignore:rule=sanity - cd "$coll_dir" + - rm -f .pandoc_template-ha_cluster.html5 # remove irrelevant files - ansible-test --version - ansible-test sanity -v --color=yes --truncate=0 --no-redact --coverage --docker # wokeignore:rule=sanity @@ -139,6 +140,13 @@ shellcheck: - shellcheck --version - shellcheck files/*.sh +markdownlint: + extends: .job_generic_linter + stage: tier0 + script: + - chcon -R -t container_ro_file_t "../$(basename $(pwd))" + - podman run --rm --volume "$(pwd):/ha_cluster:ro" docker://avtodev/markdown-lint:master --config /ha_cluster/.markdownlint.yaml /ha_cluster/README.md # wokeignore:rule=master + woke: extends: .job_generic_linter stage: tier0