Skip to content
Snippets Groups Projects
Commit d0487486 authored by Emanuele Aina's avatar Emanuele Aina
Browse files

lava: Reduce redundancy in the profile definitions


Use YAML anchors and extensions to avoid repeating the same contents over
and over.

This commit does not introduce any change in the generated job
definitions, except for the case below, which is harmless:

    apertis_ostree-minimal-armhf-uboot
    -      commands: ['reset']
    +      commands: ['run bootcmd_mmc0']

Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
parent 5ccf9740
No related branches found
No related tags found
1 merge request!169lava: Reduce redundancy in the profile definitions
Pipeline #136152 passed
.devices:
- &device-amd64-minnowboard
arch: amd64
board: uefi
boot_method: grub
boot_commands:
- set root='(hd0,gpt1)'
- chainloader /efi/boot/bootx64.efi
- boot
device_type: minnowboard-turbot-E3826
dtb_root: ""
needs_dtb: false
- &device-armhf-imx6-sabrelite
arch: armhf
board: uboot
boot_method: u-boot
boot_commands:
- run bootcmd_mmc0
device_type: imx6q-sabrelite
needs_dtb: true
- &device-arm64-renesas-r-car
arch: arm64
board: uboot
boot_method: u-boot
boot_commands:
- run bootcmd_mmc0
device_type: r8a7796-m3ulcb
dtb_root: "renesas/"
needs_dtb: true
.templates:
- &templates-minimal-apt
- group-minimal-tpl.yaml
- group-apparmor-tpl.yaml
- iptables-nmap.yaml
- &templates-minimal-ostree
- group-minimal-standalone-tpl.yaml
- group-apparmor-standalone-tpl.yaml
- group-ostree-common-tpl.yaml
- iptables-nmap.yaml
- &templates-target-apt
- group-apparmor-tpl.yaml
- group-common-tpl.yaml
- group-modules-tpl.yaml
- iptables-nmap.yaml
- &templates-target-ostree
- group-common-standalone-tpl.yaml
- group-ostree-common-tpl.yaml
- group-modules-standalone-tpl.yaml
- group-apparmor-standalone-tpl.yaml
- iptables-nmap.yaml
main-profile:
template-dir: lava/
templates: [ group-apparmor-tpl.yaml,
group-common-tpl.yaml,
group-modules-tpl.yaml,
iptables-nmap.yaml ]
variables:
bootfstype: ext2
release_version: "v2021dev2"
imgpath: "daily/v2021dev2"
baseurl: "https://images.apertis.org"
firststageurl: "https://images.apertis.org/release/v2019/v2019.1" # use a known good release for the first stage
boot_method: grub
boot_commands:
- set root='(hd0,gpt1)'
- chainloader /efi/boot/bootx64.efi
- boot
needs_dtb: false
dtb_root: ""
device_type: minnowboard-turbot-E3826
arch: amd64
board: uefi
visibility: public
source_project: ''
source_ref: ''
......@@ -31,36 +71,33 @@ main-profile:
profiles:
# AMD64 profiles.
- name: apertis-minimal-amd64-uefi
templates: [ group-minimal-tpl.yaml,
group-apparmor-tpl.yaml,
iptables-nmap.yaml ]
templates: *templates-minimal-apt
variables:
<<: *device-amd64-minnowboard
pretty: "Minnowboard turbot using minimal image"
image_type: minimal
- name: apertis-nfs-amd64-uefi
templates: [ group-nfs-tpl.yaml ]
variables:
<<: *device-amd64-minnowboard
pretty: "Amd64 nfsroot"
image_type: nfsroot
- name: apertis-target-amd64-uefi
templates: *templates-target-apt
variables:
<<: *device-amd64-minnowboard
pretty: "Minnowboard turbot using target image"
image_type: target
- name: apertis_ostree-minimal-amd64-uefi
templates: [ group-minimal-standalone-tpl.yaml,
group-apparmor-standalone-tpl.yaml,
group-ostree-common-tpl.yaml,
iptables-nmap.yaml ]
templates: *templates-minimal-ostree
variables:
<<: *device-amd64-minnowboard
pretty: "Minnowboard turbot using minimal OStree image"
image_type: minimal
- name: apertis_ostree-target-amd64-uefi
templates: [ group-common-standalone-tpl.yaml,
group-ostree-common-tpl.yaml,
group-modules-standalone-tpl.yaml,
group-apparmor-standalone-tpl.yaml,
iptables-nmap.yaml ]
templates: *templates-target-ostree
variables:
<<: *device-amd64-minnowboard
pretty: "Minnowboard turbot using target OStree image"
image_type: target
......@@ -90,116 +127,53 @@ profiles:
board: sdk
- name: apertis-minimal-arm64-uboot
templates: [ group-minimal-tpl.yaml,
group-apparmor-tpl.yaml,
iptables-nmap.yaml ]
templates: *templates-minimal-apt
variables:
<<: *device-arm64-renesas-r-car
pretty: "ARM64 using minimal image"
device_type: r8a7796-m3ulcb
arch: arm64
image_type: minimal
board: uboot
boot_method: u-boot
boot_commands:
- run bootcmd_mmc0
needs_dtb: true
dtb_root: "renesas/"
- name: apertis-nfs-arm64-uboot
templates: [ group-nfs-tpl.yaml ]
variables:
pretty: "ARM64 using minimal image"
device_type: r8a7796-m3ulcb
arch: arm64
image_type: nfsroot
board: uboot
boot_method: u-boot
boot_commands:
- run bootcmd_mmc0
needs_dtb: true
dtb_root: "renesas/"
<<: *device-arm64-renesas-r-car
- name: apertis_ostree-minimal-arm64-uboot
templates: [ group-minimal-standalone-tpl.yaml,
group-apparmor-standalone-tpl.yaml,
group-ostree-common-tpl.yaml,
iptables-nmap.yaml ]
templates: *templates-minimal-ostree
variables:
pretty: "ARM64 using minimal OStree image"
device_type: r8a7796-m3ulcb
arch: arm64
image_type: minimal
board: uboot
boot_method: u-boot
boot_commands:
- run bootcmd_mmc0
needs_dtb: true
dtb_root: "renesas/"
<<: *device-arm64-renesas-r-car
- name: apertis-target-arm64-uboot
templates: [ boot-tpl.yaml ]
variables:
pretty: "ARM64 using target image"
device_type: r8a7796-m3ulcb
arch: arm64
image_type: target
board: uboot
boot_method: u-boot
boot_commands:
- run bootcmd_mmc0
needs_dtb: true
dtb_root: "renesas/"
<<: *device-arm64-renesas-r-car
- name: apertis_ostree-target-arm64-uboot
templates: [ group-common-standalone-tpl.yaml,
group-ostree-common-tpl.yaml,
group-modules-standalone-tpl.yaml,
group-apparmor-standalone-tpl.yaml,
iptables-nmap.yaml ]
templates: *templates-target-ostree
variables:
pretty: "ARM64 using target OStree image"
device_type: r8a7796-m3ulcb
arch: arm64
image_type: target
board: uboot
boot_method: u-boot
boot_commands:
- run bootcmd_mmc0
needs_dtb: true
dtb_root: "renesas/"
<<: *device-arm64-renesas-r-car
- name: apertis-minimal-armhf-uboot
templates: [ group-minimal-tpl.yaml,
group-apparmor-tpl.yaml,
iptables-nmap.yaml ]
templates: *templates-minimal-apt
variables:
pretty: "i.MX6 Sabrelite using minimal image"
device_type: imx6q-sabrelite
arch: armhf
image_type: minimal
board: uboot
boot_method: u-boot
boot_commands:
- run bootcmd_mmc0
needs_dtb: true
<<: *device-armhf-imx6-sabrelite
- name: apertis-nfs-armhf-uboot
templates: [ group-nfs-tpl.yaml ]
variables:
pretty: "i.MX6 Sabrelite using minimal image"
device_type: imx6q-sabrelite
arch: armhf
image_type: nfsroot
board: uboot
boot_method: u-boot
boot_commands:
- run bootcmd_mmc0
needs_dtb: true
<<: *device-armhf-imx6-sabrelite
- name: apertis-target-armhf-uboot
templates: *templates-target-apt
variables:
pretty: "i.MX6 Sabrelite using target image"
device_type: imx6q-sabrelite
arch: armhf
image_type: target
board: uboot
boot_method: u-boot
boot_commands:
- run bootcmd_mmc0
needs_dtb: true
<<: *device-armhf-imx6-sabrelite
- name: apertis_ostree-minimal-armhf-uboot
templates: [ group-minimal-standalone-tpl.yaml,
group-apparmor-standalone-tpl.yaml,
......@@ -218,103 +192,53 @@ profiles:
iptables-nmap.yaml ]
variables:
pretty: "i.MX6 Sabrelite using OStree minimal image"
device_type: imx6q-sabrelite
arch: armhf
image_type: minimal
board: uboot
boot_method: u-boot
boot_commands:
- reset
needs_dtb: true
<<: *device-armhf-imx6-sabrelite
- name: apertis_ostree-target-armhf-uboot
templates: [ group-common-standalone-tpl.yaml,
group-ostree-common-tpl.yaml,
group-modules-standalone-tpl.yaml,
group-apparmor-standalone-tpl.yaml,
iptables-nmap.yaml ]
templates: *templates-target-ostree
variables:
pretty: "i.MX6 Sabrelite using OStree target image"
device_type: imx6q-sabrelite
arch: armhf
image_type: target
board: uboot
boot_method: u-boot
boot_commands:
- run bootcmd_mmc0
needs_dtb: true
<<: *device-armhf-imx6-sabrelite
# Internal ARM images
- name: apertis-target-armhf-internal-mx6qsabrelite
templates: *templates-target-apt
variables:
pretty: "i.MX6 Sabrelite using internal target image"
device_type: imx6q-sabrelite
arch: armhf
image_type: target
board: internal-mx6qsabrelite
fs: btrfs
image_variant: collabora
boot_method: u-boot
boot_commands:
- run bootcmd_mmc0
needs_dtb: true
visibility:
group:
- Apertis
<<: *device-armhf-imx6-sabrelite
- name: apertis_ostree-target-armhf-internal-mx6qsabrelite
templates: [ group-common-standalone-tpl.yaml,
group-ostree-common-tpl.yaml,
group-modules-standalone-tpl.yaml,
group-apparmor-standalone-tpl.yaml,
iptables-nmap.yaml ]
templates: *templates-target-ostree
variables:
pretty: "i.MX6 Sabrelite using OStree internal target image"
device_type: imx6q-sabrelite
arch: armhf
image_type: target
board: internal-mx6qsabrelite
fs: btrfs
image_variant: collabora
boot_method: u-boot
boot_commands:
- run bootcmd_mmc0
needs_dtb: true
visibility:
group:
- Apertis
<<: *device-armhf-imx6-sabrelite
- name: apertis-minimal-armhf-internal-mx6qsabrelite
templates: [ group-minimal-tpl.yaml,
group-apparmor-tpl.yaml,
iptables-nmap.yaml ]
templates: *templates-minimal-apt
variables:
pretty: "i.MX6 Sabrelite using internal minimal image"
device_type: imx6q-sabrelite
arch: armhf
image_type: minimal
board: internal-mx6qsabrelite
fs: btrfs
boot_method: u-boot
boot_commands:
- run bootcmd_mmc0
needs_dtb: true
visibility:
group:
- Apertis
<<: *device-armhf-imx6-sabrelite
- name: apertis_ostree-minimal-armhf-internal-mx6qsabrelite
templates: [ group-minimal-standalone-tpl.yaml,
group-apparmor-standalone-tpl.yaml,
group-ostree-common-tpl.yaml,
iptables-nmap.yaml ]
templates: *templates-minimal-ostree
variables:
pretty: "i.MX6 Sabrelite using OStree internal minimal image"
device_type: imx6q-sabrelite
arch: armhf
image_type: minimal
board: internal-mx6qsabrelite
fs: btrfs
boot_method: u-boot
boot_commands:
- run bootcmd_mmc0
needs_dtb: true
visibility:
group:
- Apertis
<<: *device-armhf-imx6-sabrelite
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment