Skip to content

Commit

Permalink
MON-111639 Centreon next 23.04 (Jira release #19889#) (#1411)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkippes authored Jun 20, 2024
2 parents 4846669 + c63c536 commit 0e92ba6
Show file tree
Hide file tree
Showing 32 changed files with 1,476 additions and 527 deletions.
21 changes: 19 additions & 2 deletions .github/actions/promote-to-stable/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,15 @@ runs:
ROOT_REPO_PATH="apt-standard-${{ inputs.major_version }}"
echo "[DEBUG] - Get path of testing DEB packages to promote to stable."
SRC_PATHS=$(jf rt search --include-dirs "$ROOT_REPO_PATH-testing/pool/${{ inputs.module_name }}/*${{ inputs.distrib }}*.deb | jq -r '.[].path')
case "${{ inputs.major_version }}" in
"22.10"|"23.04"|"23.10")
SRC_PATHS=$(jf rt search --include-dirs $ROOT_REPO_PATH-testing/pool/${{ inputs.module_name }}/*.deb | jq -r '.[].path')
;;
*)
SRC_PATHS=$(jf rt search --include-dirs $ROOT_REPO_PATH-testing/pool/${{ inputs.module_name }}/*${{ inputs.distrib }}*.deb | jq -r '.[].path')
;;
esac
if [[ ${SRC_PATHS[@]} ]]; then
for SRC_PATH in ${SRC_PATHS[@]}; do
Expand All @@ -143,7 +151,16 @@ runs:
jf rt download $ARTIFACT --flat
done
for ARTIFACT_DL in $(dir -1|grep -E ".+${{ inputs.distrib }}.+\.deb"); do
case "${{ inputs.major_version }}" in
"22.10"|"23.04"|"23.10")
ARTIFACT_SEARCH_PATTERN=".+\.deb"
;;
*)
ARTIFACT_SEARCH_PATTERN=".+${{ inputs.distrib }}.+\.deb"
;;
esac
for ARTIFACT_DL in $(dir -1|grep -E $ARTIFACT_SEARCH_PATTERN); 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" --flat
Expand Down
15 changes: 10 additions & 5 deletions .github/actions/release/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ runs:
SCOPE_VERSION="COLLECT"
MINOR_VERSION_FILE_PATH=".version"
RELEASE_CLOUD=0
RELEASE_CLOUD=0 # (0 = not a release cloud, 1 = release cloud)
MAJOR_VERSION=""
MINOR_VERSION=""
CURRENT_STABLE_BRANCH_MAJOR_VERSION=""
# Get current stable branch name
# If MASTER, use root .version
Expand Down Expand Up @@ -138,9 +142,9 @@ runs:
fi
# Rebuild NEW_STABLE_TAGS as an array
for i in ${NEW_STABLE_TAGS[@]}; do
NEW_RELEASE_TAGS+=("$i")
done
# for i in ${NEW_STABLE_TAGS[@]}; do
# NEW_RELEASE_TAGS+=("$i")
# done
# Create GITHUB release for each release components
# Abort if no tags
Expand Down Expand Up @@ -182,6 +186,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)"
# Create JIRA version for each released component
echo "Creating JIRA releases."
Expand All @@ -191,7 +196,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 All @@ -200,7 +205,7 @@ runs:
# Send to JIRA API release
echo "Sending to JIRA API release: $JIRA_RELEASE_DATA"
curl --fail --request POST \
--url 'https://${{ inputs.jira_base_url }}/rest/api/3/version' \
--url "${{ inputs.jira_base_url }}/rest/api/3/version" \
--user '${{ inputs.jira_user_email }}:${{ inputs.jira_api_token }}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/veracode-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ on:
jobs:
routing:
name: Check before analysis
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
development_stage: ${{ steps.routing-mode.outputs.development_stage }}

Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
password: ${{ secrets.docker_registry_passwd }}

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

- name: Compiling Cpp sources
run: |
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
name: Sandbox scan
needs: [routing, build]
if: needs.routing.outputs.development_stage != 'Development'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Promote latest scan
Expand All @@ -162,13 +162,13 @@ jobs:
delete-on-promote: false

- name: Get build binary
uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: "${{ inputs.module_name }}-${{ github.sha }}-${{ github.run_id }}-veracode-binary.tar.gz"
key: "${{ inputs.module_name }}-${{ github.sha }}-${{ github.run_id }}-veracode-binary"

- name: Sandbox scan
uses: veracode/[email protected]
uses: veracode/veracode-uploadandscan-action@f7e1fbf02c5c899fba9f12e3f537b62f2f1230e1 # master using 0.2.6
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.04
MINOR=12
MINOR=13
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ endif()
# Version.
set(COLLECT_MAJOR 23)
set(COLLECT_MINOR 04)
set(COLLECT_PATCH 12)
set(COLLECT_PATCH 13)
set(COLLECT_VERSION "${COLLECT_MAJOR}.${COLLECT_MINOR}.${COLLECT_PATCH}")
add_definitions(-DCENTREON_CONNECTOR_VERSION=\"${COLLECT_VERSION}\")

Expand Down
34 changes: 17 additions & 17 deletions bbdo/neb.proto
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/*
** Copyright 2022 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 : [email protected]
*/
/**
* Copyright 2022-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 : [email protected]
*/

syntax = "proto3";

Expand Down
36 changes: 19 additions & 17 deletions broker/lua/inc/com/centreon/broker/lua/macro_cache.hh
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
/*
** Copyright 2018-2022 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 : [email protected]
*/
/**
* Copyright 2018-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 : [email protected]
*/

#ifndef CCB_LUA_MACRO_CACHE_HH
#define CCB_LUA_MACRO_CACHE_HH
Expand Down Expand Up @@ -118,13 +118,15 @@ class macro_cache {
void _process_pb_instance(std::shared_ptr<io::data> const& data);
void _process_host(std::shared_ptr<io::data> const& data);
void _process_pb_host(std::shared_ptr<io::data> const& data);
void _process_pb_host_status(std::shared_ptr<io::data> const& data);
void _process_pb_adaptive_host(std::shared_ptr<io::data> const& data);
void _process_host_group(std::shared_ptr<io::data> const& data);
void _process_host_group_member(std::shared_ptr<io::data> const& data);
void _process_custom_variable(std::shared_ptr<io::data> const& data);
void _process_pb_custom_variable(std::shared_ptr<io::data> const& data);
void _process_service(std::shared_ptr<io::data> const& data);
void _process_pb_service(std::shared_ptr<io::data> const& data);
void _process_pb_service_status(std::shared_ptr<io::data> const& data);
void _process_pb_adaptive_service(std::shared_ptr<io::data> const& data);
void _process_service_group(std::shared_ptr<io::data> const& data);
void _process_service_group_member(std::shared_ptr<io::data> const& data);
Expand Down
2 changes: 0 additions & 2 deletions broker/lua/src/luabinding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,6 @@ int luabinding::write(std::shared_ptr<io::data> const& data) noexcept {
int retval = 0;
if (log_v2::lua()->level() == spdlog::level::trace) {
SPDLOG_LOGGER_TRACE(log_v2::lua(), "lua: luabinding::write call {}", *data);
} else {
SPDLOG_LOGGER_DEBUG(log_v2::lua(), "lua: luabinding::write call");
}

// Give data to cache.
Expand Down
Loading

0 comments on commit 0e92ba6

Please sign in to comment.