Skip to content

Commit

Permalink
MON-137147 Centreon next 24.07 (Jira release #19952#) (#1495)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkippes committed Aug 19, 2024
2 parents 05f3e84 + 124fe9e commit f2e0232
Show file tree
Hide file tree
Showing 984 changed files with 45,288 additions and 27,447 deletions.
2 changes: 1 addition & 1 deletion .github/actions/release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ runs:
JIRA_RELEASE_NAME=""
JIRA_PROJECT_ID="${{ inputs.jira_project_id }}"
JIRA_RELEASE_RELEASED="false"
JIRA_RELEASE_ID="$(git log |grep -E "^\s+Centreon.*#[0-9]{5,}#)" |grep -Eo "([0-9]{5,})" |head -n 1)"
JIRA_RELEASE_ID="$(git log |grep -E "Centreon\ next.*\#[0-9]{5,}\#\)" |grep -o -P "(?<=#)[0-9]{5,}(?=#)" |head -n 1)"
# Create JIRA version for each released component
echo "Creating JIRA releases."
Expand Down
1 change: 1 addition & 0 deletions .github/docker/Dockerfile.centreon-collect-alma9
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dnf --best install -y cmake \
openssh-server \
mariadb-server \
mariadb \
mariadb-connector-c-devel \
gnutls-devel \
libgcrypt-devel \
lua-devel \
Expand Down
2 changes: 1 addition & 1 deletion .github/docker/Dockerfile.centreon-collect-alma9-test
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dnf clean all
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
pip3 install grpcio grpcio_tools py-cpuinfo cython unqlite gitpython boto3 robotframework-requests

cd /tmp/collect

Expand Down
1 change: 1 addition & 0 deletions .github/docker/Dockerfile.centreon-collect-debian-bookworm
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ apt-get -y install git \
mariadb-server \
openssh-server \
libmariadb3 \
libmariadb-dev \
librrd-dev \
libgnutls28-dev \
liblua5.3-dev \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ apt-get clean
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8

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

cd /tmp/collect

Expand Down
1 change: 1 addition & 0 deletions .github/docker/Dockerfile.centreon-collect-debian-bullseye
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ apt-get -y install git \
mariadb-server \
openssh-server \
libmariadb3 \
libmariadb-dev \
librrd-dev \
libgnutls28-dev \
liblua5.3-dev \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ apt-get clean
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8

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
pip3 install grpcio grpcio_tools py-cpuinfo cython unqlite gitpython boto3 robotframework-requests

cd /tmp/collect

Expand Down
1 change: 1 addition & 0 deletions .github/docker/Dockerfile.centreon-collect-mysql-alma9
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ dnf --best install -y cmake \
gdb \
gettext \
git \
mariadb-connector-c-devel \
ninja-build \
openssh-server \
mysql-server \
Expand Down
5 changes: 3 additions & 2 deletions .github/docker/Dockerfile.centreon-collect-mysql-alma9-test
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ dnf --best install -y gcc \
gdb \
git \
openssh-server \
mariadb-connector-c \
mysql-server \
mysql \
gnutls \
Expand All @@ -42,8 +43,8 @@ dnf clean all

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
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 robotframework-requests cryptography

cd /tmp/collect

Expand Down
1 change: 1 addition & 0 deletions .github/docker/Dockerfile.centreon-collect-ubuntu-jammy
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ apt-get -y install cmake \
mariadb-server \
openssh-server \
libmariadb3 \
libmariadb-dev \
librrd-dev \
libgnutls28-dev \
liblua5.3-dev \
Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/collect-prepare-test-robot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ if [ $database_type == 'mysql' ]; then
sleep 5
echo "########################### Init centreon database ############################"

mysql -e "CREATE USER IF NOT EXISTS 'centreon'@'localhost' IDENTIFIED WITH mysql_native_password BY 'centreon'"
mysql -e "CREATE USER IF NOT EXISTS 'root_centreon'@'localhost' IDENTIFIED WITH mysql_native_password BY 'centreon'"
mysql -e "CREATE USER IF NOT EXISTS 'centreon'@'localhost' IDENTIFIED BY 'centreon'"
mysql -e "CREATE USER IF NOT EXISTS 'root_centreon'@'localhost' IDENTIFIED BY 'centreon'"
else
echo "########################### Start MariaDB ######################################"
if [ "$distrib" = "ALMALINUX" ]; then
Expand Down
3 changes: 3 additions & 0 deletions .github/scripts/collect-test-robot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ echo '/tmp/core.%p' > /proc/sys/kernel/core_pattern
#remove git dubious ownership
/usr/bin/git config --global --add safe.directory $PWD

echo "###### git clone opentelemetry-proto #######"
git clone --depth=1 --single-branch https://github.com/open-telemetry/opentelemetry-proto.git opentelemetry-proto

echo "##### Starting tests #####"
cd tests
./init-proto.sh
Expand Down
1 change: 1 addition & 0 deletions .github/scripts/collect-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ tests/ut_engine --gtest_output=xml:ut_engine.xml
tests/ut_clib --gtest_output=xml:ut_clib.xml
tests/ut_connector --gtest_output=xml:ut_connector.xml
tests/ut_common --gtest_output=xml:ut_common.xml
tests/ut_agent --gtest_output=xml:ut_agent.xml
echo "---------------------------------------------------------- end of ut tests ------------------------------------------------"
4 changes: 2 additions & 2 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Download actionlint
id: get_actionlint
Expand All @@ -42,7 +42,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Install Yaml
run: |
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/centreon-collect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
workflow_dispatch:
pull_request:
paths:
- agent/**
- bbdo/**
- broker/**
- ccc/**
Expand All @@ -33,6 +34,7 @@ on:
- master
- "[2-9][0-9].[0-9][0-9].x"
paths:
- agent/**
- bbdo/**
- broker/**
- ccc/**
Expand Down Expand Up @@ -69,10 +71,10 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Login to Registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
registry: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}
username: ${{ secrets.DOCKER_REGISTRY_ID }}
Expand Down Expand Up @@ -105,7 +107,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
path: centreon-collect

Expand Down Expand Up @@ -136,7 +138,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Publish RPM packages
uses: ./.github/actions/delivery
Expand Down Expand Up @@ -171,7 +173,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Publish DEB packages
uses: ./.github/actions/delivery
Expand All @@ -195,7 +197,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Promote ${{ matrix.distrib }} to stable
uses: ./.github/actions/promote-to-stable
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/docker-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,26 +90,26 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Login to Registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
registry: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}
username: ${{ secrets.DOCKER_REGISTRY_ID }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}

- name: Login to Proxy Registry
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
with:
registry: ${{ vars.DOCKER_PROXY_REGISTRY_URL }}
username: ${{ secrets.DOCKER_REGISTRY_ID }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}

- uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
- uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0

- name: Build image ${{ matrix.image }}:${{ matrix.tag }}
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
file: .github/docker/Dockerfile.${{ matrix.dockerfile }}
context: .
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/get-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
release_cloud: ${{ steps.get_version.outputs.release_cloud}}

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: install gh cli on self-hosted runner
run: |
Expand Down Expand Up @@ -101,6 +101,11 @@ jobs:
echo "release_cloud=1" >> $GITHUB_OUTPUT
echo "release_type=$GITHUB_RELEASE_TYPE" >> $GITHUB_OUTPUT
;;
dev-[2-9][0-9].[0-9][0-9].x)
echo "release=`date +%s`.`echo ${{ github.sha }} | cut -c -7`" >> $GITHUB_OUTPUT
echo "release_cloud=0" >> $GITHUB_OUTPUT
echo "release_type=$GITHUB_RELEASE_TYPE" >> $GITHUB_OUTPUT
;;
release* | hotfix*)
# Handle workflow_dispatch run triggers and run a dispatch ONLY for cloud release
GITHUB_RELEASE_BRANCH_BASE_REF_NAME="$(gh pr view $BRANCHNAME -q .baseRefName --json headRefName,baseRefName,state)"
Expand Down Expand Up @@ -128,6 +133,17 @@ jobs:
echo "release_type=$GITHUB_RELEASE_TYPE" >> $GITHUB_OUTPUT
fi
;;
prepare-release-cloud*)
# Set release cloud to 1 (0=not-cloud, 1=cloud)
GITHUB_RELEASE_CLOUD=1
# Debug
echo "GITHUB_RELEASE_TYPE is: $GITHUB_RELEASE_TYPE"
echo "GITHUB_RELEASE_CLOUD is: $GITHUB_RELEASE_CLOUD"
# Github ouputs
echo "release=`date +%s`.`echo ${{ github.sha }} | cut -c -7`" >> $GITHUB_OUTPUT
echo "release_type=$GITHUB_RELEASE_TYPE" >> $GITHUB_OUTPUT
echo "release_cloud=$GITHUB_RELEASE_CLOUD" >> $GITHUB_OUTPUT
;;
*)
echo "release=`date +%s`.`echo ${{ github.sha }} | cut -c -7`" >> $GITHUB_OUTPUT
echo "release_cloud=$GITHUB_RELEASE_CLOUD" >> $GITHUB_OUTPUT
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/libzmq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
shell: bash

- name: cache rpm
uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ./*.rpm
key: ${{ github.run_id }}-${{ github.sha }}-rpm-libzmq-${{ matrix.distrib }}-${{ matrix.arch }}
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
shell: bash

- name: cache deb
uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ./*.deb
key: ${{ github.run_id }}-${{ github.sha }}-deb-libzmq-${{ matrix.distrib }}-${{ matrix.arch }}
Expand All @@ -153,7 +153,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Publish RPM packages
uses: ./.github/actions/delivery
Expand Down Expand Up @@ -188,7 +188,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Publish DEB packages
uses: ./.github/actions/delivery
Expand All @@ -212,7 +212,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Promote ${{ matrix.distrib }} to stable
uses: ./.github/actions/promote-to-stable
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/package-collect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:

steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Install sccache
run: |
Expand All @@ -105,7 +105,7 @@ jobs:
if: ${{ matrix.package_extension == 'rpm' }}
run: |
cd selinux
for MODULE in "centreon-engine" "centreon-broker"; do
for MODULE in "centreon-engine" "centreon-broker" "centreon-monitoring-agent"; do
cd $MODULE
sed -i "s/@VERSION@/${{ inputs.version }}/g" $MODULE.te
make -f /usr/share/selinux/devel/Makefile
Expand Down Expand Up @@ -187,7 +187,8 @@ jobs:
"build/engine/modules/bench/centengine_bench_passive"
"build/connectors/perl/centreon_connector_perl"
"build/connectors/ssh/centreon_connector_ssh"
"build/ccc/ccc")
"build/ccc/ccc"
"build/agent/centagent")
for file in ${exe[@]}; do
echo "Making a debug file of $file"
objcopy --only-keep-debug $file $file.debug
Expand Down Expand Up @@ -218,7 +219,7 @@ jobs:
# set condition to true if artifacts are needed
- if: ${{ false }}
name: Upload package artifacts
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: packages-${{ matrix.distrib }}-${{ matrix.arch }}
path: ./*.${{ matrix.package_extension}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rebase-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
if: github.event.pull_request.merged == true
steps:
- name: git checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
fetch-depth: 0
token: ${{ secrets.CENTREON_TECHNIQUE_PAT }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/rebase-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
if: github.event.pull_request.merged == true
steps:
- name: git checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
with:
fetch-depth: 0
token: ${{ secrets.CENTREON_TECHNIQUE_PAT }}
Expand Down
Loading

0 comments on commit f2e0232

Please sign in to comment.