-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
20e673c
commit 504719e
Showing
2 changed files
with
73 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: 'runner-cleanup' | ||
description: 'Clean leftover VMs nd prepare configuration files' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Delete all existing VirtualBox VMs | ||
shell: bash | ||
run: | | ||
VBoxManage list vms | | ||
sed 's/.*{\([-[:xdigit:]]\+\)}$/\1/' | | ||
xargs -I% sh -c "VBoxManage controlvm % poweroff; sleep 3; VBoxManage unregistervm % --delete" | ||
- name: Delete existing virsh VMs | ||
shell: bash | ||
run: | | ||
virsh list --all --name | | ||
xargs -I% sh -c "virsh destroy %; sleep 3; virsh undefine % --remove-all-storage" | ||
- name: Add Ansible configuration for pkgproxy | ||
shell: bash | ||
run: | | ||
echo 'custom_repos_servers: ["http://10.0.2.2:8080/$repo/os/$arch"]' > ansible/group_vars/all/99-ci-pkgproxy.yaml | ||
- name: Add Ansible variables for testing | ||
shell: bash | ||
run: | | ||
echo ' | ||
global_portable_image: true | ||
bluetooth_override: active | ||
xfce_user_customizations_kvantum_theme: KvAdaptaDark | ||
xscreensaver_override: active | ||
' > ansible/group_vars/all/90-ci-defaults.yaml |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Test the playbook | ||
|
||
on: | ||
push: | ||
branches: | ||
- ci | ||
|
||
jobs: | ||
install_media: | ||
runs-on: [self-hosted, linux] | ||
strategy: | ||
matrix: | ||
config: | ||
- disksetup: disksetup/mbr_singlepart/ | ||
provider: virtualbox-iso | ||
- disksetup: disksetup/mbr_lvm/ | ||
provider: qemu | ||
- disksetup: disksetup/bios_gpt_btrfs/ | ||
provider: virtualbox-iso | ||
- disksetup: disksetup/gpt_singlepart/ | ||
provider: virtualbox-uefi | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/runner-cleanup | ||
- name: Select the partitioning flow | ||
run: | | ||
echo 'disksetup_roles_prefix: ${{ matrix.config.disksetup }}' > ansible/group_vars/all/91-ci-disksetup.yaml | ||
- name: Perform system installation | ||
run: | | ||
cd packer | ||
./packer-wrapper.sh build -only=${{ matrix.config.provider }} -timestamp-ui packer-template.json | ||
vagrant_provision: | ||
runs-on: [self-hosted, linux] | ||
strategy: | ||
matrix: | ||
provider: [virtualbox, libvirt] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/runner-cleanup | ||
- name: Bring Vagrant VM up | ||
run: | | ||
cd vagrant | ||
vagrant up --provider ${{ matrix.provider }} |