-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve raw image inputs and test (#164)
* Improve raw image inputs and test - change disk.raw/disk.mbr into disk.efi/disk.bios - keep old values valid for those inputs - Expand test to cover BIOS raw image - Expand tests to cover more surface testing for expected values - Fix wrong swithc on deployer raw image generation Signed-off-by: Itxaka <[email protected]> * Even more fixes - move constants to constants - fix tests to wait for active boot - use constants in tests - rename constants to make the diff efi/bios Signed-off-by: Itxaka <[email protected]> * Apply suggestions from code review Co-authored-by: Dimitris Karakasilis <[email protected]> * Fix image fs Signed-off-by: Itxaka <[email protected]> --------- Signed-off-by: Itxaka <[email protected]> Co-authored-by: Dimitris Karakasilis <[email protected]>
- Loading branch information
1 parent
2044e70
commit 6d4e17c
Showing
11 changed files
with
232 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,7 +78,7 @@ jobs: | |
fetch-depth: 0 | ||
- name: Build | ||
run: earthly +test-bootable | ||
test-bootable-raw: | ||
test-bootable-raw-efi: | ||
runs-on: kvm | ||
steps: | ||
- uses: earthly/[email protected] | ||
|
@@ -108,7 +108,7 @@ jobs: | |
tags: auroraboot:latest | ||
- name: Generate raw image | ||
run: | | ||
docker run --rm --privileged -v $PWD/build/:/output auroraboot:latest --debug --set "disable_http_server=true" --set "disable_netboot=true" --set "disk.raw=true" --set "disk.size=16000" --set "container_image=quay.io/kairos/ubuntu:24.04-core-amd64-generic-v3.2.3" --set "state_dir=/output" | ||
docker run --rm --privileged -v $PWD/build/:/output auroraboot:latest --debug --set "disable_http_server=true" --set "disable_netboot=true" --set "disk.efi=true" --set "disk.size=16000" --set "container_image=quay.io/kairos/ubuntu:24.04-core-amd64-generic-v3.2.3" --set "state_dir=/output" | ||
- name: Test raw image is bootable | ||
env: | ||
FIRMWARE: /usr/share/OVMF/OVMF_CODE.fd | ||
|
@@ -117,10 +117,49 @@ jobs: | |
CPUS: 2 | ||
CREATE_VM: true | ||
KVM: true | ||
SECUREBOOT: true | ||
run: | | ||
export RAW_IMAGE=$(find $PWD/build -name *.raw) | ||
go run github.com/onsi/ginkgo/v2/ginkgo run --label-filter "raw-bootable" -v --fail-fast -r ./e2e | ||
test-bootable-raw-bios: | ||
runs-on: kvm | ||
steps: | ||
- uses: earthly/[email protected] | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Install deps | ||
run: | | ||
sudo apt-get update && sudo apt-get install -y ovmf libvirt-clients libvirt-daemon-system libvirt-daemon virtinst bridge-utils qemu-system-x86 qemu-system-x86 qemu-utils qemu-kvm acl udev | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@master | ||
- name: Build local image | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: false | ||
load: true | ||
builder: ${{ steps.buildx.outputs.name }} | ||
context: . | ||
file: ./Dockerfile | ||
platforms: linux/amd64 | ||
tags: auroraboot:latest | ||
- name: Generate raw image | ||
run: | | ||
docker run --rm --privileged -v $PWD/build/:/output auroraboot:latest --debug --set "disable_http_server=true" --set "disable_netboot=true" --set "disk.bios=true" --set "disk.size=16000" --set "container_image=quay.io/kairos/ubuntu:24.04-core-amd64-generic-v3.2.3" --set "state_dir=/output" | ||
- name: Test raw image is bootable | ||
env: | ||
USE_QEMU: true | ||
MEMORY: 4000 | ||
CPUS: 2 | ||
CREATE_VM: true | ||
KVM: true | ||
SECUREBOOT: false | ||
run: | | ||
# TODO: permissions stuff should be fixed on aurora side, the output dir should contain only | ||
# there required output image/iso and not the leftovers from the build process | ||
sudo chmod -R 777 build | ||
#earthly +test-bootable-raw | ||
export RAW_IMAGE=$(find $PWD/build -name *.raw) | ||
go run github.com/onsi/ginkgo/v2/ginkgo run --label-filter "raw-bootable" -v --fail-fast -r ./e2e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.