Skip to content

Commit 4b4e0db

Browse files
committed
Feat: Update java-install for Ubuntu 24.04 with Podman
- Switch from Docker to Podman driver for molecule tests - Update GitHub workflow to install Podman and use requirements.txt - Add Ubuntu 24.04 (noble) to supported platforms - Create ansible.cfg with roles_path and deprecation settings - Add requirements.txt for molecule dependencies - Update molecule platforms to ubuntu2204 and ubuntu2404 - Set MOLECULE_PROJECT_DIRECTORY and ANSIBLE_ROLES_PATH in workflow Change-Id: Ie69de29bb2d1d6434b8b29ae775ad8c2e48c5391 Signed-off-by: Anil Belur <[email protected]>
1 parent 9b72a07 commit 4b4e0db

File tree

5 files changed

+35
-20
lines changed

5 files changed

+35
-20
lines changed

.github/workflows/gerrit-verify.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ jobs:
111111
strategy:
112112
matrix:
113113
distro:
114-
- ubuntu2004
115114
- ubuntu2204
115+
- ubuntu2404
116116
fail-fast: false
117117
steps:
118118
- name: Gerrit Checkout
@@ -123,17 +123,21 @@ jobs:
123123
gerrit-project: ${{ inputs.GERRIT_PROJECT }}
124124
gerrit-url: ${{ vars.GERRIT_URL }}
125125
delay: "0s"
126-
- name: Install test dependencies.
126+
- name: Install Podman
127+
run: |
128+
sudo apt-get update
129+
sudo apt-get install -y podman
130+
- name: Install test dependencies
127131
run: |
128132
python -m pip install --upgrade pip
129-
pip3 install ansible ansible-lint molecule-plugins[docker] docker
130-
- name: Run Molecule tests.
131-
run: molecule test
132-
working-directory: ${{env.working-directory}}
133+
pip3 install -r requirements.txt
134+
- name: Run Molecule tests
135+
run: molecule test --platform-name ${{ matrix.distro }}
133136
env:
134137
PY_COLORS: "1"
135138
ANSIBLE_FORCE_COLOR: "1"
136-
MOLECULE_PLATFORM_NAME: ${{ matrix.distro }}
139+
MOLECULE_PROJECT_DIRECTORY: "${{ github.workspace }}"
140+
ANSIBLE_ROLES_PATH: "${{ github.workspace }}/.."
137141

138142
vote:
139143
if: ${{ always() }}

ansible.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[defaults]
2+
roles_path = ..:~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles
3+
deprecation_warnings = False
4+
inject_facts_as_vars = False
5+
6+
[privilege_escalation]
7+
become = True

meta/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ galaxy_info:
2323
- bionic
2424
- focal
2525
- jammy
26+
- noble
2627

2728
galaxy_tags:
2829
- java

molecule/default/molecule.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,23 @@
22
dependency:
33
name: galaxy
44
driver:
5-
name: docker
5+
name: podman
66
platforms:
7-
# - name: centos7
8-
# image: centos:7
9-
# - name: centos8
10-
# image: quay.io/centos/centos:stream8
11-
# - name: centos9
12-
# image: quay.io/centos/centos:stream9
13-
# - name: ubuntu1804
14-
# image: ubuntu:18.04
15-
- name: ubuntu2004
16-
image: ubuntu:20.04
177
- name: ubuntu2204
188
image: ubuntu:22.04
9+
pre_build_image: false
1910
- name: ubuntu2404
2011
image: ubuntu:24.04
12+
pre_build_image: false
2113
provisioner:
2214
name: ansible
23-
# Fix for role path finding in latest molecule versions (~25.4.0)
2415
env:
25-
ANSIBLE_ROLES_PATH: ../../../
16+
ANSIBLE_CONFIG: ${MOLECULE_PROJECT_DIRECTORY}/ansible.cfg
17+
inventory:
18+
host_vars:
19+
ubuntu2204:
20+
ansible_python_interpreter: /usr/bin/python3
21+
ubuntu2404:
22+
ansible_python_interpreter: /usr/bin/python3
23+
verifier:
24+
name: ansible

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
ansible
2+
ansible-lint
3+
molecule
4+
molecule-plugins[podman]

0 commit comments

Comments
 (0)