default: image: "archlinux:latest" variables: PACKER_LOG: 1 stages: - lint - build - publish shellcheck: stage: lint before_script: - pacman -Syu --needed --noconfirm shellcheck script: - find . -iname "*.sh" -exec shellcheck {} + shfmt: stage: lint before_script: - pacman -Syu --needed --noconfirm shfmt script: - find . -iname "*.sh" -exec shfmt -i 2 -ci -d {} + validate-packer: stage: lint 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:cloud-qemu: stage: build tags: - ipv6 before_script: - pacman -Syu --needed --noconfirm packer qemu-headless script: - packer build -except=sign cloud.json artifacts: name: "cloud-qemu" paths: - "release/Arch-Linux-x86_64-cloudimg-*.qcow2" expire_in: 2d build:vagrant-qemu: stage: build tags: - ipv6 before_script: - pacman -Syu --needed --noconfirm packer qemu-headless script: - packer build -only=qemu local.json publish: stage: publish tags: - secure-kvm - secure-virtualbox before_script: - pacman -Syu --needed --noconfirm qemu-headless virtualbox packer script: - packer build -parallel-builds=1 -var "vagrant_cloud_token=$VAGRANT_API_TOKEN" -except=vmware-iso vagrant.json only: variables: - $SCHEDULED_PUBLISH == "TRUE" resource_group: vm-build