Add advanced Gitlab CI example (lint all shell scripts in git project)

Carl Bordum Hansen
2020-01-28 12:53:07 +01:00
parent 8702031953
commit 71e51c115d

@@ -7,3 +7,16 @@ test:
script:
- shellcheck testScript.sh
```
Here is a CI job that will lint all shell scripts in a git repository:
```yaml
test:
image: koalaman/shellcheck-alpine:latest
stage: test
before_script:
- apk update
- apk add git
script:
- git ls-files --exclude='*.sh' --ignored | xargs shellcheck
```