Skip to content

Commit

Permalink
MON-139733 Centreon next 23.10 (Jira release #19967#) (#1499)
Browse files Browse the repository at this point in the history
  • Loading branch information
tuntoja committed Jul 17, 2024
2 parents cae07c6 + 72e4524 commit 35aea59
Show file tree
Hide file tree
Showing 72 changed files with 1,730 additions and 1,250 deletions.
5 changes: 4 additions & 1 deletion .github/actions/release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ runs:
steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- name: Get released versions for components
run: |
Expand Down Expand Up @@ -185,6 +187,7 @@ runs:
JIRA_RELEASE_NAME=""
JIRA_PROJECT_ID="${{ inputs.jira_project_id }}"
JIRA_RELEASE_RELEASED="false"
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 All @@ -194,7 +197,7 @@ runs:
# Build JSON with release information for JIRA API
JIRA_RELEASE_DATA=$(jq -nc \
--arg archived "$JIRA_RELEASE_ARCHIVED" \
--arg description "$TAG" \
--arg description "$JIRA_RELEASE_ID $TAG" \
--arg releaseDate "$JIRA_RELEASE_DATE" \
--arg name "$TAG" \
--arg projectId "$JIRA_PROJECT_ID" \
Expand Down
2 changes: 1 addition & 1 deletion .github/docker/Dockerfile.centreon-collect-alma8
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ dnf --best install -y cmake \

dnf update libarchive

pip3 install conan==1.62.0 --prefix=/usr --upgrade
pip3 install conan==1.64.0 --prefix=/usr --upgrade
rm -rf ~/.conan/profiles/default

EOF
Expand Down
2 changes: 1 addition & 1 deletion .github/docker/Dockerfile.centreon-collect-alma9
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dnf --best install -y cmake \
nfpm \
sudo

pip3 install conan==1.62.0 --prefix=/usr --upgrade
pip3 install conan==1.64.0 --prefix=/usr --upgrade
rm -rf ~/.conan/profiles/default

EOF
Expand Down
2 changes: 1 addition & 1 deletion .github/docker/Dockerfile.centreon-collect-debian-bullseye
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,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.62.0
pip3 install conan==1.64.0
ln -s /usr/local/bin/conan /usr/bin/conan
rm -rf ~/.conan/profiles/default

Expand Down
2 changes: 1 addition & 1 deletion .github/docker/Dockerfile.centreon-collect-mysql-alma9
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ dnf --best install -y cmake \
nfpm \
sudo

pip3 install conan==1.62.0 --prefix=/usr --upgrade
pip3 install conan==1.64.0 --prefix=/usr --upgrade
rm -rf ~/.conan/profiles/default

EOF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ dnf --best install -y gcc \
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 cryptography

cd /tmp/collect

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
1 change: 1 addition & 0 deletions .github/scripts/collect-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ else
CXXFLAGS="-Wall -Wextra" cmake3 -G "Ninja" -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DWITH_CENTREON_CLIB_INCLUDE_DIR=../clib/inc/ -DWITH_CENTREON_CLIB_LIBRARIES=centreon-clib/libcentreon_clib.so -DCMAKE_BUILD_TYPE=Debug -DWITH_PREFIX=/usr -DWITH_PREFIX_BIN=/usr/sbin -DWITH_USER_BROKER=centreon-broker -DWITH_USER_ENGINE=centreon-engine -DWITH_GROUP_BROKER=centreon-broker -DWITH_GROUP_ENGINE=centreon-engine -DWITH_TESTING=On -DWITH_PREFIX_MODULES=/usr/share/centreon/lib/centreon-broker -DWITH_PREFIX_CONF_BROKER=/etc/centreon-broker -DWITH_PREFIX_LIB_BROKER=/usr/lib64/nagios -DWITH_PREFIX_CONF_ENGINE=/etc/centreon-engine -DWITH_PREFIX_LIB_ENGINE=/usr/lib64/centreon-engine -DWITH_PREFIX_LIB_CLIB=/usr/lib64/ -DWITH_RW_DIR=/var/lib/centreon-engine/rw -DWITH_VAR_DIR=/var/log/centreon-engine -DWITH_MODULE_SIMU=On ..
fi


#Build
ninja -j 8
ninja -j 8 install
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/centreon-collect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:
- selinux/**
- "!.veracode-exclusions"
- "!veracode.json"
- "!**/test/**"
push:
branches:
- develop
Expand All @@ -43,6 +44,7 @@ on:
- selinux/**
- "!.veracode-exclusions"
- "!veracode.json"
- "!**/test/**"

jobs:
get-version:
Expand Down
30 changes: 28 additions & 2 deletions .github/workflows/get-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,26 @@ jobs:
GITHUB_RELEASE_TYPE=$(echo $BRANCHNAME |cut -d '-' -f 1)
case "$BRANCHNAME" in
master | [2-9][0-9].[0-9][0-9].x)
master)
echo "release=1" >> $GITHUB_OUTPUT
echo "release_cloud=1" >> $GITHUB_OUTPUT
echo "release_type=$GITHUB_RELEASE_TYPE" >> $GITHUB_OUTPUT
;;
[2-9][0-9].[0-9][0-9].x)
echo "release=1" >> $GITHUB_OUTPUT
echo "release_cloud=$GITHUB_RELEASE_CLOUD" >> $GITHUB_OUTPUT
echo "release_type=$GITHUB_RELEASE_TYPE" >> $GITHUB_OUTPUT
;;
develop)
echo "release=`date +%s`.`echo ${{ github.sha }} | cut -c -7`" >> $GITHUB_OUTPUT
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 All @@ -107,7 +122,7 @@ jobs:
echo "GITHUB_RELEASE_BRANCH_PR_NUMBER is: $GITHUB_RELEASE_BRANCH_PR_NUMBER"
echo "GITHUB_RELEASE_CLOUD is: $GITHUB_RELEASE_CLOUD"
# Github ouputs
echo "release=`echo $GITHUB_RELEASE_BRANCH_PR_NUMBER`.`date +%s`.`echo ${{ github.sha }} | cut -c -7`" >> $GITHUB_OUTPUT
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
else
Expand All @@ -116,6 +131,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
2 changes: 1 addition & 1 deletion .github/workflows/package-collect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:

- name: Compile sources
run: |
sudo pip3 install conan==1.62.0 --prefix=/usr --upgrade
sudo pip3 install conan==1.64.0 --prefix=/usr --upgrade
sudo conan install . -s compiler.cppstd=17 -s compiler.libcxx=libstdc++11 --build=missing
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/veracode-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jobs:
key: "${{ inputs.module_name }}-${{ github.sha }}-${{ github.run_id }}-veracode-binary"

- name: Sandbox scan
uses: veracode/veracode-uploadandscan-action@f7e1fbf02c5c899fba9f12e3f537b62f2f1230e1 # master using 0.2.6
uses: veracode/veracode-uploadandscan-action@f7e1fbf02c5c899fba9f12e3f537b62f2f1230e1 # 0.2.7
continue-on-error: ${{ vars.VERACODE_CONTINUE_ON_ERROR == 'true' }}
with:
appname: "${{ inputs.module_name }}"
Expand Down
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
MAJOR=23.10
MINOR=8
MINOR=9
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ endif()
# Version.
set(COLLECT_MAJOR 23)
set(COLLECT_MINOR 10)
set(COLLECT_PATCH 8)
set(COLLECT_PATCH 9)
set(COLLECT_VERSION "${COLLECT_MAJOR}.${COLLECT_MINOR}.${COLLECT_PATCH}")
add_definitions(-DCENTREON_CONNECTOR_VERSION=\"${COLLECT_VERSION}\")

Expand Down
50 changes: 25 additions & 25 deletions bbdo/bam/dimension_ba_event.cc
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/*
** Copyright 2014-2015 Centreon
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
**
** For more information : contact@centreon.com
*/
/**
* Copyright 2014-2024 Centreon
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* For more information : contact@centreon.com
*/

#include "bbdo/bam/dimension_ba_event.hh"

Expand Down Expand Up @@ -102,14 +102,14 @@ mapping::entry const dimension_ba_event::entries[] = {
mapping::entry(&bam::dimension_ba_event::ba_id,
"ba_id",
mapping::entry::invalid_on_zero),
mapping::entry(
&bam::dimension_ba_event::ba_name,
"ba_name",
get_mod_bam_reporting_ba_col_size(mod_bam_reporting_ba_ba_name)),
mapping::entry(
&bam::dimension_ba_event::ba_description,
"ba_description",
get_mod_bam_reporting_ba_col_size(mod_bam_reporting_ba_ba_description)),
mapping::entry(&bam::dimension_ba_event::ba_name,
"ba_name",
get_centreon_storage_mod_bam_reporting_ba_col_size(
centreon_storage_mod_bam_reporting_ba_ba_name)),
mapping::entry(&bam::dimension_ba_event::ba_description,
"ba_description",
get_centreon_storage_mod_bam_reporting_ba_col_size(
centreon_storage_mod_bam_reporting_ba_ba_description)),
mapping::entry(&bam::dimension_ba_event::sla_month_percent_crit,
"sla_month_percent_crit"),
mapping::entry(&bam::dimension_ba_event::sla_month_percent_warn,
Expand Down
50 changes: 25 additions & 25 deletions bbdo/bam/dimension_bv_event.cc
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/*
** Copyright 2014-2015 Centreon
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
**
** For more information : contact@centreon.com
*/
/**
* Copyright 2014-2024 Centreon
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* For more information : contact@centreon.com
*/

#include "bbdo/bam/dimension_bv_event.hh"

Expand Down Expand Up @@ -94,14 +94,14 @@ mapping::entry const dimension_bv_event::entries[] = {
mapping::entry(&bam::dimension_bv_event::bv_id,
"bv_id",
mapping::entry::invalid_on_zero),
mapping::entry(
&bam::dimension_bv_event::bv_name,
"bv_name",
get_mod_bam_reporting_bv_col_size(mod_bam_reporting_bv_bv_name)),
mapping::entry(
&bam::dimension_bv_event::bv_description,
"bv_description",
get_mod_bam_reporting_bv_col_size(mod_bam_reporting_bv_bv_description)),
mapping::entry(&bam::dimension_bv_event::bv_name,
"bv_name",
get_centreon_storage_mod_bam_reporting_bv_col_size(
centreon_storage_mod_bam_reporting_bv_bv_name)),
mapping::entry(&bam::dimension_bv_event::bv_description,
"bv_description",
get_centreon_storage_mod_bam_reporting_bv_col_size(
centreon_storage_mod_bam_reporting_bv_bv_description)),
mapping::entry()};

// Operations.
Expand Down
Loading

0 comments on commit 35aea59

Please sign in to comment.