Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add ubuntu 24.04 (NR-248002) #14

Merged
merged 4 commits into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci_build_docker_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
- ubuntu1804
- ubuntu2004
- ubuntu2204
- ubuntu2404

steps:
- name: Checkout repository
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
jobs:
molecule-packaging-tests:
name: Launch molecule tests with infra-agent package
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
env:
TESTING: 'true'
steps:
Expand All @@ -16,6 +16,6 @@ jobs:
with:
repo_base_url: 'https://download.newrelic.com/infrastructure_agent'
package_name: 'newrelic-infra'
package_version: '1.48.4'
package_version: '1.52.1'
gpg_key: 'https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg'
platforms: "al2,al2023,centos7,centos8,debian-bullseye,debian-buster,redhat8,redhat9,suse15.2,suse15.3,suse15.4,suse15.5,ubuntu1604,ubuntu1804,ubuntu2004,ubuntu2204"
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
molecule/default/molecule.yml
# having the molecule.yml in .gitignore prevents the molecule converge to run.
# https://github.com/ansible/molecule/issues/4117
rubenruizdegauna marked this conversation as resolved.
Show resolved Hide resolved

#molecule/default/molecule.yml
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Github action that tests the correct installation of a given package and version
- ubuntu1804
- ubuntu2004
- ubuntu2204
- ubuntu2404

## Example usage

Expand All @@ -44,7 +45,7 @@ on:
jobs:
molecule-packaging-tests:
name: Launch molecule tests with infra-agent package
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2

Expand Down
5 changes: 1 addition & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ runs:
- name: Configure Molecule and Ansible
shell: bash
run: |
sudo pipx uninstall ansible-core
sudo pip3 install molecule[docker]==4.0.4
sudo pip3 install 'rich>=10.0.0,<11.0.0'
sudo pip3 install ansible-lint[community]==5.3.2
python3 -m pip install molecule==24.2.1 ansible==9.5.1 ansible-core==2.16.6 "molecule-plugins[docker]==23.5.3"
- name: Prepare OS versions
shell: bash
run: ${GITHUB_ACTION_PATH}/prepare_platform.sh ${{ inputs.platforms }}
Expand Down
2 changes: 1 addition & 1 deletion molecule/default/dockerfiles/ubuntu1604
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:16.04

RUN apt-get update \
&& apt-get install -y init ca-certificates sudo curl python3 apt-transport-https\
&& apt-get install -y init ca-certificates sudo curl apt-transport-https python-minimal\
&& apt-get clean all

# Adding fake systemctl
Expand Down
10 changes: 10 additions & 0 deletions molecule/default/dockerfiles/ubuntu2404
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM ubuntu:24.04

RUN apt-get update \
&& apt-get install -y init gpg ca-certificates sudo curl \
&& apt-get clean all

# Adding fake systemctl
RUN curl https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl.py -o /usr/local/bin/systemctl

CMD ["/usr/local/bin/systemctl"]
4 changes: 2 additions & 2 deletions prepare_platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ This is a bash script to make generate a Molecule configutaion.
exit
fi

available_platforms=("al2" "al2023" "centos7" "centos8" "debian-bullseye" "debian-buster" "debian-bookworm" "redhat8" "redhat9" "suse15.2" "suse15.3" "suse15.4" "suse15.5" "ubuntu1604" "ubuntu1804" "ubuntu2004" "ubuntu2204")
available_platforms=("al2" "al2023" "centos7" "centos8" "debian-bullseye" "debian-buster" "debian-bookworm" "redhat8" "redhat9" "suse15.2" "suse15.3" "suse15.4" "suse15.5" "ubuntu1604" "ubuntu1804" "ubuntu2004" "ubuntu2204" "ubuntu2404")

# check_platforms verifies that the provided platforms are available
check_platforms() {
Expand Down Expand Up @@ -71,7 +71,7 @@ set_platforms_config() {
fi

# set python interpreter groups
if [[ $PLATFORM == "al2" || $PLATFORM == "centos7" ]]; then
if [[ $PLATFORM == "al2" || $PLATFORM == "centos7" || $PLATFORM == "ubuntu1604" ]]; then
yq -i ".platforms[] |= select(.name == \"$PLATFORM\") += {\"groups\": [\"python\"]}" $FILE_PATH
else
yq -i ".platforms[] |= select(.name == \"$PLATFORM\") += {\"groups\": [\"python3\"]}" $FILE_PATH
Expand Down
Loading