Skip to content
Snippets Groups Projects
Select Git revision
  • apparmor-4.1
  • master default protected
  • apparmor-4.0
  • apparmor-3.1
  • apparmor-3.0 protected
  • apparmor-2.13 protected
  • fix-priority2
  • apparmor-2.12 protected
  • apparmor-2.11 protected
  • fix-dirtest
  • check-if-systemd-detect-virt-is-present
  • 250-what-is-the-minimum-kernel-version-required-for-apparmor-3
  • 160-the-trash-abstraction
  • apparmor-2.10 protected
  • cherry-pick-d257afd3
  • cherry-pick-d4296d21
  • apparmor-2.9 protected
  • apparmor-2.8 protected
  • apparmor-2.7 protected
  • apparmor-2.6 protected
  • v4.1.0 protected
  • v4.1.0-cherry-pick-point protected
  • v4.1.0-beta5 protected
  • v4.1.0-beta4 protected
  • v4.1.0-beta3 protected
  • v4.1.0-beta2 protected
  • v4.1.0-beta1 protected
  • v4.0.3 protected
  • v4.0.2 protected
  • v4.0.1 protected
  • v4.0.0 protected
  • v4.0.0-beta4 protected
  • v4.0.0-beta3 protected
  • v4.0.0-beta2 protected
  • v4.0.0-beta1 protected
  • v2.13.11 protected
  • v3.0.13 protected
  • v3.1.7 protected
  • v4.0.0-alpha4 protected
  • v4.0.0-alpha3 protected
40 results

spread.yaml

Code owners
spread.yaml 12.38 KiB
project: apparmor
backends:
    garden:
        # The garden backend relies on https://gitlab.com/zygoon/image-garden
        # TODO: Switch to a released version for better stability.
        type: adhoc
        allocate: |
            # Spread automatically injects /snap/bin to PATH. When we are
            # running from the image-garden snap then SPREAD_HOST_PATH is the
            # original path before such modifications were applied. Snap
            # applications cannot normally run /snap/bin/* entry-points
            # successfully so re-set PATH to the original value, as provided by
            # snapcraft.
            if [ -n "${SPREAD_HOST_PATH-}" ]; then
                PATH="${SPREAD_HOST_PATH}"
            fi
            # Use just enough RAM to link the parser on a virtual system with
            # two cores. Using more cores may easily consume more memory, due
            # to make -j$(nproc), used below than a small CI/CD system is
            # typically granted.  It is better to have more workers than to
            # have one big worker with lots of resources.
            export QEMU_MEM_OPTION="-m 1536"
            export QEMU_SMP_OPTION="-smp 2"
            ARCH="$(uname -m)"
            # If a locally built kernel image exist then use it for booting.
            # Care needs to be taken to make sure the kernel is compatible with
            # loadable modules present in the file system.
            if [ -f bzImage ]; then
                # Create the qcow2/run files before setting custom kernel
                # options, so that first boot and initialization happen in a
                # standardized manner.
                image-garden make "$SPREAD_SYSTEM"."$ARCH".run "$SPREAD_SYSTEM"."$ARCH".qcow2 1>&2
                # Pass a simple drive instead of the more elaborate virtio
                # configuration that is used by default. Some images may not
                # support virtio enough for booting.
                export QEMU_STORAGE_OPTION="-drive file=$SPREAD_SYSTEM.$ARCH.qcow2,format=qcow2"
                # Refrain from passing EFI firmware to qemu so that we boot a
                # kernel directly and bypass both EFI and BIOS.
                export QEMU_BOOT_FIRMWARE_OPTION=""
                # Pass the kernel and cmdline by hand. At present this is tuned
                # to the Ubuntu cloud images that have the rootfs as the first
                # partition.
                exec image-garden allocate "$SPREAD_SYSTEM"."$ARCH" \
                  -kernel bzImage \
                  -append 'root=/dev/sda1 ro console=tty1 console=ttyS0'
            fi
            # Ask image garden to allocate the system and relay the result back
            # to spread as either success of failure.
            exec image-garden allocate "$SPREAD_SYSTEM"."$ARCH"
        discard: |
            # See above for an explanation.
            if [ -n "${SPREAD_HOST_PATH-}" ]; then
                PATH="${SPREAD_HOST_PATH}"
            fi
            image-garden discard "$SPREAD_SYSTEM_ADDRESS"
        systems:
            # All systems except for the one Ubuntu system are marked as
            # manual. This way we don't accidentally spin up everything when
            # someone runs spread without knowing better.
            - opensuse-cloud-tumbleweed:
                  username: opensuse
                  password: opensuse
                  workers: 4
                  manual: true
            - debian-cloud-12:
                  username: debian
                  password: debian
                  workers: 4
                  manual: true
            - debian-cloud-13: