# Sample job for QEMU ISO installer job

device_type: qemu

job_name: Debian installer jessie on amd64
timeouts:
  job:
    minutes: 45
  action:
    minutes: 10
  connection:
    minutes: 35

priority: medium
visibility: public

metadata:
  source: https://git.linaro.org/lava-team/refactoring.git
  path: standard/qemu-jessie-installer.yaml

context:
  arch: amd64
  # netdevice: tap

actions:
- deploy:
    timeout:
      minutes: 4
    to: iso-installer
    os: debian_installer
    images:
      # the iso and the preseed file can be very tightly coupled.
      iso:
        url: http://images.validation.linaro.org/kvm/debian-8.3.0-amd64-CD-1.iso
        image_arg: -drive file={iso},index=2,media=cdrom,readonly
        # specify compression if required
      preseed:
        url: http://images.validation.linaro.org/kvm/debian-8.3.0-cd1-preseed.cfg
    iso:
      kernel: /install.amd/vmlinuz
      initrd: /install.amd/initrd.gz
      # typically a maximum of 5G
      # use megabytes for a smaller image, although ~1G is likely to be the smallest practical size
      installation_size: 2G

- boot:
    method: qemu-iso
    media: img
    timeout:
      minutes: 30
    connection: serial
    auto_login: {login_prompt: 'login:', username: root, password_prompt: 'Password:', password: root}
    prompts:
    - 'root@debian:'

- test:
    timeout:
      minutes: 3
    definitions:
    - repository: http://git.linaro.org/lava-team/lava-functional-tests.git
      from: git
      path: lava-test-shell/smoke-tests-basic.yaml
      name: smoke-tests
