Skip to content

Commit

Permalink
Add test to run basic qm image build with a-i-b
Browse files Browse the repository at this point in the history
Introducing a new sanity test, that builds a basic qm image with
automotive-image-builder.

Signed-off-by: Mark Kemel <[email protected]>
  • Loading branch information
mkemel committed Jan 15, 2025
1 parent dc06790 commit 66358ef
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,18 @@ jobs:
virtualization:
is-supported: true

- job: tests
trigger: pull_request
identifier: automotive-image-builder
tmt_plan: /plans/e2e/aib
targets:
- epel-9-x86_64
tf_extra_params:
environments:
hardware:
disk:
- size: ">= 20 GB"


- job: propose_downstream
trigger: release
Expand Down
11 changes: 11 additions & 0 deletions plans/e2e/aib.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
summary: automotive-image-builder QM build test

discover:
how: fmf
filter: 'tag:aib'

execute:
how: tmt

report:
how: junit
6 changes: 6 additions & 0 deletions tests/aib/check_qm_with_aib.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
summary: Test basic QM image build with automotive-image-builder
test: /bin/bash ./check_qm_with_aib.sh
duration: 20m
tag: aib
framework: shell
id: 146b987f-698f-4f84-8029-eaa253d049ce
12 changes: 12 additions & 0 deletions tests/aib/check_qm_with_aib.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

# Download basic QM manifest
curl -o qm.aib.yml "https://gitlab.com/CentOS/automotive/src/automotive-image-builder/-/raw/main/examples/qm.aib.yml?ref_type=heads"

USE_QM_COPR="${PACKIT_COPR_PROJECT:-rhcontainerbot/qm}"
COPR_URL="https://download.copr.fedorainfracloud.org/results/${USE_QM_COPR}/epel-9-$(uname -m)/"
EXTRA_REPOS='extra_repos=[{"id":"qm_build","baseurl":"'"$COPR_URL"'"}]'

# Run AIB in container
curl -o auto-image-builder.sh "https://gitlab.com/CentOS/automotive/sample-images/-/raw/main/auto-image-builder.sh?ref_type=heads"
/bin/bash auto-image-builder.sh build --export qcow2 --define "'"$EXTRA_REPOS"'" qm.aib.yml qm.qcow2

0 comments on commit 66358ef

Please sign in to comment.