Skip to content

Commit 3cde22b

Browse files
committed
(gha) Test install in gha on other os's using containers
Github actions only provides a few ubuntu vms. This patch takes a stab at adding a matrix of base os containers to run on ubuntu 24.04 in an attempt to simulate install on those variants. To simplify the workflow, I'm not attempting to install bolt as a runner for these additional cases. Instead, the facts module is checked out and I simulate the run environment by supplying the Bolt PT__installdir var to the task script executed directly.
1 parent 0ca5c9a commit 3cde22b

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

.github/workflows/pr_testing.yaml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ jobs:
2020
run: shellcheck tasks/*.sh
2121

2222
test-install-task-on-ubuntu:
23+
strategy:
24+
matrix:
25+
os: [ubuntu-20.04, ubuntu-22.04]
2326
# Perforce hasn't yet released bolt on 24.04.
24-
runs-on: ubuntu-22.04
27+
runs-on: ${{ matrix.os }}
2528
needs: shellcheck
2629
steps:
2730
- uses: actions/checkout@v4
@@ -38,3 +41,29 @@ jobs:
3841
- name: Verify openvox-agent is installed
3942
run: |-
4043
[[ "$(/opt/puppetlabs/bin/puppet --version)" =~ [0-9]+\.[0-9]+\.[0-9]+ ]]
44+
45+
test-install-task-on-other-os-via-containers:
46+
strategy:
47+
matrix:
48+
image:
49+
- rockylinux/rockylinux:7
50+
- rockylinux/rockylinux:8
51+
- rockylinux/rockylinux:9
52+
- rockylinux/rockylinux:10
53+
- debian/debian:10
54+
- debian/debian:11
55+
- debian/debian:12
56+
- sles/sles:15
57+
needs: shellcheck
58+
container: ${{ matrix.image }}
59+
steps:
60+
- uses: actions/checkout@v4
61+
- name: Checkout facts module
62+
run: git clone https://github.com/puppetlabs/puppetlabs-facts.git ../facts
63+
- name: Run openvox-agent install task manually
64+
env:
65+
PT__installdir: "${PWD}/.."
66+
run: sudo -E tasks/install_linux.sh
67+
- name: Verify openvox-agent is installed
68+
run: |-
69+
[[ "$(/opt/puppetlabs/bin/puppet --version)" =~ [0-9]+\.[0-9]+\.[0-9]+ ]]

0 commit comments

Comments
 (0)