# VARIABLES variables: DOCKER_BUILDKIT: 1 DOCKER_DRIVER: overlay2 DOCKER_HOST: tcp://localhost:2375 DOCKER_TLS_CERTDIR: "" ########################################################################################################## ## PIPELINE DEFINITION stages: - shellcheck - ansible-lint ########################################################################################################## ### COMMON SECTION .common: &common variables: GIT_DEPTH: 1 GIT_SUBMODULE_STRATEGY: recursive ANSIBLE_FORCE_COLOR: "True" except: - /^master$/ before_script: - chmod -R o-w ../ ########################################################################################################## ### TEST SECTION shellcheck: <<: *common stage: shellcheck image: registry.cyberbrain.pw/tools/shellcheck script: - shellcheck -s sh setup.sh - shellcheck -s sh -e SC2068 run.sh ansible-lint: <<: *common stage: ansible-lint image: registry.cyberbrain.pw/ansible/ansible script: - sh setup.sh - find . -maxdepth 1 -mindepth 1 -name \*.yml -a -not -name requirements.yml -a -not -name .gitlab-ci.yml -type f -print0 | xargs -0 ansible-lint -v -x '204' -x '301' -x '305' -x '401'