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

Release 20240516 #5029

Merged
merged 19 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
e670dba
fix(azure-cloud-eventgrid): fix help threshold (#4992)
itoussies Apr 12, 2024
5da7c6f
[CTOR-38][Plugin] New pack Avigilon camera snmp (#4994)
lucie-dubrunfaut Apr 23, 2024
7615cbe
[CTOR-38][Plugin] Fix Packaging- New pack Avigilon camera snmp (#4997)
lucie-dubrunfaut Apr 26, 2024
9c222f4
[CTOR-38][Plugin] Fix Packaging again - New pack Avigilon camera snmp…
lucie-dubrunfaut Apr 26, 2024
2e946ff
[CTOR-26][Plugin] New Pack : oVirt (#4999)
lucie-dubrunfaut Apr 29, 2024
3453935
enh(promote): handle debian package promotion for multiple distributi…
tuntoja Apr 30, 2024
5605da1
[CTOR-514] [Plugin] New Pack RRDCached (#5003)
lucie-dubrunfaut Apr 30, 2024
45dfba8
fix(promote): fix pattern used for promote upload (#5006)
tuntoja Apr 30, 2024
8e06835
ci(plugins-tests) Use docker to install and test each plugins
Evan-Adam May 2, 2024
76ae2d5
[CTOR-566][Plugin] New pack Quanta Restapi (#5019)
lucie-dubrunfaut May 7, 2024
1fb1647
[CTOR-566][Plugin] New pack Quanta Restapi (Fix) (#5021)
lucie-dubrunfaut May 7, 2024
3028639
fix(plugin) cifs,sftp,ftp plugin now check recursively folders (#5015)
Evan-Adam May 14, 2024
531ac59
enh(plugin): refactored the RRDcached plugin (#5025)
omercier May 14, 2024
799aa4e
ci(plugin) update JSON::Path dep on alma8 to same version as other OS
Evan-Adam May 15, 2024
7342846
CTOR-320-community-pr-fix-status-mapping-on-citrix-psu (#5022)
Evan-Adam May 15, 2024
10d004a
fix(plugin) Json PATH lib - CTOR-525 (#5027)
lucie-dubrunfaut May 16, 2024
8fc4482
Empty-Commit
pkippes May 16, 2024
7539428
Merge branch 'master' into release-20240516
tuntoja May 16, 2024
e4a6de7
fix(docker): add ruby-devel as required by npfm for perl-cpan builds
tuntoja May 16, 2024
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
7 changes: 5 additions & 2 deletions .github/actions/promote-to-stable/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ runs:
- name: Promote DEB package to stable
if: ${{ contains(fromJSON('["bullseye", "bookworm"]'), inputs.distrib) }}
run: |
set -eux

echo "[DEBUG] - Distrib: ${{ inputs.distrib }}"
echo "[DEBUG] - Distrib: ${{ inputs.module }}"

echo "[DEBUG] - Get path of testing DEB packages to promote to stable."
SRC_PATHS=$(jf rt s --include-dirs apt-plugins-testing/pool/${{ inputs.module }}/*.deb | jq -r '.[].path')
SRC_PATHS=$(jf rt search --include-dirs apt-plugins-testing/pool/${{ inputs.module }}/*${{ inputs.distrib }}*.deb | jq -r '.[].path')

if [[ ${SRC_PATHS[@]} ]]; then
for SRC_PATH in ${SRC_PATHS[@]}; do
Expand All @@ -86,7 +89,7 @@ runs:
jf rt download $ARTIFACT --flat
done

for ARTIFACT_DL in $(dir|grep -E "*.deb"); do
for ARTIFACT_DL in $(dir -1|grep -E "*${{ inputs.distrib }}*.deb"); do
ARCH=$(echo $ARTIFACT_DL | cut -d '_' -f3 | cut -d '.' -f1)
echo "[DEBUG] - Promoting (upload) $ARTIFACT_DL to stable $TARGET_PATH."
jf rt upload "$ARTIFACT_DL" "$TARGET_PATH" --deb "${{ inputs.distrib }}/main/$ARCH"
Expand Down
28 changes: 28 additions & 0 deletions .github/actions/test-plugins/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "test-plugins"
description: "Test plugin that are passed as parameters"
inputs:
cache-key:
description: "The packaged plugin's cache key"
required: true
plugin-list:
description: "List of plugins to install from the cache"
required: true
package-extension:
description: "Either 'rpm' or 'deb'. Needed to determine the package manager command (dnf or apt-get)."
required: true

runs:
using: "composite"
steps:

- name: get the cached plugin
uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
path: ./*.${{ inputs.package-extension }}
key: ${{ inputs.cache-key }}
fail-on-cache-miss: true

- name: Install, test and remove plugin
shell: bash
run: |
python3 .github/scripts/test-all-plugins.py ${{ inputs.package-extension }} ${{ inputs.plugin-list }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG REGISTRY_URL
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/almalinux:8

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG REGISTRY_URL
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/almalinux:9

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG REGISTRY_URL
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/debian:bookworm

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG REGISTRY_URL
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/debian:bullseye

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG REGISTRY_URL
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/centos:7

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG REGISTRY_URL
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/ubuntu:jammy

Expand Down
68 changes: 68 additions & 0 deletions .github/docker/testing/Dockerfile.testing-plugins-alma8
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/almalinux:8

RUN bash -e <<EOF

dnf install -y 'dnf-command(config-manager)' epel-release zstd jq
dnf config-manager --set-enabled powertools
dnf clean all

# Install Robotframework
dnf install -y python3.11 python3.11-pip
pip3.11 install robotframework robotframework-examples
# Install snmpsim
pip3.11 install snmpsim-lextudio

# Install node
curl -fsSL https://rpm.nodesource.com/setup_21.x | bash -
yum install -y nodejs

# Install mockoon
npm install -g -D @mockoon/cli

# Add Centreon plugins repositories
echo -e '[centreon-plugins-stable]\n\
name=centreon plugins stable x86_64\n\
baseurl=https://packages.centreon.com/rpm-plugins/el8/stable/x86_64\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-stable-noarch]\n\
name=centreon plugins stable noarch\n\
baseurl=https://packages.centreon.com/rpm-plugins/el8/stable/noarch\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-testing]\n\
name=centreon plugins testing x86_64\n\
baseurl=https://packages.centreon.com/rpm-plugins/el8/testing/x86_64\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-testing-noarch]\n\
name=centreon plugins testing noarch\n\
baseurl=https://packages.centreon.com/rpm-plugins/el8/testing/noarch\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-unstable]\n\
name=centreon plugins unstable x86_64\n\
baseurl=https://packages.centreon.com/rpm-plugins/el8/unstable/x86_64\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-unstable-noarch]\n\
name=centreon plugins unstable noarch\n\
baseurl=https://packages.centreon.com/rpm-plugins/el8/unstable/noarch\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n'\
>> /etc/yum.repos.d/centreon-plugins.repo

mkdir -p /var/lib/centreon/centplugins/
chmod 777 /var/lib/centreon/centplugins/

dnf clean all

EOF
67 changes: 67 additions & 0 deletions .github/docker/testing/Dockerfile.testing-plugins-alma9
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/almalinux:9

RUN bash -e <<EOF

dnf install -y 'dnf-command(config-manager)' epel-release zstd jq
dnf config-manager --set-enabled crb
dnf clean all

# Install Robotframework
dnf install -y python3.11 python3.11-pip
pip3.11 install robotframework robotframework-examples
# Install snmpsim
pip3.11 install snmpsim-lextudio

# Install node
curl -fsSL https://rpm.nodesource.com/setup_21.x | bash -
yum install -y nodejs
# Install mockoon
npm install -g -D @mockoon/cli

# Add Centreon plugins repositories
echo -e '[centreon-plugins-stable]\n\
name=centreon plugins stable x86_64\n\
baseurl=https://packages.centreon.com/rpm-plugins/el9/stable/x86_64\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-stable-noarch]\n\
name=centreon plugins stable noarch\n\
baseurl=https://packages.centreon.com/rpm-plugins/el9/stable/noarch\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-testing]\n\
name=centreon plugins testing x86_64\n\
baseurl=https://packages.centreon.com/rpm-plugins/el9/testing/x86_64\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-testing-noarch]\n\
name=centreon plugins testing noarch\n\
baseurl=https://packages.centreon.com/rpm-plugins/el9/testing/noarch\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-unstable]\n\
name=centreon plugins unstable x86_64\n\
baseurl=https://packages.centreon.com/rpm-plugins/el9/unstable/x86_64\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n\
[centreon-plugins-unstable-noarch]\n\
name=centreon plugins unstable noarch\n\
baseurl=https://packages.centreon.com/rpm-plugins/el9/unstable/noarch\n\
enabled=1\n\
gpgcheck=1\n\
gpgkey=https://yum-gpg.centreon.com/RPM-GPG-KEY-CES\n'\
>> /etc/yum.repos.d/centreon-plugins.repo

mkdir -p /var/lib/centreon/centplugins/
chmod 777 /var/lib/centreon/centplugins/

dnf clean all

EOF
48 changes: 48 additions & 0 deletions .github/docker/testing/Dockerfile.testing-plugins-bookworm
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/debian:bookworm

ENV DEBIAN_FRONTEND noninteractive

# fix locale
RUN bash -e <<EOF

apt-get update
apt-get install -y locales libcurl4-openssl-dev curl wget zstd jq
rm -rf /var/lib/apt/lists/*
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
apt-get clean

EOF

ENV LANG en_US.utf8

RUN bash -e <<EOF
apt-get update
# Install Robotframework
apt-get install -y python3-dev python3-pip
rm -rf /usr/lib/python3.11/EXTERNALLY-MANAGED
pip3 install robotframework robotframework-examples
# Install snmpsim
pip3 install snmpsim-lextudio

# Install nodejs
curl -fsSL https://deb.nodesource.com/setup_21.x | bash - &&\
apt-get install -y nodejs

# Install mockoon (needs nodejs)
npm install -g -D @mockoon/cli

# Add Centreon plugins repositories
echo "deb https://packages.centreon.com/apt-plugins-stable/ bookworm main" | tee /etc/apt/sources.list.d/centreon-plugins.list
echo "deb https://packages.centreon.com/apt-plugins-testing/ bookworm main" | tee -a /etc/apt/sources.list.d/centreon-plugins.list
echo "deb https://packages.centreon.com/apt-plugins-unstable/ bookworm main" | tee -a /etc/apt/sources.list.d/centreon-plugins.list
wget -O- https://apt-key.centreon.com | gpg --dearmor | tee /etc/apt/trusted.gpg.d/centreon.gpg > /dev/null 2>&1
apt-get update

mkdir -p /var/lib/centreon/centplugins/
chmod 777 /var/lib/centreon/centplugins/

apt-get clean

EOF
47 changes: 47 additions & 0 deletions .github/docker/testing/Dockerfile.testing-plugins-bullseye
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/debian:bullseye

ENV DEBIAN_FRONTEND noninteractive

# fix locale
RUN bash -e <<EOF

apt-get update
apt-get install -y locales libcurl4-openssl-dev curl wget zstd jq
rm -rf /var/lib/apt/lists/*
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
apt-get clean

EOF

ENV LANG en_US.utf8

RUN bash -e <<EOF
apt-get update
# Install Robotframework
apt-get install -y python3 python3-dev python3-pip
pip3 install robotframework robotframework-examples
# Install snmpsim
pip3 install snmpsim-lextudio

# Install nodejs
curl -fsSL https://deb.nodesource.com/setup_21.x | bash - &&\
apt-get install -y nodejs
# Install mockoon (needs nodejs)
npm install -g -D @mockoon/cli

# Add Centreon plugins repositories
echo "deb https://packages.centreon.com/apt-plugins-stable/ bullseye main" | tee /etc/apt/sources.list.d/centreon-plugins.list
echo "deb https://packages.centreon.com/apt-plugins-testing/ bullseye main" | tee -a /etc/apt/sources.list.d/centreon-plugins.list
echo "deb https://packages.centreon.com/apt-plugins-unstable/ bullseye main" | tee -a /etc/apt/sources.list.d/centreon-plugins.list
wget -O- https://apt-key.centreon.com | gpg --dearmor | tee /etc/apt/trusted.gpg.d/centreon.gpg > /dev/null 2>&1
apt-get update

mkdir -p /var/lib/centreon/centplugins/
chmod 777 /var/lib/centreon/centplugins/

apt-get clean


EOF
45 changes: 45 additions & 0 deletions .github/docker/testing/Dockerfile.testing-plugins-jammy
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/ubuntu:jammy

ENV DEBIAN_FRONTEND noninteractive

# fix locale
RUN bash -e <<EOF

apt-get update
apt-get install -y locales libcurl4-openssl-dev curl wget zstd jq
rm -rf /var/lib/apt/lists/*
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
apt-get clean

EOF

ENV LANG en_US.utf8

RUN bash -e <<EOF
apt-get update
# Install Robotframework
apt-get install -y python3 python3-dev python3-pip
pip3 install robotframework robotframework-examples
# Install snmpsim
pip3 install snmpsim-lextudio

# Install nodejs
curl -fsSL https://deb.nodesource.com/setup_21.x | bash - &&\
apt-get install -y nodejs
# Install mockoon (needs nodejs)
npm install -g -D @mockoon/cli

# Add Centreon plugins repositories
echo "deb https://packages.centreon.com/ubuntu-plugins-testing/ jammy main" | tee -a /etc/apt/sources.list.d/centreon-plugins.list
echo "deb https://packages.centreon.com/ubuntu-plugins-unstable/ jammy main" | tee -a /etc/apt/sources.list.d/centreon-plugins.list
wget -O- https://apt-key.centreon.com | gpg --dearmor | tee /etc/apt/trusted.gpg.d/centreon.gpg > /dev/null 2>&1
apt-get update

mkdir -p /var/lib/centreon/centplugins/
chmod 777 /var/lib/centreon/centplugins/

apt-get clean

EOF
2 changes: 1 addition & 1 deletion .github/scripts/process-plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
packaging_path = re.search('.*\/(centreon-plugin-.*)\/pkg.json', filepath).group(1)

if not packaging_path == packaging["pkg_name"]:
packaging_path = packaging_path + "=>" + packaging["pkg_name"]
packaging_path = packaging["pkg_name"]

directory_path = re.search('^(.+)\/pkg.json', filepath).group(1)

Expand Down
Loading