default: image: "archlinux:latest" stages: - shfmt - shellcheck - yapf - flake8 - validate-packer - build shellcheck: stage: shellcheck before_script: - pacman -Syu --needed --noconfirm shellcheck script: find . -iname "*.sh" -exec shellcheck {} + shfmt: stage: shfmt before_script: - pacman -Syu --needed --noconfirm shfmt script: find . -iname "*.sh" -exec shfmt -i 2 -ci -d {} + yapf: stage: yapf before_script: - pacman -Syu --needed --noconfirm yapf script: find . -iname "*.py" -exec python3 -m yapf -d {} + flake8: stage: flake8 before_script: - pacman -Syu --needed --noconfirm flake8 script: find . -iname "*.py" -exec python3 -m flake8 {} + validate-packer: stage: validate-packer before_script: - pacman -Syu --needed --noconfirm packer script: - packer validate -var "iso_checksum_url=https://mirror.pkgbuild.com/iso/latest/sha1sums.txt" -except=vagrant-cloud vagrant.json - packer validate local.json - packer validate cloud.json build: stage: build tags: - secure-kvm - secure-virtualbox before_script: - pacman -Syu --needed --noconfirm qemu-headless virtualbox packer script: packer build -parallel-builds=1 -var 'headless=true' -var 'write_zeroes=yes' -except=vmware-iso local.json