Add shellcheck CI (#4562)

This commit is contained in:
Maxime Guyot 2019-04-19 08:57:54 +02:00 committed by Kubernetes Prow Robot
parent f5aec8add4
commit 530e1c329d
2 changed files with 15 additions and 0 deletions

View file

@ -193,6 +193,7 @@ ci-authorized:
include: include:
- .gitlab-ci/lint.yml - .gitlab-ci/lint.yml
- .gitlab-ci/shellcheck.yml
- .gitlab-ci/gce.yml - .gitlab-ci/gce.yml
- .gitlab-ci/digital-ocean.yml - .gitlab-ci/digital-ocean.yml
- .gitlab-ci/terraform.yml - .gitlab-ci/terraform.yml

14
.gitlab-ci/shellcheck.yml Normal file
View file

@ -0,0 +1,14 @@
# TODO(miouge1): Include
shellcheck:
extends: .job
stage: unit-tests
variables:
SHELLCHECK_VERSION: v0.6.0
before_script:
- curl --silent "https://storage.googleapis.com/shellcheck/shellcheck-"${SHELLCHECK_VERSION}".linux.x86_64.tar.xz" | tar -xJv
- cp shellcheck-"${SHELLCHECK_VERSION}"/shellcheck /usr/bin/
- shellcheck --version
script:
# Run shellcheck for all *.sh except contrib/
- find . -name '*.sh' -not -path './contrib/*' | xargs shellcheck --severity error
except: ['triggers', 'master']