device_type: qemu
job_name: LEDGE RPB OE edk2 boot ${MACHINE} ${MANIFEST_BRANCH} ${BUILD_NUMBER}

timeouts:
  job:
    minutes: 55
  action:
    minutes: 25
  connection:
    minutes: 2
priority: 25
visibility: public

context:
  arch: aarch64
  netdevice: user
  machine: virt
  cpu: cortex-a57
  guestfs_interface: virtio
  extra_options:
  - -m 2048

actions:
- deploy:
    namespace: target
    timeout:
      minutes: 15
    to: tmpfs
    images:
      1rootfs:
        image_arg: -drive id=disk1,file={1rootfs},if=none,format=raw -device virtio-blk-device,drive=disk1
          -smp 4 -serial stdio -nographic -device i6300esb,id=watchdog0
        url: ${SYSTEM_URL}
        compression: gz
        apply-overlay: true
        sparse: false
      2certs:
        image_arg: -drive id=disk0,file={2certs},if=none,format=raw -device virtio-blk-device,drive=disk0
        url: ${CERTS}
      3bios:
        image_arg: -pflash {3bios}
        url: ${FIRMWARE_EDK2}
      4efivars:
        image_arg: -pflash {4efivars}
        url: ${FIRMWARE_EDK2_VARS}
    os: oe
- boot:
    namespace: target
    timeout:
      minutes: 60
    method: qemu
    media: tmpfs
    docker:
      image: linaro/ci-amd64-ledge:stable
      binary: /usr/bin/qemu-system-aarch64
    auto_login:
      login_prompt: 'login:'
      username: ledge
      password_prompt: 'Password:'
      password: ledge
      login_commands:
      - sudo -s
    prompts:
    - ledge-.*:~\$$
    - ledge-qemuarm64:/(.*)#

- test:
    namespace: target
    timeout:
      minutes: 15
    definitions:
    - repository: https://github.com/Linaro/test-definitions.git
      from: git
      path: automated/linux/fwts/fwts.yaml
      name: fwts-unit-tests

metadata:
  machine: ${MACHINE}
  manifest branch: ${MANIFEST_BRANCH}
  manifest commit: ${MANIFEST_COMMIT}
  build url: ${BUILD_URL}
  build location: ${BASE_URL}${PUB_DEST}
