Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .codespell_ignores
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
passt
2 changes: 1 addition & 1 deletion .github/workflows/ansible-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Install tox, tox-lsr
run: |
set -euxo pipefail
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.9.0"
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.10.0"

- name: Convert role to collection format
id: collection
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ansible-managed-var-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Install tox, tox-lsr
run: |
set -euxo pipefail
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.9.0"
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.10.0"

- name: Run ansible-plugin-scan
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ansible-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Install tox, tox-lsr
run: |
set -euxo pipefail
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.9.0"
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.10.0"

- name: Convert role to collection format
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
tox=tox
virtualenv=virtualenv
fi
pip install "$tox" "$virtualenv" "git+https://github.com/linux-system-roles/tox-lsr@3.9.0"
pip install "$tox" "$virtualenv" "git+https://github.com/linux-system-roles/tox-lsr@3.10.0"
# If you have additional OS dependency packages e.g. libcairo2-dev
# then put them in .github/config/ubuntu-requirements.txt, one
# package per line.
Expand Down
48 changes: 46 additions & 2 deletions .github/workflows/qemu-kvm-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,29 @@ jobs:
python3 -m pip install --upgrade pip
sudo apt update
sudo apt install -y --no-install-recommends git ansible-core genisoimage qemu-system-x86
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.9.0"
pip3 install "git+https://github.com/linux-system-roles/tox-lsr@3.10.0"

# HACK: Drop this when moving this workflow to 26.04 LTS
- name: Update podman to 5.x for compatibility with bootc-image-builder's podman 5
if: steps.check_platform.outputs.supported && endsWith(matrix.scenario.image, '-bootc')
run: |
sed 's/noble/plucky/g' /etc/apt/sources.list.d/ubuntu.sources | sudo tee /etc/apt/sources.list.d/plucky.sources >/dev/null
cat <<EOF | sudo tee /etc/apt/preferences.d/podman.pref >/dev/null
Package: podman buildah golang-github-containers-common crun libgpgme11t64 libgpg-error0 golang-github-containers-image catatonit conmon containers-storage
Pin: release n=plucky
Pin-Priority: 991

Package: libsubid4 netavark passt aardvark-dns containernetworking-plugins libslirp0 slirp4netns
Pin: release n=plucky
Pin-Priority: 991

Package: *
Pin: release n=plucky
Pin-Priority: 400
EOF

sudo apt update
sudo apt install -y podman crun conmon containers-storage

- name: Configure tox-lsr
if: steps.check_platform.outputs.supported
Expand All @@ -117,7 +139,7 @@ jobs:
if: steps.check_platform.outputs.supported && startsWith(matrix.scenario.env, 'qemu')
run: >-
tox -e ${{ matrix.scenario.env }} -- --image-name ${{ matrix.scenario.image }} --make-batch
--log-level debug --skip-tags tests::infiniband,tests::nvme,tests::scsi
--log-level debug $TOX_ARGS --skip-tags tests::bootc-e2e
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you remove previous skip tags here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also use TOX_ARGS: "--skip-tags tests::infiniband,tests::nvme,tests::scsi" for this.

Copy link
Contributor Author

@martinpitt martinpitt May 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because that's the exact value of the defined TOX_ARGS. The workflow defines that at the top but never actually used it. And it seems sensible to be able to parameterize it. Otherwise we could drop the unused definition at the top and repeat the value (or not, it's not super important for bootc e2e tests)

--lsr-report-errors-url DEFAULT --

- name: Qemu result summary
Expand Down Expand Up @@ -164,6 +186,28 @@ jobs:
done
exit $rc

- name: Run bootc validation tests in QEMU
if: steps.check_platform.outputs.supported &&
startsWith(matrix.scenario.env, 'container') &&
endsWith(matrix.scenario.image, '-bootc')
run: |
set -euxo pipefail
env=$(echo "${{ matrix.scenario.env }}" | sed 's/^container-/qemu-/')

for image_file in $(ls tests/tmp/*/qcow2/disk.qcow2 2>/dev/null); do
test="tests/$(basename $(dirname $(dirname $image_file))).yml"
if tox -e "$env" -- --image-file "$(pwd)/$image_file" \
--log-level debug $TOX_ARGS \
--lsr-report-errors-url DEFAULT \
-e __bootc_validation=true \
-- "$test" >out 2>&1; then
mv out "${test}-PASS.log"
else
mv out "${test}-FAIL.log"
exit 1
fi
done

- name: Upload test logs on failure
if: failure()
uses: actions/upload-artifact@v4
Expand Down
30 changes: 30 additions & 0 deletions tests/tests_bootc_e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# SPDX-License-Identifier: MIT
---
- name: Bootc end-to-end test
hosts: all
tags:
- tests::bootc-e2e
gather_facts: false # test that role works in this case
tasks:
- name: Bootc image build preparation
when: ansible_connection == "buildah"
block:
- name: Run the role
include_role:
name: linux-system-roles.sudo
vars:
sudo_check_if_configured: false

- name: Create QEMU deployment
delegate_to: localhost
command: "{{ lsr_scriptdir }}/bootc-buildah-qcow.sh {{ ansible_host }}"
changed_when: true

- name: Validation of deployed image
when: ansible_connection != "buildah"
block:
- name: Check header for ansible_managed, fingerprint
include_tasks: tasks/check_present_header.yml
vars:
__file: /etc/sudoers
__fingerprint: system_role:sudo
Loading