mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 10:57:55 +01:00
add flatpak test
This commit is contained in:
parent
d14ca6c503
commit
1b0319ae83
4 changed files with 52 additions and 20 deletions
18
.github/workflows/build-and-test.yml
vendored
18
.github/workflows/build-and-test.yml
vendored
|
|
@ -208,12 +208,14 @@ jobs:
|
|||
fi
|
||||
|
||||
echo "VM ready for tests at IP ${VM_IP}"
|
||||
for check in $(ls tests/vm)
|
||||
do
|
||||
if [[ -f $check && $check != "README.md" ]]
|
||||
then
|
||||
chmod +x $check
|
||||
./${check}
|
||||
fi
|
||||
done
|
||||
echo "Creating Ansible inventory"
|
||||
cat << EOF > ansible_inventory
|
||||
hosts:
|
||||
vm:
|
||||
ansible_host: ${VM_IP}
|
||||
ansible_user: ${VM_USER}
|
||||
ansible_password: ${VM_PASS}
|
||||
EOF
|
||||
|
||||
make test-vm
|
||||
|
||||
|
|
|
|||
9
Makefile
9
Makefile
|
|
@ -187,11 +187,16 @@ clean:
|
|||
install-deps:
|
||||
dnf install -y lorax xorriso skopeo flatpak dbus-daemon ostree
|
||||
|
||||
test: test-iso
|
||||
test: test-iso test-vm
|
||||
|
||||
test-iso:
|
||||
$(eval _TESTS = $(filter-out README.md,$(shell ls tests/iso)))
|
||||
$(foreach test,$(_TESTS),chmod +x tests/iso/$(test))
|
||||
$(foreach test,$(_TESTS),./tests/iso/$(test) deploy.iso)
|
||||
|
||||
.PHONY: clean install-deps test test-iso
|
||||
test-vm:
|
||||
$(eval _TESTS = $(filter-out README.md,$(shell ls tests/vm)))
|
||||
$(foreach test,$(_TESTS),chmod +x tests/vm/$(test))
|
||||
$(foreach test,$(_TESTS),./tests/vm/$(test) deploy.iso)
|
||||
|
||||
.PHONY: clean install-deps test test-iso test-vm
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ See [Customizing](#customizing) for information about customizing the ISO that g
|
|||
The following variables can be used to customize the created ISO.
|
||||
|
||||
| Variable | Description | Default Value |
|
||||
| ----------------- | -------------------------------------------------------- | ------------------------------ |
|
||||
| ------------------- | -------------------------------------------------------- | -------------------------------------------- |
|
||||
| ARCH | Architecture for image to build | x86_64 |
|
||||
| VERSION | Fedora version of installer to build | 39 |
|
||||
| IMAGE_REPO | Repository containing the source container image | quay.io/fedora-ostree-desktops |
|
||||
|
|
@ -31,6 +31,9 @@ The following variables can be used to customize the created ISO.
|
|||
| EXTRA_BOOT_PARAMS | Extra params used by grub to boot the anaconda installer | \[empty\] |
|
||||
| VARIANT | Source container variant\* | Server |
|
||||
| WEB_UI | Enable Anaconda WebUI (experimental) | false |
|
||||
| FLATPAK_REMOTE_NAME | Name of the Flatpak repo | flathub |
|
||||
| FLATPAK_REMOTE_URL | URL to the flatpakrepo file | https://flathub.org/repo/flathub.flatpakrepo |
|
||||
| FLATPAK_REMOTE_REFS | Space delimited list of Flatpak package refs to install | \[empty\] |
|
||||
|
||||
Available options for VARIANT can be found by running `dnf provides system-release`.
|
||||
Variant will be the third item in the package name. Example: `fedora-release-kinoite-39-34.noarch` will be kinoite
|
||||
|
|
|
|||
22
tests/vm/flatpaks.yml
Normal file
22
tests/vm/flatpaks.yml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env ansible-playbook -i ansible_inventory
|
||||
---
|
||||
- name: Test for flatpaks
|
||||
hosts: vm
|
||||
gather_facts: no
|
||||
|
||||
tasks:
|
||||
- name: Get gpg key
|
||||
ansible.builtin.set-fact:
|
||||
found_gpg: "{{ slurpfile['/ostree/deploy/default/var/lib/flatpak/repo'] | base64 }}"
|
||||
expected_gpg: "{{ lookup('ansible.builtin.url', 'https://flathub.org/repo/flathub.flatpakrepo', split_lines=True) | regex_search('^GPGKey=(.*)$', '\\1' multiline=True, ignorecase=True) }}"
|
||||
|
||||
- name: Test GPG key
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- found_gpg == found_gpg
|
||||
fail_msg: "Installed GPG key does not match GPG key in flatpakrepo file"
|
||||
success_msg: "GPG key matches"
|
||||
|
||||
- name: Test updating flatpak packages
|
||||
ansible.builtin.command:
|
||||
cmd: /usr/bin/flatpak update -y
|
||||
Loading…
Add table
Add a link
Reference in a new issue