Skip to content

Commit

Permalink
Release 20241010 (#5231)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkippes authored Oct 10, 2024
2 parents 6cda88a + cda1705 commit 4639a10
Show file tree
Hide file tree
Showing 277 changed files with 16,828 additions and 1,187 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tests/resources/spellcheck/*.txt diff
4 changes: 3 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ Mention the automated tests included in this FOR (what they test like mode/optio
- [ ] I have followed the **[coding style guidelines](https://github.com/centreon/centreon-plugins/blob/develop/doc/en/developer/plugins_global.md#5-code-style-guidelines)** provided by Centreon
- [ ] I have commented my code, especially **hard-to-understand areas** of the PR.
- [ ] I have **rebased** my development branch on the base branch (develop).
- [ ] In case of a new plugin, I have created the new packaging directory accordingly.
- [ ] I have implemented automated tests related to my commits.
- [ ] I have reviewed all the help messages in all the .pm files I have modified.
- [ ] All sentences begin with a capital letter.
- [ ] All sentences are terminated by a period.
- [ ] I am able to understand all the help messages, if not, exchange with the PO or TW to rewrite them.
- [ ] I am able to understand all the help messages, if not, exchange with the PO or TW to rewrite them.
- [ ] After having created the PR, I will make sure that all the tests provided in this PR have run and passed.
10 changes: 8 additions & 2 deletions .github/actions/package-nfpm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ runs:
rm -f ./*.rpm
shell: bash

- name: Parse distrib name
id: parse-distrib
uses: ./.github/actions/parse-distrib
with:
distrib: ${{ inputs.distrib }}

- name: Import gpg key
env:
RPM_GPG_SIGNING_KEY: ${{ inputs.rpm_gpg_key }}
Expand Down Expand Up @@ -84,9 +90,9 @@ runs:
else
export DIST=""
if [ "${{ inputs.stability }}" == "unstable" ] || [ "${{ inputs.stability }}" == "canary" ]; then
export RELEASE="$RELEASE~${{ inputs.distrib }}"
export RELEASE="$RELEASE${{ steps.parse-distrib.outputs.package_distrib_separator }}${{ steps.parse-distrib.outputs.package_distrib_name }}"
else
export RELEASE="1~${{ inputs.distrib }}"
export RELEASE="1${{ steps.parse-distrib.outputs.package_distrib_separator }}${{ steps.parse-distrib.outputs.package_distrib_name }}"
fi
export APACHE_USER="www-data"
export APACHE_GROUP="www-data"
Expand Down
46 changes: 46 additions & 0 deletions .github/actions/parse-distrib/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: "parse-distrib"
description: "parse distrib name."
inputs:
distrib:
description: "The distribution name"
required: true
outputs:
package_distrib_separator:
description: "Separator between package version and distrib number"
value: ${{ steps.parse-distrib.outputs.package_distrib_separator }}
package_distrib_name:
description: "Distribution suffix in package name"
value: ${{ steps.parse-distrib.outputs.package_distrib_name }}

runs:
using: "composite"
steps:
- name: Parse distrib
id: parse-distrib
run: |
if [[ "${{ inputs.distrib }}" == "centos7" || "${{ inputs.distrib }}" == "el7" ]]; then
PACKAGE_DISTRIB_SEPARATOR="."
PACKAGE_DISTRIB_NAME="el7"
elif [[ "${{ inputs.distrib }}" == "alma8" || "${{ inputs.distrib }}" == "el8" ]]; then
PACKAGE_DISTRIB_SEPARATOR="."
PACKAGE_DISTRIB_NAME="el8"
elif [[ "${{ inputs.distrib }}" == "alma9" || "${{ inputs.distrib }}" == "el9" ]]; then
PACKAGE_DISTRIB_SEPARATOR="."
PACKAGE_DISTRIB_NAME="el9"
elif [[ "${{ inputs.distrib }}" == "bullseye" ]]; then
PACKAGE_DISTRIB_SEPARATOR="+"
PACKAGE_DISTRIB_NAME="deb11u1"
elif [[ "${{ inputs.distrib }}" == "bookworm" ]]; then
PACKAGE_DISTRIB_SEPARATOR="+"
PACKAGE_DISTRIB_NAME="deb12u1"
elif [[ "${{ inputs.distrib }}" == "jammy" ]]; then
PACKAGE_DISTRIB_SEPARATOR="-"
PACKAGE_DISTRIB_NAME="0ubuntu.22.04"
else
echo "::error::Distrib ${{ inputs.distrib }} cannot be parsed"
exit 1
fi
echo "package_distrib_separator=$PACKAGE_DISTRIB_SEPARATOR" >> $GITHUB_OUTPUT
echo "package_distrib_name=$PACKAGE_DISTRIB_NAME" >> $GITHUB_OUTPUT
shell: bash
13 changes: 9 additions & 4 deletions .github/actions/promote-to-stable/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ runs:
JF_URL: https://centreon.jfrog.io
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}

- name: Parse distrib name
id: parse-distrib
uses: ./.github/actions/parse-distrib
with:
distrib: ${{ inputs.distrib }}

- name: Promote RPM packages to stable
if: ${{ startsWith(inputs.distrib, 'el') }}
run: |
Expand Down Expand Up @@ -68,15 +74,15 @@ runs:
echo "[DEBUG] - Distrib: ${{ inputs.module }}"
echo "[DEBUG] - Get path of testing DEB packages to promote to stable."
SRC_PATHS=$(jf rt search --include-dirs apt-plugins-testing/pool/${{ inputs.module }}/*${{ inputs.distrib }}*.deb | jq -r '.[].path')
SRC_PATHS=$(jf rt search --include-dirs apt-plugins-testing/pool/${{ inputs.module }}/*${{ steps.parse-distrib.outputs.package_distrib_name }}*.deb | jq -r '.[].path')
if [[ ${SRC_PATHS[@]} ]]; then
for SRC_PATH in ${SRC_PATHS[@]}; do
echo "[DEBUG] - Source path found: $SRC_PATH"
done
else
echo "[DEBUG] - No source path found."
continue
echo "::warning::No source path found."
exit 0
fi
echo "[DEBUG] - Build target path."
Expand All @@ -95,5 +101,4 @@ runs:
jf rt upload "$ARTIFACT_DL" "$TARGET_PATH" --deb "${{ inputs.distrib }}/main/$ARCH"
done
rm -f *.deb
shell: bash
35 changes: 24 additions & 11 deletions .github/docker/packaging/Dockerfile.packaging-plugins-bookworm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/debian:bookworm

ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive

# fix locale
RUN bash -e <<EOF
Expand All @@ -15,7 +15,7 @@ apt-get clean

EOF

ENV LANG en_US.utf8
ENV LANG=en_US.utf8

RUN bash -e <<EOF

Expand All @@ -24,26 +24,39 @@ apt-get update
echo 'http://deb.debian.org/debian' | apt-get install -y pbuilder

apt-get install -y \
dh-make \
aptitude \
ca-certificates \
libssh-dev \
lintian \
quilt \
git-buildpackage \
cpanminus \
curl \
debmake \
devscripts \
dh-make \
dh-make-perl \
fakeroot \
curl \
gcc \
git \
python3 \
libjson-perl \
git-buildpackage \
jq \
libapp-fatpacker-perl \
libcrypt-openssl-guess-perl \
libcurl4-openssl-dev \
libczmq-dev \
libfile-copy-recursive-perl \
jq \
libjson-perl \
libmodule-build-tiny-perl \
libmodule-install-perl \
libssh-dev \
lintian \
python3 \
quilt \
ruby \
uuid-dev \
zstd

cpanm Module::Build::Tiny
cpanm Module::Install
gem install fpm

echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
apt-get update
apt-get install -y nfpm
Expand Down
40 changes: 28 additions & 12 deletions .github/docker/packaging/Dockerfile.packaging-plugins-bullseye
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/debian:bullseye

ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive

# fix locale
RUN bash -e <<EOF
Expand All @@ -15,34 +15,50 @@ apt-get clean

EOF

ENV LANG en_US.utf8
ENV LANG=en_US.utf8

RUN bash -e <<EOF

apt-get update

apt-get install -y \
dh-make \
aptitude \
ca-certificates \
libssh-dev \
lintian \
pbuilder \
quilt \
git-buildpackage \
cpanminus \
curl \
debmake \
devscripts \
dh-make \
dh-make-perl \
fakeroot \
curl \
gcc \
git \
python3 \
libjson-perl \
git-buildpackage \
jq \
libapp-fatpacker-perl \
libcurl4-openssl-dev \
libczmq-dev \
libczmq-dev\
libfile-copy-recursive-perl \
jq \
libjson-perl \
libmodule-build-tiny-perl \
libmodule-install-perl \
libssh-dev \
lintian \
pbuilder \
python3 \
quilt \
ruby \
uuid-dev \
zstd

cpanm Module::Build::Tiny
cpanm Module::Install
cpanm Crypt::OpenSSL::Guess

gem install fpm


echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
apt-get update
apt-get install -y nfpm
Expand Down
37 changes: 26 additions & 11 deletions .github/docker/packaging/Dockerfile.packaging-plugins-jammy
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG REGISTRY_URL=docker.io

FROM ${REGISTRY_URL}/ubuntu:jammy

ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive

# fix locale
RUN bash -e <<EOF
Expand All @@ -15,7 +15,7 @@ apt-get clean

EOF

ENV LANG en_US.utf8
ENV LANG=en_US.utf8

RUN bash -e <<EOF

Expand All @@ -24,26 +24,41 @@ apt-get update
echo 'http://deb.debian.org/debian' | apt-get install -y pbuilder

apt-get install -y \
dh-make \
aptitude \
ca-certificates \
libssh-dev \
lintian \
quilt \
git-buildpackage \
cpanminus \
curl \
debmake \
devscripts \
dh-make \
dh-make-perl \
fakeroot \
curl \
gcc \
git \
python3 \
libjson-perl \
git-buildpackage \
jq \
libapp-fatpacker-perl \
libcurl4-openssl-dev \
libczmq-dev \
libczmq-dev\
libfile-copy-recursive-perl \
jq \
libjson-perl \
libmodule-build-tiny-perl \
libmodule-install-perl \
libssh-dev \
lintian \
python3 \
quilt \
ruby \
uuid-dev \
zstd

cpanm Module::Build::Tiny
cpanm Module::Install
cpanm Crypt::OpenSSL::Guess

gem install fpm

echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
apt-get update
apt-get install -y nfpm
Expand Down
29 changes: 29 additions & 0 deletions .github/docker/packaging/Dockerfile.packaging-plugins-java-alma8
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ARG REGISTRY_URL

FROM ${REGISTRY_URL}/almalinux:8

RUN bash -e <<EOF

dnf install -y \
git \
wget \
zstd \
https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.rpm

cd /usr/local/src
wget https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz
tar zxf apache-maven-3.8.8-bin.tar.gz
ln -s /usr/local/src/apache-maven-3.8.8/bin/mvn /usr/bin/mvn
rm -f apache-maven-3.8.8-bin.tar.gz

echo '[goreleaser]
name=GoReleaser
baseurl=https://repo.goreleaser.com/yum/
enabled=1
gpgcheck=0' | tee /etc/yum.repos.d/goreleaser.repo
dnf install -y nfpm
dnf clean all

EOF

WORKDIR /src
29 changes: 29 additions & 0 deletions .github/docker/packaging/Dockerfile.packaging-plugins-java-alma9
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
ARG REGISTRY_URL

FROM ${REGISTRY_URL}/almalinux:9

RUN bash -e <<EOF

dnf install -y \
git \
wget \
zstd \
https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.rpm

cd /usr/local/src
wget https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.tar.gz
tar zxf apache-maven-3.8.8-bin.tar.gz
ln -s /usr/local/src/apache-maven-3.8.8/bin/mvn /usr/bin/mvn
rm -f apache-maven-3.8.8-bin.tar.gz

echo '[goreleaser]
name=GoReleaser
baseurl=https://repo.goreleaser.com/yum/
enabled=1
gpgcheck=0' | tee /etc/yum.repos.d/goreleaser.repo
dnf install -y nfpm
dnf clean all

EOF

WORKDIR /src
Loading

0 comments on commit 4639a10

Please sign in to comment.