Skip to content
Snippets Groups Projects
test-recipe.yaml 1.15 KiB
{{- $architecture := or .architecture "arm64" }}
{{- $mirror := or .mirror "https://repositories.apertis.org/apertis/" -}}
{{- $suite := or .suite "v2021dev1" -}}
{{- $osname := or .osname "apertis" -}}
{{- $required_backend := or .required_backend "uml" -}}

architecture: {{ $architecture }}

actions:
  - action: run
    description: Check fakemachine backend
    label: check-fakemachine-backend
    command: |
      BACKEND=$(systemd-detect-virt)

      # workaround for https://github.com/systemd/systemd/issues/17754
      # running fakemachine in uml mode inside gitlab runner we essentially run
      # uml nested under kvm; systemd-detect-virt thinks we are running on kvm
      grep -qP "^vendor_id\t: User Mode Linux" /proc/cpuinfo && BACKEND="uml"

      echo "detected machine backend: ${BACKEND}"
      echo "required machine backend: {{ $required_backend }}"
      [ "${BACKEND}" = "{{ $required_backend }}" ]

  - action: debootstrap
    suite: {{ $suite }}
    components:
      - target
    mirror: {{ $mirror }}
    variant: minbase
    keyring-package: apertis-archive-keyring
    keyring-file: keyring/apertis-archive-keyring.gpg
    merged-usr: true