diff --git a/.packit.yaml b/.packit.yaml index f5cba717..509b6f83 100644 --- a/.packit.yaml +++ b/.packit.yaml @@ -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 diff --git a/plans/e2e/aib.fmf b/plans/e2e/aib.fmf new file mode 100644 index 00000000..221ecd3d --- /dev/null +++ b/plans/e2e/aib.fmf @@ -0,0 +1,11 @@ +summary: automotive-image-builder QM build test + +discover: + how: fmf + filter: 'tag:aib' + +execute: + how: tmt + +report: + how: junit diff --git a/tests/aib/check_qm_with_aib.fmf b/tests/aib/check_qm_with_aib.fmf new file mode 100644 index 00000000..87cd8747 --- /dev/null +++ b/tests/aib/check_qm_with_aib.fmf @@ -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 diff --git a/tests/aib/check_qm_with_aib.sh b/tests/aib/check_qm_with_aib.sh new file mode 100644 index 00000000..6ea47e40 --- /dev/null +++ b/tests/aib/check_qm_with_aib.sh @@ -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