forked from sig_core/toolkit
Update .gitlab-ci.yml file
This commit is contained in:
parent
a7ec11e33a
commit
f495889b63
17
.gitlab-ci.yml
Normal file
17
.gitlab-ci.yml
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
# you can delete this line if you're not using Docker
|
||||||
|
#image: busybox:latest
|
||||||
|
|
||||||
|
shellcheck:
|
||||||
|
stage: test
|
||||||
|
image: registry.gitlab.com/pipeline-components/shellcheck:latest
|
||||||
|
script:
|
||||||
|
# anything ending on .sh, should be shell script
|
||||||
|
- |
|
||||||
|
find . -name .git -type d -prune -o -type f -name \*.sh -print0 |
|
||||||
|
xargs -0 -P $(nproc) -r -n1 shellcheck
|
||||||
|
# magic, any file with a valid shebang should be scanned aswell
|
||||||
|
- |
|
||||||
|
find . -name .git -type d -prune -o -type f -regex '.*/[^.]*$' -print0 |
|
||||||
|
xargs -0 -P $(nproc) -r -n1 sh -c 'FILE="$0"; if head -n1 "$FILE" |grep -q "^#\\! \?/.\+\(ba|d|k\)\?sh" ; then shellcheck "$FILE" ; else /bin/true ; fi '
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user