CI/CD

BASH

Require :

.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


Revision #2
Created 2022-04-19 08:14:56 UTC by Zayad
Updated 2022-04-19 08:17:45 UTC by Zayad