Skip to content

(gha) Test install in gha on other os's using containers #28

(gha) Test install in gha on other os's using containers

(gha) Test install in gha on other os's using containers #28

Workflow file for this run

---
name: 'PR Tests'
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install ShellCheck
run: sudo apt-get install shellcheck
- name: Run ShellCheck
run: shellcheck tasks/*.sh
test-install-task-on-ubuntu:
strategy:
matrix:
os-details:
- os: ubuntu-20.04
codename: focal
- os: ubuntu-22.04
codename: jammy
# Perforce hasn't yet released bolt on 24.04.
runs-on: ${{ matrix.os-details.os }}
needs: shellcheck
steps:
- uses: actions/checkout@v4
- name: Install Bolt
run: |-
wget https://apt.puppet.com/puppet-tools-release-${{ matrix.os-details.codename }}.deb
sudo dpkg -i puppet-tools-release-${{ matrix.os-details.codename }}.deb
sudo apt update
sudo apt install -y puppet-bolt
- name: Install module dependencies
run: bolt module install
- name: Run openvox-agent install task
run: bolt task run openvox_bootstrap::install --targets localhost --run-as root
- name: Verify openvox-agent is installed
run: |-
[[ "$(/opt/puppetlabs/bin/puppet --version)" =~ [0-9]+\.[0-9]+\.[0-9]+ ]]
test-install-task-on-other-os-via-containers:
strategy:
matrix:
image:
- rockylinux:8
- rockylinux:9
- debian:10
- debian:11
- debian:12
- registry.suse.com/suse/sle15:15
needs: shellcheck
runs-on: ubuntu-latest
container: ${{ matrix.image }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: puppetlabs/puppetlabs-facts
path: facts
- name: debugging
run: |
pwd
echo "Running on ${{ matrix.image }}"
ls -l
echo "${GITHUB_WORKSPACE}"
ls -l "${GITHUB_WORKSPACE}/.."
- name: Ensure wget is installed (apt)
if: startsWith(matrix.image, 'debian')
run: |
if ! command -v wget &> /dev/null; then
apt update
apt install -y wget
fi
- name: Ensure wget is installed (dnf)
if: startsWith(matrix.image, 'rocky')
run: |
if ! command -v wget &> /dev/null; then
dnf install -y wget
fi
- name: Ensure wget is installed (zypper)
if: contains(matrix.image, 'suse')
run: |
if ! command -v wget &> /dev/null; then
zypper install -y wget
fi
- name: Run openvox-agent install task manually
env:
PT__installdir: ${{ github.workspace }}
PT_collection: openvox8
PT_apt_source: "https://apt.overlookinfratech.com"
PT_yum_source: "https://yum.overlookinfratech.com"
run: ./tasks/install_linux.sh
- name: Verify openvox-agent is installed
run: puppet --version | grep -E '[0-9]+\.[0-9]+'