Skip to content

Commit

Permalink
Release #18909#
Browse files Browse the repository at this point in the history
* enh(broker): cbd with multiargs and robot tests (#306)

-enh(broker): cbd with multiargs and robot tests
-Validate with tests/broker/command-line.robot
-Update README.md
-Common.py : fix find in log with timeout

REFS: MON-13901

* fix(broker/bam): downtimes on kpi can be more than one

* enh(tests/bam): new tests to reproduce a bug
* chore(doc): CHANGELOG updated and version set to 21.10.3
* chore(tests): README updated

REFS: MON-14091

* fix(broker/engine): grpc api can be changed through configuration. Otherwise it is fixed to localhost (#320)

REFS: MON-13904

* fix(broker/rrd): rebuild fixed in 21.10 (#340)

* Also an issue due to conan fixed, python 3.8 is needed.

REFS: MON-14092

* fix(ci): issues with conan fixed

* fix(ci/scripts): conan bad path

* fix(broker/bam): overlapping downtimes on kpi service are well handled now. (#341)

REFS: MON-14091

* fix(ci/tests): missing dependencies for python38

* fix(broker/lua): lua stream connector accepts empty parameters(21.10) (#359)

REFS: MON-13875

* fix(broker/muxer): poller waits at most 5s to send goodbye to broker before shutdown (#360)

REFS: MON-14511

* fix(broker/config): if failovers are badly defined, error logs are raised but this does not stop broker (#365)

REFS: MON-6986

* chore(release):rebase dev-21.10.x on 21.10.x  (#388)

* chore(release): merge release 21.10.next into 21.10.x (#386)

* enh(broker): cbd with multiargs and robot tests (#306)

-enh(broker): cbd with multiargs and robot tests
-Validate with tests/broker/command-line.robot
-Update README.md
-Common.py : fix find in log with timeout

REFS: MON-13901

* fix(broker/bam): downtimes on kpi can be more than one

* enh(tests/bam): new tests to reproduce a bug
* chore(doc): CHANGELOG updated and version set to 21.10.3
* chore(tests): README updated

REFS: MON-14091

* fix(broker/engine): grpc api can be changed through configuration. Otherwise it is fixed to localhost (#320)

REFS: MON-13904

* fix(broker/rrd): rebuild fixed in 21.10 (#340)

* Also an issue due to conan fixed, python 3.8 is needed.

REFS: MON-14092

* fix(ci): issues with conan fixed

* fix(ci/scripts): conan bad path

* fix(broker/bam): overlapping downtimes on kpi service are well handled now. (#341)

REFS: MON-14091

* fix(ci/tests): missing dependencies for python38

* fix(broker/lua): lua stream connector accepts empty parameters(21.10) (#359)

REFS: MON-13875

* fix(broker/muxer): poller waits at most 5s to send goodbye to broker before shutdown (#360)

REFS: MON-14511

Co-authored-by: denliA <91119589+denliA@users.noreply.github.com>
Co-authored-by: David Boucher <dboucher@centreon.com>
Co-authored-by: jean-christophe81 <98889244+jean-christophe81@users.noreply.github.com>

* fix(broker/config): if failovers are badly defined, error logs are raised but this does not stop broker (#365)

REFS: MON-6986

Co-authored-by: denliA <91119589+denliA@users.noreply.github.com>
Co-authored-by: David Boucher <dboucher@centreon.com>
Co-authored-by: jean-christophe81 <98889244+jean-christophe81@users.noreply.github.com>

* fix(broker/config): file failover should not stop broker

* delete from hostgroups and servicegroups is delayed of one minute (#379)

REFS-MON-14908

* fix(broker/stats): center concurrent access changed to use mutexes (#412)

REFS: MON-15575

* fix(broker/bam): no need to read last_level in bam (#417)

It is not stored in kpis, just computed on demand and stored in db.

    REFS: MON-15622

* update credentials (#432)

* MON-15761 compiled are saved in bin, lib, tests directories (#431)

* MON-15761 compiled are saved in bin, lib, tests directories
* MON-15761 ci use new directories
* MON-15761 import 22.04 ci files
* MON-15761 import suite
* MON-15761 connector install correction
* MON-15761 use of WITH_PREFIX_LIB_CLIB and PREFIX_LIB
* MON-15761 clib include location
* MON-15761 engine
* MON-15761 modules
* MON-15761 cbd
* MON-15761 no pc and no duplicate engine log file
* MON-15761 no connector test
REFS:MON-15761

* enh(ci): workflow+actions added to develop

* fix(ci): docker builder improved

* enh(ci): build scripts added

* fix(ci): docker-builder is updated with password variable

* fix(ci): docker-builder fixed

* fix(ci): docker folder missing

* fix(ci): password fixed

* fix(ci): fail-fast set to false

* fix(ci): artifactory path updated

* fix(ci): registry and runners updated

* enh(ci): packaging updated

* fix(ci): username updated

* fix(ci): Jenkinsfiles removed

* feat(chore): update .gitignore and remove deprecated scripts (#437)

* fix(ci): new build workflow

* fix(ci): cmake.sh improved

* enh(cmake): cmake called as in 22.04, and newer versions of collect

* enh(cmake): cmake called as in 22.04, and newer versions of collect
* fix(cmake): bad paths on tests
* fix(cmake): the script could fail with devtool
* fix(ci): actions copied from develop branch
* fix(ci): collect tests script updated

REFS: MON-15860

* fix(ci): debian build was broken

* fix(ci): debian packaging had bad paths

* fix(ci): poller-module.json is a bad name

* fix(ci): bad path

* fix(ci): bad path in rpm packaging

* fix(ci): release simplified

* fix(connector): unit tests may fail on centos7

* fix(delivery): add delivery to old yum repo (#458)

* enh(ci): rebuild yum metadata only one time (#463)

* fix(ci): fix workflow trigger on push dev-21.10.x (#464)

* enh(packaging): add rpm sign to workflow 2110 (#470)

* fix(packaging): fix cmake parameter for broker config path (#467)

* chore(release):set version to 21.10.4

* chore(release): remove workflow file

* chore(release):fix conflict

* MON-16310 fix some robot issues

* MON-16310 fix tests ESS3 ESS4 BEDB4 and BLDIS1

* enh(ci): Add rpm delivery cleanup and structure (#499)

* MON-16310 help cmake to find protoc

* fix(ci):correct docker registry link (#501)

* fix(ci): fix FOLDER variable

* enh(ci): remove buster from build and delivery (#471)

* enh(ci): remove buster from build and delivery

* remove buster dockerfile

* Disable debian delivery on 21.10 collect

Co-authored-by: denliA <91119589+denliA@users.noreply.github.com>
Co-authored-by: David Boucher <dboucher@centreon.com>
Co-authored-by: jean-christophe81 <98889244+jean-christophe81@users.noreply.github.com>
Co-authored-by: Charles Gautier <33026375+chgautier@users.noreply.github.com>
Co-authored-by: Stéphane Chapron <34628915+sc979@users.noreply.github.com>
Co-authored-by: tuntoja <58987095+tuntoja@users.noreply.github.com>
Co-authored-by: Kevin Duret <kduret@centreon.com>
Co-authored-by: chgautier <cgautier@centreon.com>
Co-authored-by: Jean Christophe Roques <jcroques@centreon.com>
Co-authored-by: tuntoja <tuntoja@centreon.com>
  • Loading branch information
11 people committed Jan 16, 2023
1 parent 597c800 commit c2d7c3f
Show file tree
Hide file tree
Showing 168 changed files with 6,221 additions and 3,884 deletions.
90 changes: 90 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<!--
Centreon's Code of Conduct must be respected when opening any issue. (https://github.com/centreon/centreon/blob/master/CODE_OF_CONDUCT.md)
If you want to ask a question feel free to use on of those ressources
slack: https://centreon.github.io/register-slack
If you are reporting a new issue, make sure that we do not have any duplicates already open. You
can ensure this by searching the issue list for this repository. If there is a duplicate, please
close your issue and add a comment linking to the existing issue instead.
If you think that your problem is a bug, please add a description organized like the BUG REPORT
INFORMATION shown below. If you can't provide all this information, it's possible that we will not
be able to debug and fix your problem, and so we will be forced to close the issue. Nevertheless,
you will be able to provide more information later in order to re-open the issue.
When we need more information, we will reply in order to request it. If you do not answer
in the next 30 days, the ticket will be automaticaly closed.
Please describe your issue in English.
-->

# BUG REPORT INFORMATION

### Prerequisites

> The opened issue, must be code related. GitHub is not meant for support. Feel free to check the CONTRIBUTING section for more details.
***Versions***

For the RPM based systems

-- Copy/Paste the result of the following command --
```
$ rpm -qa | grep centreon
```

***Operating System***

*CentOS, Debian ...*

***How the the component has been installed and versions***

- [ ] *From sources, from packages*
- [ ] *components versions*

Version: --

***Additional environment details (AWS, VirtualBox, physical, etc.):***

### Description

-- Describe the encountered issue --

### Steps to Reproduce

Please describe precisely the steps to reproduce the encountered issue.

1. I logged in Centreon
2. I reached the Custom View
3. And so on...

### Describe the received result

### Describe the expected result

### Logs

**PHP error logs**

```
tail -f /var/opt/rh/rh-php72/log/php-fpm/centreon-error.log
```
**centreon-engine logs (*if needed*)**

```
tail -f /var/log/centreon-engine/centengine.log
```
**centreon-broker logs (*if needed*)**

```
tail -f /var/log/centreon-broker/central-broker-master.log
```
**centcore logs (*if needed*)**

```
tail -f /var/log/centreon/centcore.log
```

### Additional relevant information (e.g. frequency, ...)
36 changes: 36 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## Description

Please include a short resume of the changes and what is the purpose of PR. Any relevant information should be added to help:
* **QA Team** (Quality Assurance) with tests.
* **reviewers** to understand what are the stakes of the pull request.

**Fixes** # (issue)

## Type of change

- [ ] Patch fixing an issue (non-breaking change)
- [ ] New functionality (non-breaking change)
- [ ] Breaking change (patch or feature) that might cause side effects breaking part of the Software
- [ ] Updating documentation (missing information, typo...)

## Target serie

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

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

Please describe the **procedure** to verify that the goal of the PR is matched. Provide clear instructions so that it can be **correctly tested**.

Any **relevant details** of the configuration to perform the test should be added.

## Checklist

- [ ] I have followed the **coding style guidelines** provided by Centreon
- [ ] I have commented my code, especially new **classes**, **functions** or any **legacy code** modified. (***docblock***)
- [ ] I have commented my code, especially **hard-to-understand areas** of the PR.
- [ ] I have made corresponding changes to the **documentation**.
- [ ] I have **rebased** my development branch on the base branch (master, maintenance).

172 changes: 172 additions & 0 deletions .github/actions/delivery/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
name: "delivery"
description: "RPM and DEB packages delivery Centreon"
inputs:
module_name:
description: "The name of the module"
required: true
distrib:
description: "The distribution used for packaging"
required: true
repos_username:
description: "Artifact Manager technical username"
required: true
repos_password:
description: "Artifact Manager technical password"
required: true
version:
description: "Centreon packaged version"
required: true
minor_version:
description: "Centreon packaged version"
required: true
release:
description: The release number
required: true
cache_key:
description: "The cached package key"
required: true
update_repo_path:
description: "The update repo script path"
required: true
cloudfront_id:
description: "The cloudfront ID for repo url"
required: true
yum_repo_address:
description: "The yum legacy repo address"
required: true
yum_repo_key:
description: "The yum repo key"
required: true
yum_repo_url:
description: "The legacy yum repo url"
required: true

runs:
using: "composite"
steps:
- name: Build name for RPM
shell: bash
if: ${{ inputs.distrib == 'el7' || inputs.distrib == 'el8' }}
run: |
echo "build=rpmbuild-centreon-collect" >> $GITHUB_ENV
echo "extfile=rpm" >> $GITHUB_ENV
- name: Build name for DEB
shell: bash
if: ${{ inputs.distrib == 'bullseye' }}
run: |
echo "build=debbuild-centreon-collect" >> $GITHUB_ENV
echo "extfile=deb" >> $GITHUB_ENV
- name: Use cache files
uses: actions/cache@v3
with:
path: ./*.${{ env.extfile }}
key: ${{ inputs.cache_key }}-${{ env.build }}-${{ inputs.distrib }}
restore-keys: ${{ inputs.cache_key }}-${{ env.build }}-${{ inputs.distrib }}

- name: Setup awscli
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
sudo unzip -q awscliv2.zip
sudo ./aws/install
shell: bash

- name: Publish packages
run: |
if [[ -z "$GITHUB_HEAD_REF" ]];
then
BRANCHNAME="$GITHUB_REF_NAME"
else
BRANCHNAME="$GITHUB_HEAD_REF"
fi
echo "[DEBUG] - Branch name: $BRANCHNAME"
case "$BRANCHNAME" in
develop | dev-[2-9][0-9].[0-9][0-9].x)
SUBREPO="unstable"
;;
release* | hotfix*)
SUBREPO="testing"
;;
master | [2-9][0-9].[0-9][0-9].x)
SUBREPO="stable"
;;
*)
echo -n "[INFO] NO DELIVERY FOR THIS BRANCH"
exit 0
;;
esac
if [[ "${{ env.extfile }}" == "rpm" ]] ; then
eval `ssh-agent`
ssh-add - <<< "${{ inputs.yum_repo_key }}"
fi
FILES="*.${{ env.extfile }}"
for FILE in $FILES
do
echo "[DEBUG] - File: $FILE"
VERSION=${{ inputs.version }}
MAJOR="$VERSION"
MINOR=${{ inputs.minor_version }}
RELEASE=${{ inputs.release }}
REPOTYPE="$SUBREPO"
PROJECT=${{ inputs.module_name }}
PROJECT_PATH="standard"
echo "[DEBUG] - Suprepo: $SUBREPO"
echo "[DEBUG] - Version: $VERSION"
if [[ "${{ env.extfile }}" == "deb" ]] ; then
echo "No delivery to debian in 21.10"
#curl -u "${{ inputs.repo_username }}":"${{ inputs.repo_password }}" -H "Content-Type: multipart/form-data" --data-binary "@./$FILE" https://apt.centreon.com/repository/23.04-$SUBREPO/
else
DISTRIB="${{ inputs.distrib }}"
ARCH=$(echo $FILE | grep -oP '(x86_64|noarch)')
echo "[DEBUG] - DISTRIB: $DISTRIB"
echo "[DEBUG] - Arch: $ARCH"
if [[ "$SUBREPO" == "stable" ]] ; then
TARGET="/srv/centreon-yum/yum.centreon.com/$PROJECT_PATH/$MAJOR/$DISTRIB/$REPOTYPE/$ARCH/RPMS"
else
FOLDER="$PROJECT-$MAJOR.$MINOR-$RELEASE"
TARGET="/srv/centreon-yum/yum.centreon.com/$PROJECT_PATH/$MAJOR/$DISTRIB/$REPOTYPE/$ARCH/$PROJECT/$FOLDER"
PROJECT_LOCATION="/srv/centreon-yum/yum.centreon.com/$PROJECT_PATH/$MAJOR/$DISTRIB/$REPOTYPE/$ARCH/$PROJECT"
fi
echo "[DEBUG] - Folder: $FOLDER"
echo "[DEBUG] - Project : $PROJECT"
echo "[DEBUG] - Target : $TARGET"
echo "[DEBUG] - PROJECT_LOCATION : $PROJECT_LOCATION"
ssh -o StrictHostKeyChecking=no "${{ inputs.yum_repo_address }}" mkdir -p "$TARGET" 2>&-
scp -o StrictHostKeyChecking=no "$FILE" "${{ inputs.yum_repo_address }}:$TARGET" 2>&-
fi
done
# run this only for rpm
if [[ "${{ env.extfile }}" == "rpm" ]] ; then
# Cleanup is done on unstable repository only
if [[ "$SUBREPO" == "unstable" ]] ; then
ssh -o StrictHostKeyChecking=no "${{ inputs.yum_repo_address }}" "ls -drc $PROJECT_LOCATION/* 2>&- | head -n -1 | xargs rm -rf"
fi
# Update repository metadata
METADATAS="/srv/centreon-yum/yum.centreon.com/$PROJECT_PATH/$MAJOR/$DISTRIB/$REPOTYPE/$ARCH"
ssh -o StrictHostKeyChecking=no "${{ inputs.yum_repo_address }}" "sh "${{ inputs.update_repo_path }}" $METADATAS" 2>&-
# Invalidate cloudfront cache
ID="${{ inputs.cloudfront_id }}"
PATHS="/$PROJECT_PATH/$MAJOR/$DISTRIB/$REPOTYPE/$ARCH/*"
ITERATIONS=1
until aws cloudfront create-invalidation --distribution-id "$ID" --paths "$PATHS"; do
if [ ${ITERATIONS} -eq 10 ]; then
return 0
fi
echo "couldn't invalidate cache, AWS quota might have been reached, retrying in 30 seconds..."
sleep 30s
ITERATIONS=$((ITERATIONS+1))
done
fi
shell: bash
84 changes: 84 additions & 0 deletions .github/actions/get-packages/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: "get-packages"
description: "Get RPM Centreon packages from the repository"
inputs:
distrib:
description: "The distribution used for packaging"
required: true
repos_username:
description: "Artifact Manager technical username"
required: true
repos_password:
description: "Artifact Manager technical password"
required: true
version:
description: "Centreon packaged version"
required: true
patch:
description: "Centreon packaged version patch"
required: true
release:
description: "Centreon packaged release"
required: true
cache_key:
description: "The cached package key"
required: true

runs:
using: "composite"
steps:
- name: Build name for RPM
shell: bash
if: ${{ inputs.distrib == 'el7' || inputs.distrib == 'el8' }}
run: |
echo "build=rpmbuild-centreon-collect" >> $GITHUB_ENV
echo "extfile=rpm" >> $GITHUB_ENV
- name: Build name for DEB
shell: bash
if: ${{ inputs.distrib == 'bullseye' }}
run: |
echo "build=debbuild-centreon-collect" >> $GITHUB_ENV
echo "extfile=deb" >> $GITHUB_ENV
- name: Get packages
run: |
if [[ -z "$GITHUB_HEAD_REF" ]];
then
BRANCHNAME="$GITHUB_REF_NAME"
else
BRANCHNAME="$GITHUB_HEAD_REF"
fi
echo "[DEBUG] - Branch name: $BRANCHNAME"
case "$BRANCHNAME" in
develop | dev-[2-9][0-9].[0-9][0-9].x)
REPO="unstable"
;;
release* | hotfix*)
REPO="testing"
;;
master | [2-9][0-9].[0-9][0-9].x)
REPO="stable"
;;
*)
echo -n "[INFO] NO DELIVERY FOR THIS BRANCH"
exit 0
;;
esac
FILES="centreon-broker centreon-broker-cbd centreon-broker-cbmod centreon-broker-core centreon-broker-storage centreon-clib centreon-collect centreon-collect-client centreon-connector centreon-connector-perl centreon-connector-ssh centreon-engine centreon-engine-daemon centreon-engine-extcommands"
FULL_VERSION="${{ inputs.version }}.${{ inputs.patch }}"
#RELEASE="1668587986.332470bb4948f05263630f26f7b507c9e388ed98"
RELEASE="${{ inputs.release }}"
for FILE in $FILES ; do
if [[ "${{ env.extfile }}" == "deb" ]] ; then
echo "[DEBUG] - https://artifactory.apps.centreon.com/artifactory/debian-$VERSION-$REPO/pool/$FILE;deb.distribution=bullseye;deb.component=main;deb.architecture=amd64"
curl -v -u "${{ inputs.repos_username }}":"${{ inputs.repos_password }}" -X PUT "https://artifactory.apps.centreon.com/artifactory/debian-$VERSION-$REPO/pool/$FILE;deb.distribution=bullseye;deb.component=main;deb.architecture=amd64" -T "./$FILE"
else
echo "[DEBUG] - https://artifactory.apps.centreon.com/artifactory/rpm-${{ inputs.version }}-$REPO/${{ inputs.distrib }}/$REPO/x86_64/centreon-collect/$FILE-$FULL_VERSION-$RELEASE.${{ inputs.distrib }}.x86_64.rpm"
curl -v -u "${{ inputs.repos_username }}":"${{ inputs.repos_password }}" -O "https://artifactory.apps.centreon.com/artifactory/rpm-${{ inputs.version }}-$REPO/${{ inputs.distrib }}/$REPO/x86_64/centreon-collect/$FILE-$FULL_VERSION-$RELEASE.${{ inputs.distrib }}.x86_64.rpm"
fi
done
ls -l *.rpm
for i in *.rpm ; do file $i ; done
shell: bash
Loading

0 comments on commit c2d7c3f

Please sign in to comment.