Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

Commit ada0f96

Browse files
Merge pull request #67 from Normo/62-switch-to-podman
Switch from molecule-docker to molecule-podman
2 parents 9129634 + 3478b12 commit ada0f96

4 files changed

Lines changed: 184 additions & 206 deletions

File tree

.github/workflows/ci.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
lint:
2525
name: Lint
26-
runs-on: ubuntu-latest
26+
runs-on: ubuntu-22.04
2727
steps:
2828
- name: Check out the codebase.
2929
uses: actions/checkout@v3
@@ -36,7 +36,7 @@ jobs:
3636

3737
license_compliance:
3838
name: Check license compliance with reuse.
39-
runs-on: ubuntu-latest
39+
runs-on: ubuntu-22.04
4040
steps:
4141
- name: Check out the codebase.
4242
uses: actions/checkout@v3
@@ -49,13 +49,13 @@ jobs:
4949

5050
test:
5151
name: Run Molecule tests.
52-
runs-on: ubuntu-latest
52+
runs-on: ubuntu-22.04
5353
strategy:
54-
fail-fast: true
54+
fail-fast: false
5555
matrix:
56-
distro:
57-
- ubuntu2004
58-
- ubuntu2204
56+
image:
57+
- "ghcr.io/hifis-net/ubuntu-systemd:20.04"
58+
- "ghcr.io/hifis-net/ubuntu-systemd:22.04"
5959

6060
steps:
6161
- name: Check out the codebase.
@@ -64,14 +64,28 @@ jobs:
6464
- name: Prepare the job environment.
6565
uses: ./.github/workflows/prepare-action
6666

67+
- name: Install modern podman
68+
run: |
69+
sudo mkdir -p /etc/apt/keyrings
70+
curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_$(lsb_release -rs)/Release.key \
71+
| gpg --dearmor \
72+
| sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null
73+
echo \
74+
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg]\
75+
https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_$(lsb_release -rs)/ /" \
76+
| sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null
77+
sudo apt-get update -qq
78+
sudo apt-get -qq -y install podman
79+
shell: bash
80+
6781
- name: Run Molecule tests.
6882
run: pipenv run molecule test
6983
env:
70-
MOLECULE_DISTRO: ${{ matrix.distro }}
84+
MOLECULE_IMAGE: ${{ matrix.image }}
7185

7286
release:
7387
name: Release new version on Ansible Galaxy
74-
runs-on: ubuntu-latest
88+
runs-on: ubuntu-22.04
7589
if: startsWith(github.ref, 'refs/tags/v')
7690
needs: [lint, license_compliance, test]
7791
steps:

Pipfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ verify_ssl = true
1111
[dev-packages]
1212
yamllint = "~=1.28.0"
1313
ansible-lint = "~=6.8.6"
14-
molecule = {extras = ["docker"], version = "~=4.0.3"}
14+
molecule = {extras = ["podman"], version = "~=4.0.3"}
15+
molecule-podman = "~=2.0.3"
1516
reuse = "~=1.0.0"
1617

1718
[packages]

0 commit comments

Comments
 (0)