Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(err-msg): attempt to fix #4678 #4726

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3be9ebe
fix(err-msg): attempt to fix #4678
omercier Nov 5, 2023
1dbefda
enh(email/alert): do not retrieve service graph if no credentials (#4…
garnier-quentin Nov 7, 2023
fa960d8
[MON-21885] [Plugin] Bad incrementation in VMware health (#4716)
lucie-dubrunfaut Nov 8, 2023
6b9e410
[MON-22338] [Plugins] Improve the troubleshooting of HTTP Collections…
lucie-dubrunfaut Nov 8, 2023
9f73f71
(plugin) os::windows::snmp - mode service add total counter (#4606)
garnier-quentin Nov 13, 2023
2f5076c
(plugin) network::chapsvision::crossing::snmp - new (#4582)
garnier-quentin Nov 13, 2023
4030450
enh(chore): new code_owners (#4747)
sc979 Nov 23, 2023
cc3435a
enh(chore): code owners feedbacks (#4749)
sc979 Nov 23, 2023
3d53089
(plugin) snmp_standard::mode::uptime - Add 2 decimals to the perfdata…
s-duret Nov 30, 2023
54c7c5c
fix(status): fixing wrong state + attempt to add tests (#4750)
omercier Dec 4, 2023
51734bc
[CTOR-151] Unable to upgrade after installing Wsman plugin on RHEL 9 …
sdepassio Dec 5, 2023
12d14ac
enh(chore): package perl dependencies (cpan / net-curl / libssh-sessi…
hamzabessa Dec 7, 2023
5206397
[MON-22575] [Plugin] centreon-plugin-Hardware-Ups-Standard-Rfc1628-Sn…
lucie-dubrunfaut Dec 11, 2023
4dbd604
[CTOR-151] Fix for Debian packaging : amd64 and arm64 packages have t…
sdepassio Dec 11, 2023
3314337
CTOR-67-fix-help-typos-for-the-sake-of-doc (#4753)
omercier Dec 11, 2023
6ca01c9
enh(delivery): no deliver source and promote on dispatch (#4771)
tuntoja Dec 14, 2023
4f7bd7b
[CTOR-151] Adding missing packages (#4770)
sdepassio Dec 15, 2023
53c79aa
[CTOR-151] fix delivery (#4774)
sdepassio Dec 15, 2023
b191540
fix multiple deliveries (#4777)
sdepassio Dec 18, 2023
19f1981
[CTOR-237] Fix broken dependency for vmware-connector (#4779)
sdepassio Dec 19, 2023
ef9b28a
enh(chore): github actions hardening (#4780)
sc979 Dec 20, 2023
c6bfbd1
[MON-22331] [Plugins] Mode sql-string not working anymore (#4746)
lucie-dubrunfaut Jan 4, 2024
985310d
enh(ci): use upload instead of copy for promote for perl-cpan-librari…
tuntoja Jan 8, 2024
b24f95b
enh(tests): adding tests
omercier Jan 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 21 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1,21 @@
* @centreon/perl-reviewers
.github/ @centreon/perl-reviewers @centreon/automation-reviewers
* @centreon/owners-connectors

*.md @centreon/owners-doc
*.mdx @centreon/owners-doc

*.cmake @centreon/owners-cpp
CMakeLists.txt @centreon/owners-cpp
Makefile @centreon/owners-cpp

*.pm @centreon/owners-perl
*.pl @centreon/owners-perl

*.py @centreon/owners-python

*.sh @centreon/owners-bash

tests/** @centreon/owners-robot-e2e

.github/** @centreon/owners-pipelines
packaging/** @centreon/owners-pipelines
selinux/** @centreon/owners-pipelines
4 changes: 2 additions & 2 deletions .github/actions/deb-delivery-legacy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
using: "composite"
steps:
- name: Use cache DEB files
uses: actions/cache/restore@v3
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2

Check warning on line 27 in .github/actions/deb-delivery-legacy/action.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

27:76 [comments] too few spaces before comment
with:
path: ./*.deb
key: ${{ inputs.cache_key }}
fail-on-cache-miss: true

- 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
8 changes: 6 additions & 2 deletions .github/actions/deb-delivery/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@
runs:
using: "composite"
steps:
- name: Remove previously delivered DEBs
run: rm -f ./*.deb
shell: bash

- name: Use cache DEB files
uses: actions/cache/restore@v3
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2

Check warning on line 28 in .github/actions/deb-delivery/action.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

28:76 [comments] too few spaces before comment
with:
path: ./*.deb
key: ${{ inputs.cache_key }}
fail-on-cache-miss: true

- uses: jfrog/setup-jfrog-cli@v3
- uses: jfrog/setup-jfrog-cli@901bb9632db90821c2d3f076012bdeaf66598555 # v3.4.1

Check warning on line 34 in .github/actions/deb-delivery/action.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

34:76 [comments] too few spaces before comment
env:
JF_URL: https://centreon.jfrog.io
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}
Expand Down
120 changes: 120 additions & 0 deletions .github/actions/package-nfpm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: package-nfpm
description: Package module using nfpm
inputs:
nfpm_file_pattern:
description: The pattern of the nfpm configuration file(s)
required: true
package_extension:
description: The package extension (deb or rpm)
required: true
distrib:
description: The package distrib
required: true
major_version:
description: The major version
required: false
minor_version:
description: The minor version
required: false
release:
description: The package release number
required: false
arch:
description: The package architecture
required: false
commit_hash:
description: The commit hash
required: true
cache_key:
description: The package files cache key
required: true
rpm_gpg_key:
description: The rpm gpg key
required: true
rpm_gpg_signing_key_id:
description: The rpm gpg signing key identifier
required: true
rpm_gpg_signing_passphrase:
description: The rpm gpg signing passphrase
required: true

runs:
using: composite

steps:
- name: Remove previously packaged DEBs and RPMs
run: |
rm -f ./*.deb
rm -f ./*.rpm
shell: bash

- name: Import gpg key
env:
RPM_GPG_SIGNING_KEY: ${{ inputs.rpm_gpg_key }}
run: echo -n "$RPM_GPG_SIGNING_KEY" > key.gpg
shell: bash

- name: Build ${{ inputs.package_extension }} files
env:
RPM_GPG_SIGNING_KEY_ID: ${{ inputs.rpm_gpg_signing_key_id }}
RPM_GPG_SIGNING_PASSPHRASE: ${{ inputs.rpm_gpg_signing_passphrase }}
run: |
export MAJOR_VERSION="${{ inputs.major_version }}"
export VERSION="${{ inputs.major_version }}.${{ inputs.minor_version }}"
export RELEASE="${{ inputs.release }}"
export ARCH="${{ inputs.arch }}"

if [ "${{ inputs.package_extension }}" = "rpm" ]; then
export DIST=".${{ inputs.distrib }}"
export APACHE_USER="apache"
export APACHE_GROUP="apache"
else
export DIST=""
export APACHE_USER="www-data"
export APACHE_GROUP="www-data"
fi

MAJOR_LEFT=$( echo $MAJOR_VERSION | cut -d "." -f1 )
MAJOR_RIGHT=$( echo $MAJOR_VERSION | cut -d "-" -f1 | cut -d "." -f2 )
BUMP_MAJOR_RIGHT=$(( MAJOR_RIGHT_PART + 1 ))
if [ "$MAJOR_RIGHT" = "04" ]; then
BUMP_MAJOR_LEFT="$MAJOR_LEFT"
BUMP_MAJOR_RIGHT="10"
else
BUMP_MAJOR_LEFT=$(( $MAJOR_LEFT + 1 ))
BUMP_MAJOR_RIGHT="04"
fi

export NEXT_MAJOR_VERSION="$BUMP_MAJOR_LEFT.$BUMP_MAJOR_RIGHT"

export RPM_SIGNING_KEY_FILE="$(pwd)/key.gpg"
export RPM_SIGNING_KEY_ID="$RPM_GPG_SIGNING_KEY_ID"
export NFPM_RPM_PASSPHRASE="$RPM_GPG_SIGNING_PASSPHRASE"

for FILE in ${{ inputs.nfpm_file_pattern }}; do
DIRNAME=$(dirname $FILE)
BASENAME=$(basename $FILE)
cd $DIRNAME
sed -i "s/@APACHE_USER@/$APACHE_USER/g" $BASENAME
sed -i "s/@APACHE_GROUP@/$APACHE_GROUP/g" $BASENAME
sed -i "s/@COMMIT_HASH@/${{ inputs.commit_hash }}/g" $BASENAME
nfpm package --config $BASENAME --packager ${{ inputs.package_extension }}
cd -
mv $DIRNAME/*.${{ inputs.package_extension }} ./
done
shell: bash

- name: Cache packages
uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2

Check warning on line 108 in .github/actions/package-nfpm/action.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

108:73 [comments] too few spaces before comment
with:
path: ./*.${{ inputs.package_extension }}
key: ${{ inputs.cache_key }}

# Update if condition to true to get packages as artifacts
- if: ${{ false }}
name: Upload package artifacts
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3

Check warning on line 116 in .github/actions/package-nfpm/action.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

116:78 [comments] too few spaces before comment
with:
name: packages-${{ inputs.distrib }}
path: ./*.${{ inputs.package_extension}}
retention-days: 1
4 changes: 2 additions & 2 deletions .github/actions/package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@
shell: bash

- name: Upload package artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3

Check warning on line 75 in .github/actions/package/action.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

75:78 [comments] too few spaces before comment
with:
name: packages-${{ inputs.distrib }}
path: ./*.${{ inputs.package_extension }}
retention-days: 1

- name: Cache packages
uses: actions/cache/save@v3
uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2

Check warning on line 82 in .github/actions/package/action.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

82:73 [comments] too few spaces before comment
with:
path: ./*.${{ inputs.package_extension }}
key: ${{ inputs.cache_key }}
96 changes: 96 additions & 0 deletions .github/actions/promote-to-stable/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: "promote testing to stable"
description: "Promote testing packages to stable."
inputs:
artifactory_token:
description: "Artifactory token"
required: true
module:
description: "Module"
required: true
distrib:
description: "The distribution used for packaging"
required: true
stability:
description: "The package stability (stable, testing, unstable)"
required: true

runs:
using: "composite"
steps:
- uses: jfrog/setup-jfrog-cli@901bb9632db90821c2d3f076012bdeaf66598555 # v3.4.1
env:
JF_URL: https://centreon.jfrog.io
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}

- name: Promote RPM packages to stable
if: ${{ startsWith(inputs.distrib, 'el') }}
run: |
set -x
echo "[DEBUG] - Distrib: ${{ inputs.distrib }}"

for ARCH in "noarch" "x86_64"; do
echo "[DEBUG] - Get path of $ARCH testing artifacts to promote to stable."
SRC_PATHS=$(jf rt s --include-dirs rpm-plugins/${{ inputs.distrib }}/testing/$ARCH/${{ inputs.module }}/*.rpm | jq -r '.[].path')

if [[ ${SRC_PATHS[@]} ]]; then
for SRC_PATH in ${SRC_PATHS[@]}; do
echo "[DEBUG] - Source path found: $SRC_PATH"
done
else
echo "[DEBUG] - No source path found."
continue
fi

echo "[DEBUG] - Build $ARCH target path."
TARGET_PATH="rpm-plugins/${{ inputs.distrib }}/${{ inputs.stability }}/$ARCH/RPMS/${{ inputs.module }}/"
echo "[DEBUG] - Target path: $TARGET_PATH"

echo "[DEBUG] - Promoting $ARCH testing artifacts to stable."
for ARTIFACT in ${SRC_PATHS[@]}; do
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

- name: Promote DEB package to stable
if: ${{ startsWith(inputs.distrib, 'bullseye') }}
run: |
echo "[DEBUG] - Distrib: ${{ inputs.distrib }}"

echo "[DEBUG] - Get path of testing DEB packages to promote to stable."
SRC_PATHS=$(jf rt s --include-dirs apt-plugins-testing/pool/${{ inputs.module }}/*.deb | jq -r '.[].path')

if [[ ${SRC_PATHS[@]} ]]; then
for SRC_PATH in ${SRC_PATHS[@]}; do
echo "[DEBUG] - Source path found: $SRC_PATH"
done
else
echo "[DEBUG] - No source path found."
continue
fi

echo "[DEBUG] - Build target path."
TARGET_PATH="apt-plugins-${{ inputs.stability }}/pool/${{ inputs.module }}/"
echo "[DEBUG] - Target path: $TARGET_PATH"

echo "[DEBUG] - Promoting DEB testing artifacts to stable."
for ARTIFACT in ${SRC_PATHS[@]}; do
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
4 changes: 2 additions & 2 deletions .github/actions/rpm-delivery-legacy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
using: "composite"
steps:
- name: Use cache RPM files
uses: actions/cache/restore@v3
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2

Check warning on line 27 in .github/actions/rpm-delivery-legacy/action.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

27:76 [comments] too few spaces before comment
with:
path: ./*.rpm
key: ${{ inputs.cache_key }}
fail-on-cache-miss: true

- uses: jfrog/setup-jfrog-cli@v3
- uses: jfrog/setup-jfrog-cli@901bb9632db90821c2d3f076012bdeaf66598555 # v3.4.1

Check warning on line 33 in .github/actions/rpm-delivery-legacy/action.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

33:76 [comments] too few spaces before comment
env:
JF_URL: https://centreon.jfrog.io
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}
Expand Down
9 changes: 7 additions & 2 deletions .github/actions/rpm-delivery/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@ inputs:
runs:
using: "composite"
steps:
- name: Remove previously delivered RPMs
run: rm -f ./*.rpm
shell: bash

- name: Use cache RPM files
uses: actions/cache/restore@v3
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ./*.rpm
key: ${{ inputs.cache_key }}
fail-on-cache-miss: true

- 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 @@ -48,6 +52,7 @@ runs:
exit 1
fi

rm -rf noarch x86_64
mkdir noarch x86_64

for FILE in $FILES; do
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/runner-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
using: "composite"
steps:
- name: Login to Registry (via runner)
uses: docker/login-action@v2
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0

Check warning on line 32 in .github/actions/runner-docker/action.yml

View workflow job for this annotation

GitHub Actions / yaml-lint

32:74 [comments] too few spaces before comment
with:
registry: ${{ inputs.registry_url }}
username: ${{ inputs.registry_username }}
Expand Down
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: '/'
schedule:
interval: weekly
open-pull-requests-limit: 10
labels:
- 'pr: dependencies'
4 changes: 2 additions & 2 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

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

- name: Install Yaml
run: |
Expand Down
Loading
Loading