# CI/CD

## BASH
Require : 
* https://github.com/mvdan/sh
* https://www.shellcheck.net/

.gitlab-ci.yml :
```
stages:
  - shell-code-check
  - shell-code-formater

shellcheck:
  image: koalaman/shellcheck-alpine:stable
  stage: shell-code-check
  before_script:
    - shellcheck --version
    - apk update
    - apk add git
  script:
    - git ls-files --exclude='*.sh' --ignored -c -z | xargs -0r shellcheck

shfmt:
  dependencies:
    - shellcheck
  image: mvdan/shfmt:latest-alpine
  stage: shell-code-formater
  before_script:
    - shfmt -version
    - apk update
    - apk add git
  script:
    - git ls-files --exclude='*.sh' --ignored -c -z | xargs -0r shfmt -i 2 -ci -d

```