From 3eed0b962b31c0641061e2a8cb2009b93b72915a Mon Sep 17 00:00:00 2001 From: Jon Azpiazu <jon.azpiazu@tecnalia.com> Date: Thu, 8 Oct 2020 11:37:49 +0200 Subject: [PATCH] Change sh/bash script checking to use shellcheck --- .gitlab-industrial-ci-kinetic-no-rosinstall.yml | 9 ++++++--- .gitlab-industrial-ci-kinetic-with-rosinstall.yml | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.gitlab-industrial-ci-kinetic-no-rosinstall.yml b/.gitlab-industrial-ci-kinetic-no-rosinstall.yml index 60f7b61..62db922 100644 --- a/.gitlab-industrial-ci-kinetic-no-rosinstall.yml +++ b/.gitlab-industrial-ci-kinetic-no-rosinstall.yml @@ -105,18 +105,21 @@ python_syntax: ########################################################## ## Check for errors in bash/sh scripts -## Uses https://github.com/cytopia/awesome-ci +## Uses https://github.com/koalaman/shellcheck ########################################################## bash_syntax: + before_script: + - apk add --update shellcheck stage: postcheck script: - RET=0 - - docker run -v ${PWD}:/ac cytopia/awesome-ci syntax-sh --path=/ac --extension=sh --ignore=.ci_config || RET=1 - - docker run -v ${PWD}:/ac cytopia/awesome-ci syntax-bash --path=/ac --extension=bash --ignore=.ci_config || RET=1 + - find . -type f -name '*.sh' -exec shellcheck -s sh {} \; + - find . -type f -name '*.bash' -exec shellcheck -s bash {} \; - exit $RET when: always tags: - docker + allow_failure: yes ########################################################## ## Check for errors in markdown files diff --git a/.gitlab-industrial-ci-kinetic-with-rosinstall.yml b/.gitlab-industrial-ci-kinetic-with-rosinstall.yml index dd3b5b2..6c8904c 100644 --- a/.gitlab-industrial-ci-kinetic-with-rosinstall.yml +++ b/.gitlab-industrial-ci-kinetic-with-rosinstall.yml @@ -107,18 +107,21 @@ python_syntax: ########################################################## ## Check for errors in bash/sh scripts -## Uses https://github.com/cytopia/awesome-ci +## Uses https://github.com/koalaman/shellcheck ########################################################## bash_syntax: + before_script: + - apk add --update shellcheck stage: postcheck script: - RET=0 - - docker run -v ${PWD}:/ac cytopia/awesome-ci syntax-sh --path=/ac --extension=sh --ignore=.ci_config || RET=1 - - docker run -v ${PWD}:/ac cytopia/awesome-ci syntax-bash --path=/ac --extension=bash --ignore=.ci_config || RET=1 + - find . -type f -name '*.sh' -exec shellcheck -s sh {} \; + - find . -type f -name '*.bash' -exec shellcheck -s bash {} \; - exit $RET when: always tags: - docker + allow_failure: yes ########################################################## ## Check for errors in markdown files -- GitLab