Commit b2283c83 authored by juadde's avatar juadde
Browse files

Software-only tests

parent 97129b35
Pipeline #1441 failed with stage
in 13 minutes and 12 seconds
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 config.json
# Note: We explicitly need the `ipv6` tag here because otherwise we'd get random
# gpg/pacman-key issues.
build:cloud-qemu:
stage: build
tags:
- ipv6
before_script:
- pacman -Syu --needed --noconfirm packer qemu-headless
script:
- packer build -only=cloud -except=sign config.json
artifacts:
name: "archlinux_x86_64_qcow2"
paths:
- "Arch-Linux-x86_64-cloudimg-*.*"
expire_in: 2d
build:vagrant-virtualbox:
stage: build
build_qemu:
stage: test
tags:
- ipv6
before_script:
- pacman -Syu --needed --noconfirm packer qemu-headless
- pacman -Syu --needed --noconfirm qemu-headless packer vagrant libvirt base-devel dnsmasq ebtables dmidecode
- vagrant plugin install vagrant-libvirt
script:
- packer build -only=virtualbox config.json
artifacts:
name: "archlinux_x86_64_virtualbox"
paths:
- "*.box"
expire_in: 2d
build:vagrant-qemu:
stage: build
- packer build -only=libvirt -var accelerator=none config.json
- vagrant box add *.box --name=arch
- vagrant init arch
- libvirtd &
- vagrant up --provider=libvirt
- vagrant ssh -c "cat /etc/pacman.d/mirrorlist" | grep Reflector
virtualbox:
stage: test
tags:
- ipv6
before_script:
- pacman -Syu --needed --noconfirm packer qemu-headless
- pacman -Syu --needed --noconfirm virtualbox vagrant virtualbox-host-modules-arch
- vboxreload
script:
- packer build -only=libvirt config.json
artifacts:
name: "archlinux_x86_64_libvirt"
paths:
- "*.box"
expire_in: 2d
- vagrant init Kppqju77/arch
- vagrant up --provider=virtualbox
- vagrant ssh -c "cat /etc/pacman.d/mirrorlist" | grep Reflector
publish:
stage: publish
qemu:
stage: test
tags:
- ipv6
- secure
before_script:
- pacman -Syu --needed --noconfirm vagrant
- pacman -Syu --needed --noconfirm qemu-headless vagrant libvirt base-devel dnsmasq ebtables dmidecode
- vagrant plugin install vagrant-libvirt
- libvirtd &
script:
- vagrant cloud auth login --token $VAGRANT_API_TOKEN
- vagrant cloud auth login --check
- vagrant cloud box show archlinux/archlinux
- LIBVIRT_RELEASE=`ls Arch-Linux-x86_64-libvirt-*.box | awk -F "." '{print $1}' | awk -F "-" '{print $5"."$6"."$7}'`
- VIRTUALBOX_RELEASE=`ls Arch-Linux-x86_64-virtualbox-*.box | awk -F "." '{print $1}' | awk -F "-" '{print $5"."$6"."$7}'`
- vagrant cloud publish archlinux/archlinux $LIBVIRT_RELEASE libvirt Arch-Linux-x86_64-libvirt-*.box --release -f
- vagrant cloud publish archlinux/archlinux $VIRTUALBOX_RELEASE virtualbox Arch-Linux-x86_64-virtualbox-*.box --release -f
only:
variables:
- $SCHEDULED_PUBLISH == "TRUE"
resource_group: vm-build
- vagrant init Kppqju77/arch
- vagrant up --provider=libvirt
- vagrant ssh -c "cat /etc/pacman.d/mirrorlist" | grep Reflector
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment