From ddc048bf926e17952f9f89bf6bd2f721bcf0b90d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1igo=20Moreno?= <inigo.moreno@tecnalia.com> Date: Wed, 22 Sep 2021 15:56:26 +0200 Subject: [PATCH] Generate undefined badges --- ci-templates/core.yml | 12 +++++++++++- ci-templates/syntax-check.yml | 10 +++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ci-templates/core.yml b/ci-templates/core.yml index 1651c6e..f43b64b 100644 --- a/ci-templates/core.yml +++ b/ci-templates/core.yml @@ -16,7 +16,6 @@ services: stages: - build - - test before_script: - apk add --update bash coreutils tar wget py-pip @@ -30,3 +29,14 @@ include: default: tags: - docker + + +badges: + stage: .post + script: + - if [ ! -f "./badges/kinetic.svg" ]; then anybadge -l kinetic -v undefined -c gray -f ./badges/kinetic.svg; fi + - if [ ! -f "./badges/melodic.svg" ]; then anybadge -l melodic -v undefined -c gray -f ./badges/melodic.svg; fi + - if [ ! -f "./badges/noetic.svg" ]; then anybadge -l noetic -v undefined -c gray -f ./badges/noetic.svg; fi + artifacts: + paths: + - ./badges diff --git a/ci-templates/syntax-check.yml b/ci-templates/syntax-check.yml index e39ae17..ccf1df2 100644 --- a/ci-templates/syntax-check.yml +++ b/ci-templates/syntax-check.yml @@ -3,7 +3,7 @@ ########################################################## clang_format: - stage: test + stage: .post before_script: - apk add --update bash coreutils tar wget - git clone --quiet --depth 1 https://github.com/ros-industrial/industrial_ci.git .ci_config -b legacy @@ -33,7 +33,7 @@ python_syntax: bash_syntax: before_script: - apk add --update shellcheck - stage: test + stage: .post script: - RET=0 - find . -type f -name '*.sh' -exec shellcheck -s sh {} + || RET=1 @@ -49,7 +49,7 @@ bash_syntax: ## https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md ########################################################## markdown_syntax: - stage: test + stage: .post script: docker run -v ${PWD}:/ac tecnalia-docker-dev.artifact.tecnalia.com/cytopia/awesome-ci syntax-markdown --path=/ac --extension=md --ignore=.ci_config --custom="-r ~MD013,~MD014" when: always @@ -60,7 +60,7 @@ markdown_syntax: ## Uses https://github.com/cytopia/awesome-ci ########################################################## file_syntax: - stage: test + stage: .post script: - RET=0 - docker run -v ${PWD}:/ac tecnalia-docker-dev.artifact.tecnalia.com/cytopia/awesome-ci file-trailing-space --path=/ac --extension=py,txt,cpp,h,md,sh,bash,xml,launch --ignore=.ci_config || RET=1 @@ -74,7 +74,7 @@ file_syntax: ## so this is a custom-made "dirty" script ########################################################## adoc_syntax: - stage: test + stage: .post image: tecnalia-docker-dev.artifact.tecnalia.com/alpine before_script: - apk add --update curl asciidoctor bash -- GitLab