Skip to content

Commit

Permalink
Centreon 24.04 (Jira release #19606#)
Browse files Browse the repository at this point in the history
  • Loading branch information
paloth authored Jan 25, 2024
2 parents 919f04d + 9e2d6f5 commit a47cfce
Show file tree
Hide file tree
Showing 1,552 changed files with 21,409 additions and 16,638 deletions.
7 changes: 7 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
* @centreon/owners-cpp

.github/** @centreon/owners-pipelines
packaging/** @centreon/owners-pipelines
selinux/** @centreon/owners-pipelines

tests/** @centreon/owners-robot-e2e
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Please include a short resume of the changes and what is the purpose of PR. Any

## Target serie

- [ ] 21.10.x
- [ ] 22.04.x
- [ ] 22.10.x
- [ ] 23.04.x
- [ ] 23.10.x (master)
- [ ] 23.10.x
- [ ] 24.04.x (master)

<h2> How this pull request can be tested ? </h2>

Expand Down
4 changes: 2 additions & 2 deletions .github/actions/delivery/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ runs:
echo "extfile=deb" >> $GITHUB_ENV
- name: Use cache files
uses: actions/cache@v3
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ./*.${{ env.extfile }}
key: ${{ inputs.cache_key }}

- uses: jfrog/setup-jfrog-cli@v3
- uses: jfrog/setup-jfrog-cli@901bb9632db90821c2d3f076012bdeaf66598555 # v3.4.1
env:
JF_URL: https://centreon.jfrog.io
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ runs:
shell: bash

- name: Cache packages
uses: actions/cache/save@v3
uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ./*.${{ inputs.package_extension }}
key: ${{ inputs.cache_key }}
35 changes: 28 additions & 7 deletions .github/actions/promote-to-stable/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ inputs:
runs:
using: "composite"
steps:
- uses: jfrog/setup-jfrog-cli@v3
- uses: jfrog/setup-jfrog-cli@901bb9632db90821c2d3f076012bdeaf66598555 # v3.4.1
env:
JF_URL: https://centreon.jfrog.io
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}
Expand All @@ -39,9 +39,17 @@ runs:
echo "[DEBUG] - Minor version: ${{ inputs.minor_version }}"
echo "[DEBUG] - Distrib: ${{ inputs.distrib }}"
# Cloud specific promote
# delivery by default to onprem, override to internal if base branch is master
if [[ $GITHUB_BASE_REF == "master" ]]; then
ROOT_REPO_PATH="rpm-standard-internal"
else
ROOT_REPO_PATH="rpm-standard"
fi
for ARCH in "noarch" "x86_64"; do
echo "[DEBUG] - Get artifactory path of $ARCH testing artifacts to promote to stable."
SRC_PATHS=$(jf rt s --include-dirs rpm-standard/${{ inputs.major_version }}/${{ inputs.distrib }}/testing/$ARCH/${{ inputs.module_name }}/*.rpm | jq -r '.[].path')
SRC_PATHS=$(jf rt s --include-dirs $ROOT_REPO_PATH/${{ inputs.major_version }}/${{ inputs.distrib }}/testing/$ARCH/${{ inputs.module_name }}/*.rpm | jq -r '.[].path')
if [[ ${SRC_PATHS[@]} ]]; then
for SRC_PATH in ${SRC_PATHS[@]}; do
echo "[DEBUG] - Source path found: $SRC_PATH"
Expand All @@ -51,13 +59,18 @@ runs:
continue
fi
echo "[DEBUG] - Build $ARCH artifactory target path."
TARGET_PATH="rpm-standard/${{ inputs.major_version }}/${{ inputs.distrib }}/${{ inputs.stability }}/$ARCH/RPMS/${{ inputs.module_name }}/"
TARGET_PATH="$ROOT_REPO_PATH/${{ inputs.major_version }}/${{ inputs.distrib }}/${{ inputs.stability }}/$ARCH/RPMS/${{ inputs.module_name }}/"
echo "[DEBUG] - Target path: $TARGET_PATH"
echo "[DEBUG] - Promoting $ARCH testing artifacts to stable."
for ARTIFACT in ${SRC_PATHS[@]}; do
echo "[DEBUG] - Promoting $ARTIFACT to stable on artifactory."
jf rt cp $ARTIFACT $TARGET_PATH --flat=true
echo "[DEBUG] - Downloading $ARTIFACT from TESTING."
jf rt download $ARTIFACT --flat
done
for ARTIFACT_DL in $(dir|grep -E "*.rpm"); do
echo "[DEBUG] - Promoting (upload) $ARTIFACT_DL to stable $TARGET_PATH."
jf rt upload "$ARTIFACT_DL" "$TARGET_PATH" --flat
done
rm -f *.rpm
done
shell: bash

Expand Down Expand Up @@ -86,7 +99,15 @@ runs:
echo "[DEBUG] - Promoting DEB testing artifacts to stable."
for ARTIFACT in ${SRC_PATHS[@]}; do
echo "[DEBUG] - Promoting $ARTIFACT to stable."
jf rt cp $ARTIFACT $TARGET_PATH --flat=true
echo "[DEBUG] - Downloading $ARTIFACT from TESTING."
jf rt download $ARTIFACT --flat
done
for ARTIFACT_DL in $(dir|grep -E "*.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"
done
rm -f *.deb
shell: bash
2 changes: 1 addition & 1 deletion .github/actions/release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ runs:
--header 'Content-Type: application/json' \
--data ''$VERSION_DATA''
shell: bash
shell: bash
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: '/'
schedule:
interval: weekly
open-pull-requests-limit: 10
labels:
- 'dependencies'
- 'gha'
5 changes: 2 additions & 3 deletions .github/docker/Dockerfile.centreon-collect-alma8
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ dnf install -y cmake \
MariaDB-server \
gnutls-devel \
libgcrypt-devel \
libssh2-devel \
lua-devel \
make \
perl-ExtUtils-Embed.noarch \
Expand All @@ -56,7 +55,7 @@ dnf install -y cmake \

dnf update libarchive

pip3 install conan==1.57.0 --prefix=/usr --upgrade
pip3 install conan==1.61.0 --prefix=/usr --upgrade
rm -rf ~/.conan/profiles/default

EOF
Expand All @@ -66,7 +65,7 @@ COPY conanfile.txt .
RUN <<EOF

cat conanfile.txt
conan install . -s compiler.cppstd=14 -s compiler.libcxx=libstdc++11 --build=missing
conan install . -s compiler.cppstd=17 -s compiler.libcxx=libstdc++11 --build=missing

EOF

Expand Down
7 changes: 3 additions & 4 deletions .github/docker/Dockerfile.centreon-collect-alma9
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ baseurl=https://repo.goreleaser.com/yum/
enabled=1
gpgcheck=0' | tee /etc/yum.repos.d/goreleaser.repo

dnf install -y cmake \
dnf --best install -y cmake \
gcc \
gcc-c++ \
gdb \
Expand All @@ -31,7 +31,6 @@ dnf install -y cmake \
mariadb \
gnutls-devel \
libgcrypt-devel \
libssh2-devel \
lua-devel \
make \
perl-ExtUtils-Embed.noarch \
Expand All @@ -49,7 +48,7 @@ dnf install -y cmake \
nfpm \
sudo

pip3 install conan==1.57.0 --prefix=/usr --upgrade
pip3 install conan==1.61.0 --prefix=/usr --upgrade
rm -rf ~/.conan/profiles/default

EOF
Expand All @@ -59,7 +58,7 @@ COPY conanfile.txt .
RUN <<EOF

cat conanfile.txt
conan install . -s compiler.cppstd=14 -s compiler.libcxx=libstdc++11 --build=missing
conan install . -s compiler.cppstd=17 -s compiler.libcxx=libstdc++11 --build=missing

EOF

Expand Down
53 changes: 53 additions & 0 deletions .github/docker/Dockerfile.centreon-collect-alma9-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
ARG REGISTRY_URL

FROM ${REGISTRY_URL}/almalinux:9

COPY . /tmp/collect

RUN <<EOF

# Base dnf configuration.
echo 'http_caching=none' >> /etc/yum.conf
echo 'assumeyes=1' >> /etc/yum.conf
sed -i 's/best=True/best=False/g' /etc/dnf/dnf.conf
dnf install -y dnf-plugins-core
dnf config-manager --set-enabled crb

dnf install -y epel-release

dnf --best install -y \
gcc \
gcc-c++ \
gdb \
git \
openssh-server \
mariadb-server \
mariadb \
gnutls \
libgcrypt \
lua \
perl-ExtUtils-Embed \
python3 \
python3-devel \
python3-pip \
perl-Thread-Queue \
rrdtool \
perl \
procps-ng \
zstd \
psmisc \
sudo

echo "install robot and dependencies"

pip3 install -U robotframework robotframework-databaselibrary robotframework-httpctrl robotframework-examples pymysql python-dateutil psutil
pip3 install grpcio grpcio_tools py-cpuinfo cython unqlite gitpython boto3

cd /tmp/collect

.github/scripts/collect-prepare-test-robot.sh mariadb

/bin/rm -rf /tmp/collect

EOF

4 changes: 2 additions & 2 deletions .github/docker/Dockerfile.centreon-collect-debian-bullseye
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
pip3 install conan==1.57.0
pip3 install conan==1.61.0
ln -s /usr/local/bin/conan /usr/bin/conan
rm -rf ~/.conan/profiles/default

Expand All @@ -60,7 +60,7 @@ COPY conanfile.txt .
RUN <<EOF

cat conanfile.txt
conan install . -s compiler.cppstd=14 -s compiler.libcxx=libstdc++11 --build='missing'
conan install . -s compiler.cppstd=17 -s compiler.libcxx=libstdc++11 --build='missing'

EOF

Expand Down
53 changes: 53 additions & 0 deletions .github/docker/Dockerfile.centreon-collect-debian-bullseye-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
ARG REGISTRY_URL

FROM ${REGISTRY_URL}/debian:bullseye


COPY . /tmp/collect

RUN <<EOF

apt-get update

apt-get -y install curl \
gcc \
g++ \
gdb \
git \
mariadb-server \
openssh-server \
libmariadb3 \
librrd8 \
libgnutlsxx28 \
liblua5.3 \
python3 \
python3-dev \
python3-pip \
libperl-dev \
libgcrypt20 \
aptitude \
strace \
locales \
rrdtool \
rrdcached \
zstd \
psmisc \
sudo

localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py

pip3 install -U robotframework robotframework-databaselibrary robotframework-httpctrl robotframework-examples pymysql python-dateutil psutil
pip3 install grpcio grpcio_tools py-cpuinfo cython unqlite gitpython boto3


cd /tmp/collect

.github/scripts/collect-prepare-test-robot.sh mariadb

/bin/rm -rf /tmp/collect

EOF

7 changes: 3 additions & 4 deletions .github/docker/Dockerfile.centreon-collect-mysql-alma9
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ baseurl=https://repo.goreleaser.com/yum/
enabled=1
gpgcheck=0' | tee /etc/yum.repos.d/goreleaser.repo

dnf install -y cmake \
dnf --best install -y cmake \
gcc \
gcc-c++ \
gdb \
Expand All @@ -32,7 +32,6 @@ dnf install -y cmake \
gnutls-devel \
iproute \
libgcrypt-devel \
libssh2-devel \
lua-devel \
make \
perl-ExtUtils-Embed.noarch \
Expand All @@ -49,7 +48,7 @@ dnf install -y cmake \
nfpm \
sudo

pip3 install conan==1.57.0 --prefix=/usr --upgrade
pip3 install conan==1.61.0 --prefix=/usr --upgrade
rm -rf ~/.conan/profiles/default

EOF
Expand All @@ -59,7 +58,7 @@ COPY conanfile.txt .
RUN <<EOF

cat conanfile.txt
conan install . -s compiler.cppstd=14 -s compiler.libcxx=libstdc++11 --build=missing
conan install . -s compiler.cppstd=17 -s compiler.libcxx=libstdc++11 --build=missing

EOF

Expand Down
Loading

0 comments on commit a47cfce

Please sign in to comment.