Actions
action #179996
openConverting job templates yaml to use in SCENARIO_DEFINITIONS_YAML
Start date:
2025-04-03
Due date:
% Done:
0%
Estimated time:
Tags:
Description
Is it possible to convert a YAML job template to use it in SCENARIO_DEFINITIONS_YAML?
For example, there is a job template yaml:
$ openqa-cli api job_templates_scheduling/54 | jq -r
defaults:
x86_64:
machine: 64bit
priority: 50
products:
dstr-v1-iso-x86_64:
distri: dstr
version: 'v1'
flavor: iso
dstr-v1-net-x86_64:
distri: dstr
version: 'v1'
flavor: net
scenarios:
x86_64:
dstr-v1-iso-x86_64:
- ts1
dstr-v1-net-x86_64:
- ts2
Is there a way to convert this into a YAML file like this:
$ cat test.yaml
---
products:
dstr-v1-iso:
distri: "dstr"
flavor: "iso"
arch: "x86_64"
version: 'v1'
dstr-v1-iso:
distri: "dstr"
flavor: "net"
arch: "x86_64"
version: 'v1'
machines:
64bit:
backend: "qemu"
job_templates:
ts1:
machine: 64bit
product: "dstr-v1-iso"
settings: {}
ts2:
machine: 64bit
product: "dstr-v1-net"
settings: {}
that it can be used when running tests?:
openqa-cli api -X POST isos --param-file SCENARIO_DEFINITIONS_YAML=test.yaml DISTRI=dstr VERSION=v1 FLAVOR=iso ARCH=x86_64 BUILD=_TEST ISO=distr-x86_64.iso
(This example is small and it can manually convert yaml, but with a large number of tests it may take a long time)
And also, is it possible to specify several machines or product in one test, for example:
ts1:
machine: [64bit, 64bit_uefi]
product: "dstr-v1-iso"
settings: {}
(this yaml is not being validated by OpenQA)
Acceptance Criteria¶
- AC1:
Suggestions¶
- Wait for OP to provide more context to understand the use case
- Proof of Concept script to convert a job group template to a scenario file from #155218: https://gist.github.com/perlpunk/f9022ce90f6dc1507a2b6afe61fcfbd7
- File follow-up tickets
Actions