mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-04-07 20:35:27 +02:00
Release 20240212 (#4897)
This commit is contained in:
commit
07056df138
@ -24,7 +24,7 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Use cache DEB files
|
||||
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./*.deb
|
||||
key: ${{ inputs.cache_key }}
|
||||
|
16
.github/actions/deb-delivery/action.yml
vendored
16
.github/actions/deb-delivery/action.yml
vendored
@ -21,30 +21,40 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Remove previously delivered DEBs
|
||||
if: ${{ ! (inputs.distrib == 'jammy' && inputs.stability == 'stable') }}
|
||||
run: rm -f ./*.deb
|
||||
shell: bash
|
||||
|
||||
- name: Use cache DEB files
|
||||
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
if: ${{ ! (inputs.distrib == 'jammy' && inputs.stability == 'stable') }}
|
||||
uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./*.deb
|
||||
key: ${{ inputs.cache_key }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- uses: jfrog/setup-jfrog-cli@901bb9632db90821c2d3f076012bdeaf66598555 # v3.4.1
|
||||
- if: ${{ ! (inputs.distrib == 'jammy' && inputs.stability == 'stable') }}
|
||||
uses: jfrog/setup-jfrog-cli@901bb9632db90821c2d3f076012bdeaf66598555 # v3.4.1
|
||||
env:
|
||||
JF_URL: https://centreon.jfrog.io
|
||||
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}
|
||||
|
||||
- name: Publish DEBs to artifactory
|
||||
if: ${{ ! (inputs.distrib == 'jammy' && inputs.stability == 'stable') }}
|
||||
run: |
|
||||
FILES="*.deb"
|
||||
|
||||
if [[ "${{ inputs.distrib }}" == "jammy" ]]; then
|
||||
REPO_PREFIX="ubuntu"
|
||||
else
|
||||
REPO_PREFIX="apt"
|
||||
fi
|
||||
|
||||
for FILE in $FILES; do
|
||||
echo "[DEBUG] - File: $FILE"
|
||||
|
||||
ARCH=$(echo $FILE | cut -d '_' -f3 | cut -d '.' -f1)
|
||||
|
||||
jf rt upload "$FILE" "apt-plugins-${{ inputs.stability }}/pool/${{ inputs.module_name }}/" --deb "${{ inputs.distrib }}/main/$ARCH"
|
||||
jf rt upload "$FILE" "${REPO_PREFIX}-plugins-${{ inputs.stability }}/pool/${{ inputs.module_name }}/" --deb "${{ inputs.distrib }}/main/$ARCH"
|
||||
done
|
||||
shell: bash
|
||||
|
65
.github/actions/merge-artifacts/action.yml
vendored
Normal file
65
.github/actions/merge-artifacts/action.yml
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
name: 'Merge Artifacts'
|
||||
description: 'Merge Artifacts'
|
||||
inputs:
|
||||
target_name:
|
||||
description: 'The name of the result artifact'
|
||||
required: true
|
||||
source_paths:
|
||||
description: 'The path to the files that will be uplaoded'
|
||||
required: true
|
||||
source_name_pattern:
|
||||
description: "Artifact's pattern to be merged"
|
||||
required: true
|
||||
github_token:
|
||||
description: 'The Github Token to use'
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Download Artifacts
|
||||
uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0
|
||||
with:
|
||||
pattern: ${{ inputs.source_name_pattern }}*
|
||||
path: ${{ inputs.target_name }}
|
||||
merge-multiple: true
|
||||
|
||||
- name: Upload the Regrouped Artifact
|
||||
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
|
||||
with:
|
||||
name: ${{ inputs.target_name }}
|
||||
path: |
|
||||
${{ inputs.source_paths }}
|
||||
retention-days: 1
|
||||
|
||||
- name: Delete Artifacts
|
||||
run: |
|
||||
artifact_pattern="${{ inputs.source_name_pattern }}"
|
||||
TOKEN="${{ inputs.github_token }}"
|
||||
artifact_exists=true
|
||||
while [ "$artifact_exists" = true ]; do
|
||||
artifact_exists=false
|
||||
artifacts_response=$(curl -L \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "Authorization: Bearer $TOKEN" \
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
"https://api.github.com/repos/${{ github.repository }}/actions/artifacts?per_page=100")
|
||||
artifacts=$(echo $artifacts_response | jq -c '.artifacts[]')
|
||||
echo "Those are the artifacts : $artifacts"
|
||||
while read row; do
|
||||
artifact_name=$(echo "$row" | jq -r '.name')
|
||||
if [[ "$artifact_name" =~ ^.*"$artifact_pattern".* ]]; then
|
||||
artifact_exists=true
|
||||
echo "Deleting : $artifact_name"
|
||||
artifact_id=$(echo "$row" | jq -r '.id')
|
||||
curl -L \
|
||||
-X DELETE \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "Authorization: Bearer $TOKEN" \
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
"https://api.github.com/repos/${{ github.repository }}/actions/artifacts/${artifact_id}"
|
||||
fi
|
||||
done <<< "$artifacts"
|
||||
done
|
||||
echo "End of Deleting"
|
||||
shell: bash
|
56
.github/actions/package-nfpm/action.yml
vendored
56
.github/actions/package-nfpm/action.yml
vendored
@ -10,6 +10,9 @@ inputs:
|
||||
distrib:
|
||||
description: The package distrib
|
||||
required: true
|
||||
version:
|
||||
description: The package version ([major_version].[minor_version])
|
||||
required: false
|
||||
major_version:
|
||||
description: The major version
|
||||
required: false
|
||||
@ -18,7 +21,7 @@ inputs:
|
||||
required: false
|
||||
release:
|
||||
description: The package release number
|
||||
required: false
|
||||
required: true
|
||||
arch:
|
||||
description: The package architecture
|
||||
required: false
|
||||
@ -37,6 +40,9 @@ inputs:
|
||||
rpm_gpg_signing_passphrase:
|
||||
description: The rpm gpg signing passphrase
|
||||
required: true
|
||||
stability:
|
||||
description: "Branch stability (stable, testing, unstable, canary)"
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
@ -59,8 +65,15 @@ runs:
|
||||
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 }}"
|
||||
if [ -z ${{ inputs.version }} ]; then
|
||||
export VERSION="${{ inputs.major_version }}.${{ inputs.minor_version }}"
|
||||
export MAJOR_VERSION="${{ inputs.major_version }}"
|
||||
export MINOR_VERSION="${{ inputs.minor_version }}"
|
||||
elif [ -z ${{ inputs.major_version }} ]; then
|
||||
export VERSION="${{ inputs.version }}"
|
||||
export MAJOR_VERSION=$( echo $VERSION | cut -d "-" -f1 )
|
||||
export MINOR_VERSION=$( echo $VERSION | cut -d "-" -f2 )
|
||||
fi
|
||||
export RELEASE="${{ inputs.release }}"
|
||||
export ARCH="${{ inputs.arch }}"
|
||||
|
||||
@ -70,23 +83,28 @@ runs:
|
||||
export APACHE_GROUP="apache"
|
||||
else
|
||||
export DIST=""
|
||||
if [ "${{ inputs.stability }}" == "unstable" ] || [ "${{ inputs.stability }}" == "canary" ]; then
|
||||
export RELEASE="$RELEASE~${{ inputs.distrib }}"
|
||||
elif [ "${{ inputs.stability }}" == "testing" ]; then
|
||||
export RELEASE="1~${{ inputs.distrib }}"
|
||||
fi
|
||||
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"
|
||||
if [ -z "$MAJOR_VERSION" ]; then
|
||||
MAJOR_LEFT=$( echo $VERSION | cut -d "." -f1 )
|
||||
MAJOR_RIGHT=$( echo $VERSION | cut -d "-" -f1 | cut -d "." -f2 )
|
||||
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"
|
||||
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"
|
||||
@ -104,16 +122,22 @@ runs:
|
||||
done
|
||||
shell: bash
|
||||
|
||||
- name: Cache packages
|
||||
- if: ${{ inputs.distrib == 'el7' }}
|
||||
uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
with:
|
||||
path: ./*.${{ inputs.package_extension }}
|
||||
key: ${{ inputs.cache_key }}
|
||||
|
||||
- if: ${{ inputs.distrib != 'el7' }}
|
||||
uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
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
|
||||
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
||||
with:
|
||||
name: packages-${{ inputs.distrib }}
|
||||
path: ./*.${{ inputs.package_extension}}
|
||||
|
85
.github/actions/package/action.yml
vendored
85
.github/actions/package/action.yml
vendored
@ -1,85 +0,0 @@
|
||||
name: package
|
||||
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
|
||||
version:
|
||||
description: The package version
|
||||
required: false
|
||||
release:
|
||||
description: The package release number
|
||||
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: 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 VERSION="${{ inputs.version }}"
|
||||
export RELEASE="${{ inputs.release }}"
|
||||
|
||||
if [ "${{ inputs.package_extension }}" = "rpm" ]; then
|
||||
export DIST=".${{ inputs.distrib }}"
|
||||
else
|
||||
export DIST=""
|
||||
fi
|
||||
|
||||
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/@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: Upload package artifacts
|
||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
||||
with:
|
||||
name: packages-${{ inputs.distrib }}
|
||||
path: ./*.${{ inputs.package_extension }}
|
||||
retention-days: 1
|
||||
|
||||
- name: Cache packages
|
||||
uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
with:
|
||||
path: ./*.${{ inputs.package_extension }}
|
||||
key: ${{ inputs.cache_key }}
|
2
.github/actions/promote-to-stable/action.yml
vendored
2
.github/actions/promote-to-stable/action.yml
vendored
@ -60,7 +60,7 @@ runs:
|
||||
shell: bash
|
||||
|
||||
- name: Promote DEB package to stable
|
||||
if: ${{ startsWith(inputs.distrib, 'bullseye') }}
|
||||
if: ${{ startsWith(inputs.distrib, 'bullseye') || startsWith(inputs.distrib, 'bookworm' }}
|
||||
run: |
|
||||
echo "[DEBUG] - Distrib: ${{ inputs.distrib }}"
|
||||
|
||||
|
@ -24,7 +24,7 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Use cache RPM files
|
||||
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./*.rpm
|
||||
key: ${{ inputs.cache_key }}
|
||||
|
2
.github/actions/rpm-delivery/action.yml
vendored
2
.github/actions/rpm-delivery/action.yml
vendored
@ -25,7 +25,7 @@ runs:
|
||||
shell: bash
|
||||
|
||||
- name: Use cache RPM files
|
||||
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./*.rpm
|
||||
key: ${{ inputs.cache_key }}
|
||||
|
5
.github/dependabot.yml
vendored
5
.github/dependabot.yml
vendored
@ -3,7 +3,8 @@ updates:
|
||||
- package-ecosystem: github-actions
|
||||
directory: '/'
|
||||
schedule:
|
||||
interval: weekly
|
||||
interval: monthly
|
||||
open-pull-requests-limit: 10
|
||||
labels:
|
||||
- 'pr: dependencies'
|
||||
- 'dependencies'
|
||||
- 'gha'
|
||||
|
53
.github/docker/Dockerfile.packaging-plugins-bookworm
vendored
Normal file
53
.github/docker/Dockerfile.packaging-plugins-bookworm
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
ARG REGISTRY_URL
|
||||
|
||||
FROM ${REGISTRY_URL}/debian:bookworm
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# fix locale
|
||||
RUN bash -e <<EOF
|
||||
|
||||
apt-get update
|
||||
apt-get install -y locales
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
|
||||
apt-get clean
|
||||
|
||||
EOF
|
||||
|
||||
ENV LANG en_US.utf8
|
||||
|
||||
RUN bash -e <<EOF
|
||||
|
||||
apt-get update
|
||||
|
||||
echo 'http://deb.debian.org/debian' | apt-get install -y pbuilder
|
||||
|
||||
apt-get install -y \
|
||||
dh-make \
|
||||
aptitude \
|
||||
ca-certificates \
|
||||
libssh-dev \
|
||||
lintian \
|
||||
quilt \
|
||||
git-buildpackage \
|
||||
debmake \
|
||||
devscripts \
|
||||
fakeroot \
|
||||
curl \
|
||||
gcc \
|
||||
git \
|
||||
python3 \
|
||||
libjson-perl \
|
||||
libapp-fatpacker-perl \
|
||||
libfile-copy-recursive-perl \
|
||||
jq \
|
||||
zstd
|
||||
|
||||
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
|
||||
apt-get update
|
||||
apt-get install -y nfpm
|
||||
|
||||
apt-get clean
|
||||
|
||||
EOF
|
53
.github/docker/Dockerfile.packaging-plugins-jammy
vendored
Normal file
53
.github/docker/Dockerfile.packaging-plugins-jammy
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
ARG REGISTRY_URL
|
||||
|
||||
FROM ${REGISTRY_URL}/ubuntu:jammy
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# fix locale
|
||||
RUN bash -e <<EOF
|
||||
|
||||
apt-get update
|
||||
apt-get install -y locales
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
|
||||
apt-get clean
|
||||
|
||||
EOF
|
||||
|
||||
ENV LANG en_US.utf8
|
||||
|
||||
RUN bash -e <<EOF
|
||||
|
||||
apt-get update
|
||||
|
||||
echo 'http://deb.debian.org/debian' | apt-get install -y pbuilder
|
||||
|
||||
apt-get install -y \
|
||||
dh-make \
|
||||
aptitude \
|
||||
ca-certificates \
|
||||
libssh-dev \
|
||||
lintian \
|
||||
quilt \
|
||||
git-buildpackage \
|
||||
debmake \
|
||||
devscripts \
|
||||
fakeroot \
|
||||
curl \
|
||||
gcc \
|
||||
git \
|
||||
python3 \
|
||||
libjson-perl \
|
||||
libapp-fatpacker-perl \
|
||||
libfile-copy-recursive-perl \
|
||||
jq \
|
||||
zstd
|
||||
|
||||
echo 'deb [trusted=yes] https://repo.goreleaser.com/apt/ /' | tee /etc/apt/sources.list.d/goreleaser.list
|
||||
apt-get update
|
||||
apt-get install -y nfpm
|
||||
|
||||
apt-get clean
|
||||
|
||||
EOF
|
22
.github/scripts/pod_spell_check.t
vendored
Normal file
22
.github/scripts/pod_spell_check.t
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More;
|
||||
use Test::Spelling;
|
||||
|
||||
if (!@ARGV) {
|
||||
die "Missing perl file to check.";
|
||||
}
|
||||
|
||||
my $stopword_filename='.github/scripts/stopwords.t';
|
||||
if(defined($ARGV[1])){
|
||||
$stopword_filename=$ARGV[1];
|
||||
}
|
||||
open(FILE, "<", $stopword_filename)
|
||||
or die "Could not open $stopword_filename";
|
||||
printf("stopword file use : ".$stopword_filename." \n");
|
||||
|
||||
add_stopwords(<FILE>);
|
||||
set_spell_cmd('hunspell -l');
|
||||
all_pod_files_spelling_ok($ARGV[0]);
|
||||
close(FILE);
|
15
.github/scripts/stopwords.t
vendored
Normal file
15
.github/scripts/stopwords.t
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
--filter-vdom
|
||||
--force-counters32
|
||||
Centreon
|
||||
Fortinet
|
||||
Fortigate
|
||||
license-instances-usage-prct
|
||||
OID
|
||||
oneaccess-sys-mib
|
||||
perfdata
|
||||
powershell
|
||||
SNMP
|
||||
space-usage-prct
|
||||
SSH
|
||||
SureBackup
|
||||
Veeam
|
7
.github/workflows/actionlint.yml
vendored
7
.github/workflows/actionlint.yml
vendored
@ -61,6 +61,13 @@ jobs:
|
||||
spaces: 2
|
||||
indent-sequences: true
|
||||
check-multi-line-strings: false
|
||||
comments:
|
||||
ignore-shebangs: true
|
||||
min-spaces-from-content: 1
|
||||
comments-indentation: disable
|
||||
new-lines:
|
||||
type: unix
|
||||
new-line-at-end-of-file: enable
|
||||
EOF
|
||||
|
||||
- name: Lint YAML files
|
||||
|
11
.github/workflows/connector-vmware.yml
vendored
11
.github/workflows/connector-vmware.yml
vendored
@ -40,6 +40,12 @@ jobs:
|
||||
- package_extension: deb
|
||||
image: packaging-plugins-bullseye
|
||||
distrib: bullseye
|
||||
- package_extension: deb
|
||||
image: packaging-plugins-bookworm
|
||||
distrib: bookworm
|
||||
- package_extension: deb
|
||||
image: packaging-plugins-jammy
|
||||
distrib: jammy
|
||||
|
||||
container:
|
||||
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
|
||||
@ -54,7 +60,7 @@ jobs:
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- name: Package
|
||||
uses: ./.github/actions/package
|
||||
uses: ./.github/actions/package-nfpm
|
||||
with:
|
||||
nfpm_file_pattern: "connectors/vmware/packaging/centreon-plugin-virtualization-vmware-daemon.yaml"
|
||||
distrib: ${{ matrix.distrib }}
|
||||
@ -66,6 +72,7 @@ jobs:
|
||||
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
|
||||
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
|
||||
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
|
||||
stability: ${{ needs.get-environment.outputs.stability }}
|
||||
|
||||
deliver-rpm:
|
||||
needs:
|
||||
@ -100,7 +107,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
distrib: [bullseye]
|
||||
distrib: [bullseye, bookworm, jammy]
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
|
@ -37,6 +37,12 @@ jobs:
|
||||
- runner: ["self-hosted", "collect-arm64"]
|
||||
dockerfile: packaging-plugins-bullseye
|
||||
image: packaging-plugins-bullseye-arm64
|
||||
- runner: ubuntu-22.04
|
||||
dockerfile: packaging-plugins-bookworm
|
||||
image: packaging-plugins-bookworm
|
||||
- runner: ubuntu-22.04
|
||||
dockerfile: packaging-plugins-jammy
|
||||
image: packaging-plugins-jammy
|
||||
|
||||
runs-on: ${{ matrix.runner }}
|
||||
|
||||
@ -45,22 +51,22 @@ jobs:
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- name: Login to Registry
|
||||
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
|
||||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.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@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
|
||||
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
|
||||
with:
|
||||
registry: ${{ vars.DOCKER_PROXY_REGISTRY_URL }}
|
||||
username: ${{ secrets.DOCKER_REGISTRY_ID }}
|
||||
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}
|
||||
|
||||
- uses: docker/setup-buildx-action@885d1462b80bc1c1c7f0b00334ad271f09369c55 # v2.10.0
|
||||
- uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
|
||||
|
||||
- uses: docker/build-push-action@1104d471370f9806843c095c1db02b5a90c5f8b6 # v3.3.1
|
||||
- uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
|
||||
with:
|
||||
file: .github/docker/Dockerfile.${{ matrix.dockerfile }}
|
||||
context: .
|
||||
|
11
.github/workflows/nrpe.yml
vendored
11
.github/workflows/nrpe.yml
vendored
@ -38,6 +38,12 @@ jobs:
|
||||
- package_extension: deb
|
||||
image: packaging-plugins-bullseye
|
||||
distrib: bullseye
|
||||
- package_extension: deb
|
||||
image: packaging-plugins-bookworm
|
||||
distrib: bookworm
|
||||
- package_extension: deb
|
||||
image: packaging-plugins-jammy
|
||||
distrib: jammy
|
||||
|
||||
container:
|
||||
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
|
||||
@ -94,7 +100,7 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Package
|
||||
uses: ./.github/actions/package
|
||||
uses: ./.github/actions/package-nfpm
|
||||
with:
|
||||
nfpm_file_pattern: "nrpe/packaging/*.yaml"
|
||||
distrib: ${{ matrix.distrib }}
|
||||
@ -106,6 +112,7 @@ jobs:
|
||||
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
|
||||
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
|
||||
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
|
||||
stability: ${{ needs.get-environment.outputs.stability }}
|
||||
|
||||
deliver-rpm:
|
||||
needs: [get-environment, package]
|
||||
@ -136,7 +143,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
distrib: [bullseye]
|
||||
distrib: [bullseye, bookworm, jammy]
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
|
260
.github/workflows/perl-cpan-libraries.yml
vendored
260
.github/workflows/perl-cpan-libraries.yml
vendored
@ -22,7 +22,7 @@ jobs:
|
||||
get-environment:
|
||||
uses: ./.github/workflows/get-environment.yml
|
||||
|
||||
package:
|
||||
package-rpm:
|
||||
needs: [get-environment]
|
||||
if: ${{ needs.get-environment.outputs.stability != 'stable' }}
|
||||
|
||||
@ -30,7 +30,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
distrib: [el8, el9, bullseye]
|
||||
distrib: [el8, el9]
|
||||
name:
|
||||
[
|
||||
"Authen::SASL::SASLprep",
|
||||
@ -98,9 +98,8 @@ jobs:
|
||||
"ZMQ::LibZMQ4"
|
||||
]
|
||||
include:
|
||||
- build_distribs: "el8,el9,bullseye"
|
||||
- build_distribs: "el8,el9"
|
||||
- rpm_dependencies: ""
|
||||
- deb_dependencies: ""
|
||||
- rpm_provides: ""
|
||||
- version: ""
|
||||
- use_dh_make_perl: "true"
|
||||
@ -111,30 +110,20 @@ jobs:
|
||||
- distrib: el9
|
||||
package_extension: rpm
|
||||
image: packaging-plugins-alma9
|
||||
- distrib: bullseye
|
||||
package_extension: deb
|
||||
image: packaging-plugins-bullseye
|
||||
- name: "BSON"
|
||||
build_distribs: "el8,el9"
|
||||
rpm_provides: "perl(BSON::Bytes) perl(BSON::Code) perl(BSON::DBRef) perl(BSON::OID) perl(BSON::Raw) perl(BSON::Regex) perl(BSON::Time) perl(BSON::Timestamp) perl(BSON::Types) perl(BSON)"
|
||||
- name: "BSON::XS"
|
||||
build_distribs: "el8,el9"
|
||||
- name: "Convert::Binary::C"
|
||||
build_distribs: "el8,el9"
|
||||
- name: "DateTime::Format::Duration::ISO8601"
|
||||
rpm_provides: "perl(DateTime-Format-Duration-ISO8601)"
|
||||
- name: "DBD::Sybase"
|
||||
build_distribs: "el8,el9"
|
||||
- name: "Device::Modbus::RTU::Client"
|
||||
version: "0.022"
|
||||
- name: "Device::Modbus::TCP::Client"
|
||||
version: "0.026"
|
||||
- name: "EV"
|
||||
build_distribs: "el8,el9"
|
||||
- name: "FFI::CheckLib"
|
||||
build_distribs: "el8,el9"
|
||||
- name: "FFI::Platypus"
|
||||
build_distribs: "el8,el9"
|
||||
rpm_provides: "perl(FFI::Platypus::Buffer) perl(FFI::Platypus::Memory)"
|
||||
- name: "Net::DHCP"
|
||||
rpm_provides: "perl(Net::DHCP::Constants) perl(Net::DHCP::Packet)"
|
||||
@ -142,18 +131,15 @@ jobs:
|
||||
version: "0.53"
|
||||
- name: "UUID"
|
||||
use_dh_make_perl: "false"
|
||||
build_distribs: "el8,el9"
|
||||
version: "0.31"
|
||||
- name: "ZMQ::Constants"
|
||||
build_distribs: "el9,bullseye"
|
||||
build_distribs: "el9"
|
||||
- name: "ZMQ::FFI"
|
||||
build_distribs: "el8,el9"
|
||||
rpm_dependencies: "zeromq"
|
||||
- name: "ZMQ::LibZMQ4"
|
||||
use_dh_make_perl: "false"
|
||||
version: "0.01"
|
||||
rpm_dependencies: "zeromq"
|
||||
deb_dependencies: "libzmq5"
|
||||
name: package ${{ matrix.distrib }} ${{ matrix.name }}
|
||||
container:
|
||||
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest
|
||||
@ -164,7 +150,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.package_extension == 'rpm' }}
|
||||
- if: ${{ contains(matrix.build_distribs, matrix.distrib) }}
|
||||
run: |
|
||||
yum install -y yum-utils epel-release git
|
||||
yum config-manager --set-enabled crb || true # alma 9
|
||||
@ -172,7 +158,7 @@ jobs:
|
||||
yum install -y cpanminus rpm-build libcurl-devel libssh-devel expat-devel gcc ruby libuuid-devel zeromq-devel libxml2-devel libffi-devel perl-DBI perl-Net-Pcap freetds freetds-devel
|
||||
shell: bash
|
||||
|
||||
- if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.package_extension == 'rpm' && matrix.spec_file == '' }}
|
||||
- if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.spec_file == '' }}
|
||||
run: |
|
||||
if [ -z "${{ matrix.version }}" ]; then
|
||||
PACKAGE_VERSION=""
|
||||
@ -205,7 +191,7 @@ jobs:
|
||||
fpm -s cpan -t ${{ matrix.package_extension }} --rpm-dist ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test$PACKAGE_DEPENDENCIES$PACKAGE_PROVIDES$PACKAGE_VERSION ${{ matrix.name }}
|
||||
shell: bash
|
||||
|
||||
- if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.package_extension == 'rpm' && matrix.spec_file != '' }}
|
||||
- if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.spec_file != '' }}
|
||||
run: |
|
||||
mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
|
||||
|
||||
@ -214,17 +200,146 @@ jobs:
|
||||
cp -r ~/rpmbuild/RPMS/noarch/*.rpm .
|
||||
shell: bash
|
||||
|
||||
- if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.package_extension == 'deb' && matrix.use_dh_make_perl == 'false' }}
|
||||
- name: Replace '::' with - in the feature path
|
||||
id: package-name
|
||||
run: |
|
||||
apt update
|
||||
apt install -y cpanminus ruby libcurl4-openssl-dev libssh-dev uuid-dev libczmq-dev
|
||||
name="${{ matrix.name }}"
|
||||
name_with_dash="${name//::/-}"
|
||||
echo "Modified Name: $name_with_dash"
|
||||
echo "name_with_dash=$name_with_dash" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
||||
with:
|
||||
name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ steps.package-name.outputs.name_with_dash }}
|
||||
path: ./*.${{ matrix.package_extension }}
|
||||
retention-days: 1
|
||||
|
||||
package-deb:
|
||||
needs: [get-environment]
|
||||
if: ${{ needs.get-environment.outputs.stability != 'stable' }}
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
distrib: [bullseye, bookworm, jammy]
|
||||
name:
|
||||
[
|
||||
"Authen::SASL::SASLprep",
|
||||
"Authen::SCRAM::Client",
|
||||
"boolean",
|
||||
"Carp::Assert",
|
||||
"Clone",
|
||||
"Clone::Choose",
|
||||
"common::sense",
|
||||
"Convert::EBCDIC",
|
||||
"Crypt::Blowfish_PP",
|
||||
"DateTime::Format::Duration::ISO8601",
|
||||
"Device::Modbus",
|
||||
"Digest::MD5::File",
|
||||
"Digest::SHA1",
|
||||
"Email::Send::SMTP::Gmail",
|
||||
"FFI::CheckLib",
|
||||
"File::SearchPath",
|
||||
"Hash::Merge",
|
||||
"Hash::Ordered",
|
||||
"HTTP::Daemon",
|
||||
"HTTP::Daemon::SSL",
|
||||
"HTTP::ProxyPAC",
|
||||
"JMX::Jmx4Perl",
|
||||
"JSON::Parse",
|
||||
"JSON::WebToken",
|
||||
"LV",
|
||||
"MIME::Types",
|
||||
"MongoDB",
|
||||
"Net::FTPSSL",
|
||||
"Net::HTTPTunnel",
|
||||
"Net::NTP",
|
||||
"Net::SMTPS",
|
||||
"Net::SMTP_auth",
|
||||
"Net::Subnet",
|
||||
"Net::TFTP",
|
||||
"PBKDF2::Tiny",
|
||||
"Schedule::Cron",
|
||||
"Statistics::Descriptive",
|
||||
"Statistics::Regression",
|
||||
"Sys::SigAction",
|
||||
"Term::Clui",
|
||||
"Term::ShellUI",
|
||||
"Unicode::Stringprep",
|
||||
"URI::Encode",
|
||||
"URI::Template",
|
||||
"URL::Encode",
|
||||
"UUID::URandom",
|
||||
"WWW::Selenium",
|
||||
"XML::Filter::BufferText",
|
||||
"XML::LibXML::Simple",
|
||||
"XML::SAX::Writer",
|
||||
"ZMQ::Constants",
|
||||
"ZMQ::LibZMQ4"
|
||||
]
|
||||
include:
|
||||
- build_distribs: "bullseye,bookworm,jammy"
|
||||
- deb_dependencies: ""
|
||||
- rpm_provides: ""
|
||||
- version: ""
|
||||
- use_dh_make_perl: "true"
|
||||
- spec_file: ""
|
||||
- distrib: bullseye
|
||||
package_extension: deb
|
||||
image: packaging-plugins-bullseye
|
||||
- distrib: bookworm
|
||||
package_extension: deb
|
||||
image: packaging-plugins-bookworm
|
||||
- distrib: jammy
|
||||
package_extension: deb
|
||||
image: packaging-plugins-jammy
|
||||
- name: "DateTime::Format::Duration::ISO8601"
|
||||
- name: "Statistics::Regression"
|
||||
version: "0.53"
|
||||
- name: "ZMQ::Constants"
|
||||
- name: "ZMQ::LibZMQ4"
|
||||
use_dh_make_perl: "false"
|
||||
version: "0.01"
|
||||
deb_dependencies: "libzmq5"
|
||||
name: package ${{ matrix.distrib }} ${{ matrix.name }}
|
||||
container:
|
||||
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest
|
||||
credentials:
|
||||
username: ${{ secrets.DOCKER_REGISTRY_ID }}
|
||||
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- name: Get package version
|
||||
id: package-version
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y cpanminus
|
||||
|
||||
if [ -z "${{ matrix.version }}" ]; then
|
||||
CPAN_PACKAGE_VERSION=$(cpanm --info ${{ matrix.name }} | sed 's/\.tar\.gz$//' | sed 's/.*\-//' | sed 's/v//')
|
||||
|
||||
if [[ ! $CPAN_PACKAGE_VERSION =~ ^[0-9]+\.[0-9]+ ]]; then
|
||||
echo "::error::Invalid version number: ${CPAN_PACKAGE_VERSION}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PACKAGE_VERSION="${CPAN_PACKAGE_VERSION}"
|
||||
else
|
||||
PACKAGE_VERSION="${{ matrix.version }}"
|
||||
fi
|
||||
|
||||
echo "package_version=$(echo $PACKAGE_VERSION)" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
- if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'false' }}
|
||||
run: |
|
||||
apt-get install -y ruby libcurl4-openssl-dev libssh-dev uuid-dev libczmq-dev
|
||||
|
||||
PACKAGE_NAME=`echo ${{ matrix.name }} | sed -e 's/::/-/g' | tr '[A-Z]' '[a-z]' | sed -e 's/^/lib/g' | sed -e 's/$/-perl/g' | sed -e 's/liblib/lib/g'`
|
||||
if [ -z "${{ matrix.version }}" ]; then
|
||||
PACKAGE_VERSION=""
|
||||
else
|
||||
PACKAGE_VERSION=" -v ${{ matrix.version }}"
|
||||
fi
|
||||
|
||||
if [ -z "${{ matrix.deb_dependencies }}" ]; then
|
||||
PACKAGE_DEPENDENCIES=""
|
||||
@ -238,31 +353,69 @@ jobs:
|
||||
cpanm Module::Install
|
||||
|
||||
gem install fpm
|
||||
fpm -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test -n $PACKAGE_NAME$PACKAGE_DEPENDENCIES$PACKAGE_VERSION ${{ matrix.name }}
|
||||
fpm -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --iteration ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test -n $PACKAGE_NAME$PACKAGE_DEPENDENCIES -v ${{ steps.package-version.outputs.package_version }} ${{ matrix.name }}
|
||||
shell: bash
|
||||
|
||||
- if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.package_extension == 'deb' && matrix.use_dh_make_perl == 'true' }}
|
||||
- if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'true' }}
|
||||
run: |
|
||||
apt update
|
||||
apt install -y cpanminus libcurl4-openssl-dev dh-make-perl libssh-dev uuid-dev libczmq-dev libmodule-install-perl
|
||||
apt-get install -y libcurl4-openssl-dev dh-make-perl libssh-dev uuid-dev libczmq-dev libmodule-install-perl
|
||||
|
||||
if [ -z "${{ matrix.version }}" ]; then
|
||||
PACKAGE_VERSION=""
|
||||
else
|
||||
PACKAGE_VERSION="--version ${{ matrix.version }}-${{ matrix.distrib }}"
|
||||
fi
|
||||
|
||||
DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --build $PACKAGE_VERSION --cpan ${{ matrix.name }}
|
||||
DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --dist ${{ matrix.distrib }} --build --version ${{ steps.package-version.outputs.package_version }}-${{ matrix.distrib }} --cpan ${{ matrix.name }}
|
||||
shell: bash
|
||||
|
||||
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
||||
- name: Replace '::' with - in the feature path
|
||||
id: package-name
|
||||
run: |
|
||||
name="${{ matrix.name }}"
|
||||
name_with_dash="${name//::/-}"
|
||||
echo "Modified Name: $name_with_dash"
|
||||
echo "name_with_dash=$name_with_dash" >> $GITHUB_OUTPUT
|
||||
shell: bash
|
||||
|
||||
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
||||
with:
|
||||
name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}
|
||||
name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ steps.package-name.outputs.name_with_dash}}
|
||||
path: ./*.${{ matrix.package_extension }}
|
||||
retention-days: 1
|
||||
|
||||
merge-package-rpm-artifacts:
|
||||
needs: [package-rpm]
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
distrib: [el8, el9]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- name: Merging Artifacts
|
||||
uses: ./.github/actions/merge-artifacts
|
||||
with:
|
||||
target_name: packages-rpm-${{ matrix.distrib }}
|
||||
source_paths: packages-rpm-${{ matrix.distrib }}/*.rpm
|
||||
source_name_pattern: packages-rpm-${{ matrix.distrib }}-
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
merge-package-deb-artifacts:
|
||||
needs: [package-deb]
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
distrib: [bullseye, bookworm, jammy]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- name: Merging Artifacts
|
||||
uses: ./.github/actions/merge-artifacts
|
||||
with:
|
||||
target_name: packages-deb-${{ matrix.distrib }}
|
||||
source_paths: packages-deb-${{ matrix.distrib }}/*.deb
|
||||
source_name_pattern: packages-deb-${{ matrix.distrib }}-
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
sign-rpm:
|
||||
needs: [package]
|
||||
needs: [merge-package-rpm-artifacts]
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
@ -282,7 +435,7 @@ jobs:
|
||||
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
|
||||
- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
|
||||
with:
|
||||
name: packages-rpm-${{ matrix.distrib }}
|
||||
path: ./
|
||||
@ -293,24 +446,27 @@ jobs:
|
||||
- run: rpmsign --addsign ./*.rpm
|
||||
shell: bash
|
||||
|
||||
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
- uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./*.rpm
|
||||
key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
|
||||
|
||||
download-and-cache-deb:
|
||||
needs: [package]
|
||||
needs: [merge-package-deb-artifacts]
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
distrib: [bullseye, bookworm, jammy]
|
||||
steps:
|
||||
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
|
||||
- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
|
||||
with:
|
||||
name: packages-deb-bullseye
|
||||
name: packages-deb-${{ matrix.distrib }}
|
||||
path: ./
|
||||
|
||||
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
- uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./*.deb
|
||||
key: ${{ github.sha }}-${{ github.run_id }}-deb-bullseye
|
||||
key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }}
|
||||
|
||||
deliver-rpm:
|
||||
needs: [get-environment, sign-rpm]
|
||||
@ -341,7 +497,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
distrib: [bullseye]
|
||||
distrib: [bullseye, bookworm, jammy]
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
@ -362,7 +518,7 @@ jobs:
|
||||
runs-on: [self-hosted, common]
|
||||
strategy:
|
||||
matrix:
|
||||
distrib: [el8, el9, bullseye]
|
||||
distrib: [el8, el9, bullseye, bookworm]
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
|
26
.github/workflows/perl-crypt-argon2.yml
vendored
26
.github/workflows/perl-crypt-argon2.yml
vendored
@ -46,6 +46,16 @@ jobs:
|
||||
package_extension: deb
|
||||
runner: ubuntu-22.04
|
||||
arch: amd64
|
||||
- image: packaging-plugins-bookworm
|
||||
distrib: bookworm
|
||||
package_extension: deb
|
||||
runner: ubuntu-22.04
|
||||
arch: amd64
|
||||
- image: packaging-plugins-jammy
|
||||
distrib: jammy
|
||||
package_extension: deb
|
||||
runner: ubuntu-22.04
|
||||
arch: amd64
|
||||
- image: packaging-plugins-bullseye-arm64
|
||||
distrib: bullseye
|
||||
package_extension: deb
|
||||
@ -68,7 +78,7 @@ jobs:
|
||||
|
||||
- name: Install locally Crypt::Argon2
|
||||
run: |
|
||||
if [ "${{ matrix.distrib }}" = "bullseye" ]; then
|
||||
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
|
||||
apt-get update
|
||||
apt-get install -y cpanminus gcc
|
||||
else
|
||||
@ -80,7 +90,7 @@ jobs:
|
||||
|
||||
- name: Set package name and paths according to distrib
|
||||
run: |
|
||||
if [ "${{ matrix.distrib }}" = "bullseye" ]; then
|
||||
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
|
||||
NAME="libcrypt-argon2-perl"
|
||||
if [ "${{ matrix.arch }}" = "amd64" ]; then
|
||||
PERL_VENDORARCH="/usr/lib/x86_64-linux-gnu/perl5/5.32"
|
||||
@ -109,16 +119,18 @@ jobs:
|
||||
distrib: ${{ matrix.distrib }}
|
||||
package_extension: ${{ matrix.package_extension }}
|
||||
arch: ${{ matrix.arch }}
|
||||
release: 3
|
||||
commit_hash: ${{ github.sha }}
|
||||
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension}}-perl-crypt-argon2-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
|
||||
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension }}-perl-crypt-argon2-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
|
||||
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
|
||||
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
|
||||
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
|
||||
stability: ${{ needs.get-environment.outputs.stability }}
|
||||
|
||||
# set condition to true if artifacts are needed
|
||||
- if: ${{ false }}
|
||||
name: Upload package artifacts
|
||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
||||
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
||||
with:
|
||||
name: packages-${{ matrix.distrib }}-${{ matrix.arch }}
|
||||
path: ./*.${{ matrix.package_extension}}
|
||||
@ -158,6 +170,10 @@ jobs:
|
||||
include:
|
||||
- distrib: bullseye
|
||||
arch: amd64
|
||||
- distrib: bookworm
|
||||
arch: amd64
|
||||
- distrib: jammy
|
||||
arch: amd64
|
||||
- distrib: bullseye
|
||||
arch: arm64
|
||||
|
||||
@ -189,6 +205,8 @@ jobs:
|
||||
arch: amd64
|
||||
- distrib: bullseye
|
||||
arch: amd64
|
||||
- distrib: bookworm
|
||||
arch: amd64
|
||||
- distrib: bullseye
|
||||
arch: arm64
|
||||
|
||||
|
8
.github/workflows/perl-filesys-smbclient.yml
vendored
8
.github/workflows/perl-filesys-smbclient.yml
vendored
@ -61,7 +61,7 @@ jobs:
|
||||
cp -r ~/rpmbuild/RPMS/x86_64/*.rpm .
|
||||
shell: bash
|
||||
|
||||
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
- uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./*.rpm
|
||||
key: unsigned-${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
|
||||
@ -92,7 +92,7 @@ jobs:
|
||||
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
- uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./*.rpm
|
||||
key: unsigned-${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
|
||||
@ -103,7 +103,7 @@ jobs:
|
||||
- run: rpmsign --addsign ./*.rpm
|
||||
shell: bash
|
||||
|
||||
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
- uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./*.rpm
|
||||
key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
|
||||
@ -138,7 +138,7 @@ jobs:
|
||||
DEB_BUILD_OPTIONS="nocheck nodocs notest noautodbgsym" dh-make-perl make --verbose --build --version 4.0-${{ matrix.distrib }} perl-filesys-smbclient/
|
||||
shell: bash
|
||||
|
||||
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
- uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./*.deb
|
||||
key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }}
|
||||
|
21
.github/workflows/perl-json-path.yml
vendored
21
.github/workflows/perl-json-path.yml
vendored
@ -38,6 +38,12 @@ jobs:
|
||||
- image: packaging-plugins-bullseye
|
||||
distrib: bullseye
|
||||
package_extension: deb
|
||||
- image: packaging-plugins-bookworm
|
||||
distrib: bookworm
|
||||
package_extension: deb
|
||||
- image: packaging-plugins-jammy
|
||||
distrib: jammy
|
||||
package_extension: deb
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
@ -55,7 +61,7 @@ jobs:
|
||||
|
||||
- name: Install locally JSON::Path
|
||||
run: |
|
||||
if [ "${{ matrix.distrib }}" = "bullseye" ]; then
|
||||
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
|
||||
apt-get update
|
||||
apt-get install -y cpanminus gcc
|
||||
else
|
||||
@ -72,7 +78,7 @@ jobs:
|
||||
- name: Set package name and paths according to distrib
|
||||
run: |
|
||||
VERSION="1.0.3"
|
||||
if [ "${{ matrix.distrib }}" = "bullseye" ]; then
|
||||
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
|
||||
NAME="libjson-path-perl"
|
||||
PERL_VENDORLIB="/usr/share/perl5"
|
||||
else
|
||||
@ -98,17 +104,19 @@ jobs:
|
||||
nfpm_file_pattern: "dependencies/perl-json-path/perl-json-path.yaml"
|
||||
distrib: ${{ matrix.distrib }}
|
||||
package_extension: ${{ matrix.package_extension }}
|
||||
release: 3
|
||||
arch: all
|
||||
commit_hash: ${{ github.sha }}
|
||||
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension}}-perl-json-path-${{ matrix.distrib }}-${{ github.head_ref || github.ref_name }}
|
||||
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension }}-perl-json-path-${{ matrix.distrib }}-${{ github.head_ref || github.ref_name }}
|
||||
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
|
||||
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
|
||||
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
|
||||
stability: ${{ needs.get-environment.outputs.stability }}
|
||||
|
||||
# set condition to true if artifacts are needed
|
||||
- if: ${{ false }}
|
||||
name: Upload package artifacts
|
||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
||||
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
||||
with:
|
||||
name: packages-${{ matrix.distrib }}
|
||||
path: ./*.${{ matrix.package_extension}}
|
||||
@ -145,8 +153,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
distrib: [bullseye]
|
||||
|
||||
distrib: [bullseye, bookworm]
|
||||
|
||||
name: Deliver ${{ matrix.distrib }}
|
||||
|
||||
@ -169,7 +176,7 @@ jobs:
|
||||
runs-on: [self-hosted, common]
|
||||
strategy:
|
||||
matrix:
|
||||
distrib: [bullseye]
|
||||
distrib: [bullseye, bookworm]
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
|
20
.github/workflows/perl-keepass-reader.yml
vendored
20
.github/workflows/perl-keepass-reader.yml
vendored
@ -57,7 +57,7 @@ jobs:
|
||||
cp -r ~/rpmbuild/RPMS/noarch/*.rpm .
|
||||
shell: bash
|
||||
|
||||
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
- uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./*.rpm
|
||||
key: unsigned-${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
|
||||
@ -88,7 +88,7 @@ jobs:
|
||||
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
- uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./*.rpm
|
||||
key: unsigned-${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
|
||||
@ -99,12 +99,12 @@ jobs:
|
||||
- run: rpmsign --addsign ./*.rpm
|
||||
shell: bash
|
||||
|
||||
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
- uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./*.rpm
|
||||
key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
|
||||
|
||||
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
||||
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
||||
with:
|
||||
name: packages-${{ matrix.distrib }}
|
||||
path: ./*.rpm
|
||||
@ -120,6 +120,10 @@ jobs:
|
||||
include:
|
||||
- image: bullseye
|
||||
distrib: bullseye
|
||||
- image: bookworm
|
||||
distrib: bookworm
|
||||
- image: jammy
|
||||
distrib: jammy
|
||||
name: package ${{ matrix.distrib }}
|
||||
container:
|
||||
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/packaging-plugins-${{ matrix.image }}:latest
|
||||
@ -140,12 +144,12 @@ jobs:
|
||||
DEB_BUILD_OPTIONS="nocheck nodocs notest noautodbgsym" dh-make-perl make -p libkeepass-reader-perl --verbose --build --version 0.2-${{ matrix.distrib }} perl-keepass-reader/
|
||||
shell: bash
|
||||
|
||||
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
- uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./*.deb
|
||||
key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }}
|
||||
|
||||
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
||||
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
||||
with:
|
||||
name: packages-${{ matrix.distrib }}
|
||||
path: ./*.deb
|
||||
@ -180,7 +184,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
distrib: [bullseye]
|
||||
distrib: [bullseye, bookworm, jammy]
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
@ -201,7 +205,7 @@ jobs:
|
||||
runs-on: [self-hosted, common]
|
||||
strategy:
|
||||
matrix:
|
||||
distrib: [el8, el9, bullseye]
|
||||
distrib: [el8, el9, bullseye, bookworm]
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
|
26
.github/workflows/perl-libssh-session.yml
vendored
26
.github/workflows/perl-libssh-session.yml
vendored
@ -44,6 +44,16 @@ jobs:
|
||||
package_extension: deb
|
||||
runner: ubuntu-22.04
|
||||
arch: amd64
|
||||
- image: packaging-plugins-bookworm
|
||||
distrib: bookworm
|
||||
package_extension: deb
|
||||
runner: ubuntu-22.04
|
||||
arch: amd64
|
||||
- image: packaging-plugins-jammy
|
||||
distrib: jammy
|
||||
package_extension: deb
|
||||
runner: ubuntu-22.04
|
||||
arch: amd64
|
||||
- image: packaging-plugins-bullseye-arm64
|
||||
distrib: bullseye
|
||||
package_extension: deb
|
||||
@ -66,7 +76,7 @@ jobs:
|
||||
|
||||
- name: Install locally Libssh::Session
|
||||
run: |
|
||||
if [ "${{ matrix.distrib }}" = "bullseye" ]; then
|
||||
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
|
||||
apt-get update
|
||||
apt-get install -y cpanminus gcc libssh-dev
|
||||
else
|
||||
@ -78,7 +88,7 @@ jobs:
|
||||
|
||||
- name: Set package name and paths according to distrib
|
||||
run: |
|
||||
if [ "${{ matrix.distrib }}" = "bullseye" ]; then
|
||||
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
|
||||
NAME="libssh-session-perl"
|
||||
if [ "${{ matrix.arch }}" = "amd64" ]; then
|
||||
PERL_VENDORARCH="/usr/lib/x86_64-linux-gnu/perl5/5.32"
|
||||
@ -107,16 +117,18 @@ jobs:
|
||||
distrib: ${{ matrix.distrib }}
|
||||
package_extension: ${{ matrix.package_extension }}
|
||||
arch: ${{ matrix.arch }}
|
||||
release: 4
|
||||
commit_hash: ${{ github.sha }}
|
||||
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension}}-perl-libssh-session-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
|
||||
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension }}-perl-libssh-session-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
|
||||
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
|
||||
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
|
||||
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
|
||||
stability: ${{ needs.get-environment.outputs.stability }}
|
||||
|
||||
# set condition to true if artifacts are needed
|
||||
- if: ${{ false }}
|
||||
name: Upload package artifacts
|
||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
||||
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
||||
with:
|
||||
name: packages-${{ matrix.distrib }}-${{ matrix.arch }}
|
||||
path: ./*.${{ matrix.package_extension}}
|
||||
@ -158,6 +170,10 @@ jobs:
|
||||
arch: amd64
|
||||
- distrib: bullseye
|
||||
arch: arm64
|
||||
- distrib: bookworm
|
||||
arch: amd64
|
||||
- distrib: jammy
|
||||
arch: amd64
|
||||
|
||||
name: Deliver ${{ matrix.distrib }} ${{ matrix.arch }}
|
||||
|
||||
@ -187,6 +203,8 @@ jobs:
|
||||
arch: amd64
|
||||
- distrib: bullseye
|
||||
arch: amd64
|
||||
- distrib: bookworm
|
||||
arch: amd64
|
||||
- distrib: bullseye
|
||||
arch: arm64
|
||||
|
||||
|
28
.github/workflows/perl-net-curl.yml
vendored
28
.github/workflows/perl-net-curl.yml
vendored
@ -44,6 +44,16 @@ jobs:
|
||||
package_extension: deb
|
||||
runner: ubuntu-22.04
|
||||
arch: amd64
|
||||
- image: packaging-plugins-bookworm
|
||||
distrib: bookworm
|
||||
package_extension: deb
|
||||
runner: ubuntu-22.04
|
||||
arch: amd64
|
||||
- image: packaging-plugins-jammy
|
||||
distrib: jammy
|
||||
package_extension: deb
|
||||
runner: ubuntu-22.04
|
||||
arch: amd64
|
||||
- image: packaging-plugins-bullseye-arm64
|
||||
distrib: bullseye
|
||||
package_extension: deb
|
||||
@ -66,7 +76,7 @@ jobs:
|
||||
|
||||
- name: Install locally Net::Curl
|
||||
run: |
|
||||
if [ "${{ matrix.distrib }}" = "bullseye" ]; then
|
||||
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
|
||||
apt-get update
|
||||
apt-get install -y libcurl4-openssl-dev cpanminus gcc
|
||||
else
|
||||
@ -78,7 +88,7 @@ jobs:
|
||||
|
||||
- name: Set package name and paths according to distrib
|
||||
run: |
|
||||
if [ "${{ matrix.distrib }}" = "bullseye" ]; then
|
||||
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
|
||||
NAME="libnet-curl-perl"
|
||||
if [ "${{ matrix.arch }}" = "amd64" ]; then
|
||||
PERL_VENDORARCH="/usr/lib/x86_64-linux-gnu/perl5/5.32"
|
||||
@ -108,18 +118,20 @@ jobs:
|
||||
package_extension: ${{ matrix.package_extension }}
|
||||
arch: ${{ matrix.arch }}
|
||||
commit_hash: ${{ github.sha }}
|
||||
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension}}-perl-net-curl-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
|
||||
release: 3
|
||||
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension }}-perl-net-curl-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
|
||||
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
|
||||
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
|
||||
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
|
||||
stability: ${{ needs.get-environment.outputs.stability }}
|
||||
|
||||
# set condition to true if artifacts are needed
|
||||
- if: ${{ false }}
|
||||
name: Upload package artifacts
|
||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
||||
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
||||
with:
|
||||
name: packages-${{ matrix.distrib }}-${{ matrix.arch }}
|
||||
path: ./*.${{ matrix.package_extension}}
|
||||
path: ./*.${{ matrix.package_extension }}
|
||||
retention-days: 1
|
||||
|
||||
deliver-rpm:
|
||||
@ -156,6 +168,10 @@ jobs:
|
||||
include:
|
||||
- distrib: bullseye
|
||||
arch: amd64
|
||||
- distrib: bookworm
|
||||
arch: amd64
|
||||
- distrib: jammy
|
||||
arch: amd64
|
||||
- distrib: bullseye
|
||||
arch: arm64
|
||||
|
||||
@ -187,6 +203,8 @@ jobs:
|
||||
arch: amd64
|
||||
- distrib: bullseye
|
||||
arch: amd64
|
||||
- distrib: bookworm
|
||||
arch: amd64
|
||||
- distrib: bullseye
|
||||
arch: arm64
|
||||
|
||||
|
43
.github/workflows/perl-openwsman.yml
vendored
43
.github/workflows/perl-openwsman.yml
vendored
@ -45,6 +45,18 @@ jobs:
|
||||
runner: ubuntu-22.04
|
||||
arch: amd64
|
||||
version: 2.7.2
|
||||
- image: packaging-plugins-bookworm
|
||||
distrib: bookworm
|
||||
package_extension: deb
|
||||
runner: ubuntu-22.04
|
||||
arch: amd64
|
||||
version: 2.7.2
|
||||
- image: packaging-plugins-jammy
|
||||
distrib: jammy
|
||||
package_extension: deb
|
||||
runner: ubuntu-22.04
|
||||
arch: amd64
|
||||
version: 2.7.2
|
||||
- image: packaging-plugins-bullseye-arm64
|
||||
distrib: bullseye
|
||||
package_extension: deb
|
||||
@ -68,7 +80,7 @@ jobs:
|
||||
|
||||
- name: Install locally sblim-sfcc
|
||||
run: |
|
||||
if [ "${{ matrix.distrib }}" = "bullseye" ]; then
|
||||
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
|
||||
apt-get update
|
||||
apt-get install -y libcurl4-openssl-dev
|
||||
cd /tmp
|
||||
@ -91,7 +103,7 @@ jobs:
|
||||
|
||||
- name: Build openwsman
|
||||
run: |
|
||||
if [ "${{ matrix.distrib }}" = "bullseye" ]; then
|
||||
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
|
||||
apt-get install -y cmake libssl-dev libpam-dev swig libxml2-dev
|
||||
else
|
||||
dnf install -y wget cmake gcc-c++ libcurl-devel pam-devel swig libxml2-devel openssl-devel
|
||||
@ -104,10 +116,11 @@ jobs:
|
||||
cd build
|
||||
cmake .. -DBUILD_PYTHON=No -DBUILD_PYTHON3=No -DBUILD_JAVA=No -DBUILD_RUBY=No -DBUILD_PERL=Yes
|
||||
make
|
||||
shell: bash
|
||||
|
||||
- name: Set package name and paths according to distrib
|
||||
run: |
|
||||
if [ "${{ matrix.distrib }}" = "bullseye" ]; then
|
||||
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
|
||||
NAME_PERL="libopenwsman-perl"
|
||||
USRLIB="/usr/lib/"
|
||||
if [ "${{ matrix.arch }}" = "amd64" ]; then
|
||||
@ -138,18 +151,20 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Package sblim-sfcc
|
||||
if: ${{ matrix.distrib == 'bullseye' }}
|
||||
if: ${{ matrix.package_extension == 'deb' }}
|
||||
uses: ./.github/actions/package-nfpm
|
||||
with:
|
||||
nfpm_file_pattern: "dependencies/perl-openwsman/sblim-sfcc.yaml"
|
||||
distrib: ${{ matrix.distrib }}
|
||||
package_extension: ${{ matrix.package_extension }}
|
||||
arch: ${{ matrix.arch }}
|
||||
release: 2
|
||||
commit_hash: ${{ github.sha }}
|
||||
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension}}-sblim-sfcc-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
|
||||
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension }}-sblim-sfcc-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
|
||||
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
|
||||
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
|
||||
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
|
||||
stability: ${{ needs.get-environment.outputs.stability }}
|
||||
|
||||
- name: Package libwsman
|
||||
uses: ./.github/actions/package-nfpm
|
||||
@ -158,11 +173,13 @@ jobs:
|
||||
distrib: ${{ matrix.distrib }}
|
||||
package_extension: ${{ matrix.package_extension }}
|
||||
arch: ${{ matrix.arch }}
|
||||
release: 4
|
||||
commit_hash: ${{ github.sha }}
|
||||
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension}}-libwsman-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
|
||||
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension }}-libwsman-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
|
||||
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
|
||||
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
|
||||
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
|
||||
stability: ${{ needs.get-environment.outputs.stability }}
|
||||
|
||||
- name: Package perl-openwsman
|
||||
uses: ./.github/actions/package-nfpm
|
||||
@ -171,16 +188,18 @@ jobs:
|
||||
distrib: ${{ matrix.distrib }}
|
||||
package_extension: ${{ matrix.package_extension }}
|
||||
arch: ${{ matrix.arch }}
|
||||
release: 4
|
||||
commit_hash: ${{ github.sha }}
|
||||
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension}}-perl-openwsman-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
|
||||
cache_key: cache-${{ github.sha }}-${{ matrix.package_extension }}-perl-openwsman-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }}
|
||||
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
|
||||
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
|
||||
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
|
||||
stability: ${{ needs.get-environment.outputs.stability }}
|
||||
|
||||
# set condition to true if artifacts are needed
|
||||
- if: ${{ false }}
|
||||
name: Upload package artifacts
|
||||
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
||||
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
||||
with:
|
||||
name: packages-${{ matrix.distrib }}-${{ matrix.arch }}
|
||||
path: ./*.${{ matrix.package_extension}}
|
||||
@ -229,6 +248,10 @@ jobs:
|
||||
include:
|
||||
- distrib: bullseye
|
||||
arch: amd64
|
||||
- distrib: bookworm
|
||||
arch: amd64
|
||||
- distrib: jammy
|
||||
arch: amd64
|
||||
- distrib: bullseye
|
||||
arch: arm64
|
||||
|
||||
@ -278,6 +301,8 @@ jobs:
|
||||
arch: amd64
|
||||
- distrib: bullseye
|
||||
arch: amd64
|
||||
- distrib: bookworm
|
||||
arch: amd64
|
||||
- distrib: bullseye
|
||||
arch: arm64
|
||||
|
||||
@ -286,7 +311,7 @@ jobs:
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- name: Promote sblim-sfcc ${{ matrix.distrib }} ${{ matrix.arch }} to stable
|
||||
if: ${{ matrix.distrib == 'bullseye' }}
|
||||
if: ${{ contains(fromJSON('["bullseye", "bookworm", "jammy"]'), matrix.distrib) }}
|
||||
uses: ./.github/actions/promote-to-stable
|
||||
with:
|
||||
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
|
||||
|
17
.github/workflows/perl-vmware-vsphere.yml
vendored
17
.github/workflows/perl-vmware-vsphere.yml
vendored
@ -39,7 +39,7 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Cache vsphere cli sources
|
||||
uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: vmware-vsphere-cli-distrib
|
||||
key: ${{ github.sha }}-${{ github.run_id }}-sources-perl-vmware-vsphere
|
||||
@ -47,6 +47,7 @@ jobs:
|
||||
package:
|
||||
needs:
|
||||
- get-sources
|
||||
- get-environment
|
||||
runs-on: ubuntu-22.04
|
||||
strategy:
|
||||
matrix:
|
||||
@ -60,6 +61,12 @@ jobs:
|
||||
- package_extension: deb
|
||||
image: packaging-plugins-bullseye
|
||||
distrib: bullseye
|
||||
- package_extension: deb
|
||||
image: packaging-plugins-bookworm
|
||||
distrib: bookworm
|
||||
- package_extension: deb
|
||||
image: packaging-plugins-jammy
|
||||
distrib: jammy
|
||||
|
||||
container:
|
||||
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
|
||||
@ -74,23 +81,25 @@ jobs:
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- name: Import source files
|
||||
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: vmware-vsphere-cli-distrib
|
||||
key: ${{ github.sha }}-${{ github.run_id }}-sources-perl-vmware-vsphere
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- name: Package
|
||||
uses: ./.github/actions/package
|
||||
uses: ./.github/actions/package-nfpm
|
||||
with:
|
||||
nfpm_file_pattern: "dependencies/perl-vmware-vsphere/packaging/perl-vmware-vsphere.yaml"
|
||||
distrib: ${{ matrix.distrib }}
|
||||
package_extension: ${{ matrix.package_extension }}
|
||||
commit_hash: ${{ github.sha }}
|
||||
release: ${{ needs.get-environment.outputs.release }}
|
||||
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }}
|
||||
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
|
||||
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
|
||||
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
|
||||
stability: ${{ needs.get-environment.outputs.stability }}
|
||||
|
||||
deliver-rpm:
|
||||
needs:
|
||||
@ -125,7 +134,7 @@ jobs:
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
distrib: [bullseye]
|
||||
distrib: [bullseye, bookworm, jammy]
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
|
8
.github/workflows/plink.yml
vendored
8
.github/workflows/plink.yml
vendored
@ -55,7 +55,7 @@ jobs:
|
||||
cp -r ~/rpmbuild/RPMS/x86_64/*.rpm .
|
||||
shell: bash
|
||||
|
||||
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
- uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./*.rpm
|
||||
key: unsigned-${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
|
||||
@ -86,7 +86,7 @@ jobs:
|
||||
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
- uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./*.rpm
|
||||
key: unsigned-${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
|
||||
@ -97,12 +97,12 @@ jobs:
|
||||
- run: rpmsign --addsign ./*.rpm
|
||||
shell: bash
|
||||
|
||||
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
- uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./*.rpm
|
||||
key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
|
||||
|
||||
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
||||
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
||||
with:
|
||||
name: packages-${{ matrix.distrib }}
|
||||
path: ./*.rpm
|
||||
|
4
.github/workflows/plugin-delivery.yml
vendored
4
.github/workflows/plugin-delivery.yml
vendored
@ -30,7 +30,7 @@ jobs:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
- uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./build/
|
||||
key: fatpacked-plugins-${{ github.sha }}-${{ github.run_id }}
|
||||
@ -96,7 +96,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
distrib: [bullseye]
|
||||
distrib: [bullseye, bookworm, jammy]
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
|
3
.github/workflows/plugins-selinux.yml
vendored
3
.github/workflows/plugins-selinux.yml
vendored
@ -55,7 +55,7 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Package
|
||||
uses: ./.github/actions/package
|
||||
uses: ./.github/actions/package-nfpm
|
||||
with:
|
||||
nfpm_file_pattern: "selinux/packaging/centreon-plugins-selinux.yaml"
|
||||
distrib: ${{ matrix.distrib }}
|
||||
@ -67,6 +67,7 @@ jobs:
|
||||
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
|
||||
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
|
||||
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
|
||||
stability: ${{ needs.get-environment.outputs.stability }}
|
||||
|
||||
deliver-rpm:
|
||||
needs: [get-environment, package]
|
||||
|
28
.github/workflows/plugins.yml
vendored
28
.github/workflows/plugins.yml
vendored
@ -33,7 +33,7 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
|
||||
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
|
||||
with:
|
||||
python-version: '3.9'
|
||||
|
||||
@ -93,7 +93,7 @@ jobs:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Prepare FatPacker
|
||||
uses: shogo82148/actions-setup-perl@v1
|
||||
uses: shogo82148/actions-setup-perl@ea0507898383e7dbce382138da0c21af1849eb9e # v1.27.0
|
||||
with:
|
||||
perl-version: '5.34'
|
||||
install-modules-with: cpm
|
||||
@ -104,7 +104,7 @@ jobs:
|
||||
COMMIT=$(git log -1 HEAD --pretty=format:%h)
|
||||
perl .github/scripts/plugins-source.container.pl "${{ needs.get-plugins.outputs.plugins }}" "${{ needs.get-environment.outputs.version }} ($COMMIT)"
|
||||
|
||||
- uses: actions/cache/save@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
- uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./build/
|
||||
key: fatpacked-plugins-${{ github.sha }}-${{ github.run_id }}
|
||||
@ -129,6 +129,12 @@ jobs:
|
||||
- package_extension: deb
|
||||
image: packaging-plugins-bullseye
|
||||
distrib: bullseye
|
||||
- package_extension: deb
|
||||
image: packaging-plugins-bookworm
|
||||
distrib: bookworm
|
||||
- package_extension: deb
|
||||
image: packaging-plugins-jammy
|
||||
distrib: jammy
|
||||
|
||||
container:
|
||||
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
|
||||
@ -141,13 +147,22 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
if: ${{ matrix.distrib == 'el7' }}
|
||||
uses: actions/checkout@v3 # el7 is not compatible with checkout v4 which uses node20
|
||||
# el7 is not compatible with checkout v4 which uses node20
|
||||
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
||||
|
||||
- name: Checkout sources
|
||||
if: ${{ matrix.distrib != 'el7' }}
|
||||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
- if: ${{ matrix.distrib == 'el7' }}
|
||||
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
|
||||
with:
|
||||
path: ./build/
|
||||
key: fatpacked-plugins-${{ github.sha }}-${{ github.run_id }}
|
||||
fail-on-cache-miss: true
|
||||
|
||||
- if: ${{ matrix.distrib != 'el7' }}
|
||||
uses: actions/cache/restore@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
|
||||
with:
|
||||
path: ./build/
|
||||
key: fatpacked-plugins-${{ github.sha }}-${{ github.run_id }}
|
||||
@ -213,7 +228,7 @@ jobs:
|
||||
done
|
||||
shell: bash
|
||||
|
||||
- uses: ./.github/actions/package
|
||||
- uses: ./.github/actions/package-nfpm
|
||||
with:
|
||||
nfpm_file_pattern: ".github/packaging/*.yaml"
|
||||
distrib: ${{ matrix.distrib }}
|
||||
@ -225,6 +240,7 @@ jobs:
|
||||
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
|
||||
rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }}
|
||||
rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }}
|
||||
stability: ${{ needs.get-environment.outputs.stability }}
|
||||
|
||||
deliver:
|
||||
needs: [get-environment, package]
|
||||
|
54
.github/workflows/spellchecker.yml
vendored
Normal file
54
.github/workflows/spellchecker.yml
vendored
Normal file
@ -0,0 +1,54 @@
|
||||
name: spell-checker
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/spellchecker.yml'
|
||||
- 'src/**'
|
||||
- '.github/scripts/pod_spell_check.t'
|
||||
|
||||
jobs:
|
||||
pod-spell-check:
|
||||
if: ${{ !contains(github.event.pull_request.labels.*.name, 'do-not-spellcheck') }}
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
||||
|
||||
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
|
||||
id: filter
|
||||
with:
|
||||
base: ${{ github.ref }}
|
||||
list-files: shell
|
||||
filters: |
|
||||
plugins:
|
||||
- added|modified: src/**
|
||||
|
||||
- name: Install CPAN Libraries
|
||||
uses: shogo82148/actions-setup-perl@ea0507898383e7dbce382138da0c21af1849eb9e # v1.27.0
|
||||
with:
|
||||
perl-version: '5.34'
|
||||
install-modules-with: cpm
|
||||
install-modules: Test::More Test::Spelling
|
||||
|
||||
- name: Install librairies
|
||||
continue-on-error: true
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y hunspell
|
||||
shell: bash
|
||||
|
||||
- name: Run spell check
|
||||
id: run_check
|
||||
run: |
|
||||
set +e
|
||||
for f in ${{ steps.filter.outputs.plugins_files }}; do
|
||||
echo "perl .github/scripts/pod_spell_check.t $f"
|
||||
output=$(perl .github/scripts/pod_spell_check.t $f)
|
||||
done
|
||||
shell: bash
|
13
.github/workflows/tests-functional.yml
vendored
13
.github/workflows/tests-functional.yml
vendored
@ -28,7 +28,7 @@ jobs:
|
||||
sudo apt-get install -qqy snmpsim
|
||||
|
||||
- name: Install Node.js
|
||||
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
|
||||
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
@ -36,7 +36,7 @@ jobs:
|
||||
run: npm install -g -D @mockoon/cli@3.1.0
|
||||
|
||||
- name: Install perl dependencies
|
||||
uses: shogo82148/actions-setup-perl@v1
|
||||
uses: shogo82148/actions-setup-perl@ea0507898383e7dbce382138da0c21af1849eb9e # v1.27.0
|
||||
with:
|
||||
perl-version: '5.34'
|
||||
install-modules-with: cpm
|
||||
@ -55,12 +55,14 @@ jobs:
|
||||
JSON::XS
|
||||
|
||||
- name: Install Python
|
||||
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
|
||||
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install Robot Framework
|
||||
run: pip3.11 install robotframework
|
||||
run: |
|
||||
pip3.11 install robotframework
|
||||
pip3.11 install RobotFramework-Examples
|
||||
shell: bash
|
||||
|
||||
- name: Run Robot Framework API tests
|
||||
@ -79,3 +81,6 @@ jobs:
|
||||
|
||||
- name: Run Robot Framework Database tests
|
||||
run: robot tests/functional/database
|
||||
|
||||
- name: Run Robot Framework Linux tests
|
||||
run: robot tests/functional/linux
|
||||
|
@ -3,7 +3,7 @@ arch: "${ARCH}"
|
||||
platform: "linux"
|
||||
version_schema: "none"
|
||||
version: "0.019"
|
||||
release: "2${DIST}"
|
||||
release: "${RELEASE}${DIST}"
|
||||
section: "default"
|
||||
priority: "optional"
|
||||
maintainer: "Centreon <contact@centreon.com>"
|
||||
|
@ -3,7 +3,7 @@ arch: "${ARCH}"
|
||||
platform: "linux"
|
||||
version_schema: "none"
|
||||
version: "@VERSION@"
|
||||
release: "2${DIST}"
|
||||
release: "${RELEASE}${DIST}"
|
||||
section: "default"
|
||||
priority: "optional"
|
||||
maintainer: "Centreon <contact@centreon.com>"
|
||||
|
@ -3,7 +3,7 @@ arch: "${ARCH}"
|
||||
platform: "linux"
|
||||
version_schema: "none"
|
||||
version: "0.8"
|
||||
release: "3${DIST}"
|
||||
release: "${RELEASE}${DIST}"
|
||||
section: "default"
|
||||
priority: "optional"
|
||||
maintainer: "Centreon <contact@centreon.com>"
|
||||
|
@ -3,7 +3,7 @@ arch: "${ARCH}"
|
||||
platform: "linux"
|
||||
version_schema: "none"
|
||||
version: "0.54"
|
||||
release: "2${DIST}"
|
||||
release: "${RELEASE}${DIST}"
|
||||
section: "default"
|
||||
priority: "optional"
|
||||
maintainer: "Centreon <contact@centreon.com>"
|
||||
|
2
dependencies/perl-openwsman/libwsman.yaml
vendored
2
dependencies/perl-openwsman/libwsman.yaml
vendored
@ -3,7 +3,7 @@ arch: "${ARCH}"
|
||||
platform: "linux"
|
||||
version_schema: "none"
|
||||
version: "@VERSION@"
|
||||
release: "1${DIST}"
|
||||
release: "${RELEASE}${DIST}"
|
||||
section: "default"
|
||||
priority: "optional"
|
||||
maintainer: "Centreon <contact@centreon.com>"
|
||||
|
@ -3,7 +3,7 @@ arch: "${ARCH}"
|
||||
platform: "linux"
|
||||
version_schema: "none"
|
||||
version: "@VERSION@"
|
||||
release: "3${DIST}"
|
||||
release: "${RELEASE}${DIST}"
|
||||
section: "default"
|
||||
priority: "optional"
|
||||
maintainer: "Centreon <contact@centreon.com>"
|
||||
|
2
dependencies/perl-openwsman/sblim-sfcc.yaml
vendored
2
dependencies/perl-openwsman/sblim-sfcc.yaml
vendored
@ -3,7 +3,7 @@ arch: "${ARCH}"
|
||||
platform: "linux"
|
||||
version_schema: "none"
|
||||
version: "2.7.2"
|
||||
release: "1${DIST}"
|
||||
release: "${RELEASE}${DIST}"
|
||||
section: "default"
|
||||
priority: "optional"
|
||||
maintainer: "Centreon <contact@centreon.com>"
|
||||
|
File diff suppressed because it is too large
Load Diff
1277
doc/en/developer/plugins_advanced.md
Normal file
1277
doc/en/developer/plugins_advanced.md
Normal file
File diff suppressed because it is too large
Load Diff
1075
doc/en/developer/plugins_global.md
Normal file
1075
doc/en/developer/plugins_global.md
Normal file
File diff suppressed because it is too large
Load Diff
1101
doc/en/developer/tutorial-api.md
Normal file
1101
doc/en/developer/tutorial-api.md
Normal file
File diff suppressed because it is too large
Load Diff
1
doc/en/developer/tutorial-service_discovery.md
Normal file
1
doc/en/developer/tutorial-service_discovery.md
Normal file
@ -0,0 +1 @@
|
||||
Coming soon
|
422
doc/en/developer/tutorial-snmp.md
Normal file
422
doc/en/developer/tutorial-snmp.md
Normal file
@ -0,0 +1,422 @@
|
||||
# SNMP plugin tutorial
|
||||
|
||||
All files showed in this section can be found on the centreon-plugins GitHub in
|
||||
the [tutorial](https://github.com/centreon/centreon-plugins/tree/develop/src/contrib/tutorial) **contrib**
|
||||
section.
|
||||
|
||||
> You have to move the contents of `contrib/tutorial/apps/` to `apps/` if you want to run it for testing purposes.
|
||||
>
|
||||
> `cp -R src/contrib/tutorial/network/* src/network/`
|
||||
|
||||
You also need to be able to use linux standard snmpwalk in your development environment.
|
||||
If you can't, you can use [this snmpwalk](https://github.com/centreon/centreon-plugins/blob/develop/tests/resources/snmp/os_linux_snmp_plugin.snmpwalk) coupled with snmpsim (in Docker for example)
|
||||
|
||||
**Description**
|
||||
|
||||
This example explains how to check a single SNMP oid value to check system CPUs.
|
||||
|
||||
## 1. Understand the data
|
||||
|
||||
Understanding the data is very important as it will drive the way you will design
|
||||
the **mode** internals. This is the **first thing to do**, no matter what protocol you
|
||||
are using.
|
||||
|
||||
There are several important properties for a piece of data:
|
||||
|
||||
- Type of the data to process: string, int... There is no limitation in the kind of data you can process
|
||||
- Dimensions of the data, is it **global** or linked to an **instance**?
|
||||
- Data layout, in other words anticipate the kind of **data structure** to manipulate.
|
||||
|
||||
Here we use a very simple example with only one oid value : `hrProcessorLoad` = `.1.3.6.1.2.1.25.3.3.1.2`
|
||||
If you use [this snmpwalk](https://github.com/centreon/centreon-plugins/blob/develop/tests/resources/snmp/os_linux_snmp_plugin.snmpwalk) you have this values :
|
||||
```
|
||||
.1.3.6.1.2.1.25.3.3.1.2.768 = INTEGER: 6
|
||||
.1.3.6.1.2.1.25.3.3.1.2.769 = INTEGER: 16
|
||||
```
|
||||
- the `cpu` node contains integer values (`6`, `16`) referring to specific **instances** (`768`, `769`). The structure is an array of hashes
|
||||
|
||||
## 2. Create directories for a new plugin
|
||||
|
||||
Create directories and files required for your **plugin** and **modes**.
|
||||
|
||||
Go to your centreon-plugins local git and create the appropriate directories and files:
|
||||
|
||||
```shell
|
||||
# path to the main directory and the subdirectory containing modes
|
||||
mkdir -p src/network/mysnmpplugin/snmp/mode
|
||||
# path to the main plugin file
|
||||
touch network/mysnmpplugin/snmp/plugin.pm
|
||||
# path to the specific mode(s) file(s) => for example appsmetrics.pm
|
||||
touch network/mysnmpplugin/snmp/mode/cpu.pm
|
||||
```
|
||||
|
||||
## 3. Create the plugin file : plugin.pm
|
||||
|
||||
Edit **plugin.pm** and add the following lines:
|
||||
|
||||
```perl
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Path to the plugin
|
||||
package network::mysnmpplugin::snmp::plugin;
|
||||
|
||||
# Needed libraries
|
||||
use strict;
|
||||
use warnings;
|
||||
# Use this library to check using SNMP protocol
|
||||
use base qw(centreon::plugins::script_snmp);
|
||||
```
|
||||
> **TIP** : Don't forget to edit 'Authors' line.
|
||||
|
||||
Add ```new``` method to instantiate the plugin:
|
||||
|
||||
```perl
|
||||
sub new {
|
||||
my ( $class, %options ) = @_;
|
||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
|
||||
bless $self, $class;
|
||||
# $options->{options} = options object
|
||||
|
||||
# Modes association
|
||||
$self->{modes} = {
|
||||
# Mode name => path to the mode
|
||||
'cpu' => 'network::mysnmpplugin::snmp::mode::cpu'
|
||||
};
|
||||
|
||||
return $self;
|
||||
}
|
||||
```
|
||||
Declare this plugin as a perl module:
|
||||
|
||||
```perl
|
||||
1;
|
||||
```
|
||||
Add a description to the plugin:
|
||||
|
||||
```perl
|
||||
__END__
|
||||
|
||||
=head1 PLUGIN DESCRIPTION
|
||||
|
||||
Check my-plugin-snmp CPU through SNMP.
|
||||
|
||||
=cut
|
||||
```
|
||||
> **TIP** : This description is printed with '--help' option.
|
||||
|
||||
To test if this plugin file works you can run this command:
|
||||
|
||||
`perl centreon_plugins.pl --plugin=apps::mysnmpplugin:::snmp::plugin --list-mode`
|
||||
|
||||
It already outputs a lot of things. Ellipsized lines are basically all standard capabilities
|
||||
inherited from the **script_custom** base.
|
||||
|
||||
```perl
|
||||
Plugin Description:
|
||||
Check CPU through SNMP.
|
||||
|
||||
Global Options:
|
||||
--mode Choose a mode.
|
||||
[...]
|
||||
--version
|
||||
Display plugin version.
|
||||
[...]
|
||||
|
||||
Modes Available:
|
||||
cpu
|
||||
|
||||
```
|
||||
|
||||
## 4. Create the mode file : cpu.pm
|
||||
|
||||
### 4.1 Common declarations and new constructor
|
||||
|
||||
Edit **cpu.pm** and add the following lines:
|
||||
|
||||
```perl
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
# service performance.
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Path to the plugin
|
||||
package network::mysnmpplugin::snmp::mode::cpu;
|
||||
|
||||
# Consider this as mandatory when writing a new mode.
|
||||
use base qw(centreon::plugins::templates::counter);
|
||||
|
||||
# Needed libraries
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
```
|
||||
|
||||
Add a `new` function (sub) to initialize the mode:
|
||||
|
||||
```perl
|
||||
sub new {
|
||||
my ($class, %options) = @_;
|
||||
# All options/properties of this mode, always add the force_new_perfdata => 1 to enable new metric/performance data naming.
|
||||
# It also where you can specify that the plugin uses a cache file for example
|
||||
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
|
||||
bless $self, $class;
|
||||
|
||||
# Declare options
|
||||
$options{options}->add_options(arguments => {
|
||||
# One the left it's the option name that will be used in the command line. The ':s' at the end is to
|
||||
# define that this options takes a value.
|
||||
# On the right, it's the code name for this option, optionnaly you can define a default value so the user
|
||||
# doesn't have to set it.
|
||||
# option name => variable name
|
||||
'filter-id:s' => { name => 'filter_id' }
|
||||
});
|
||||
|
||||
return $self;
|
||||
}
|
||||
```
|
||||
|
||||
### 4.2 Declare your counters
|
||||
|
||||
This part essentially maps the data you want to get from the SNMP with the internal
|
||||
counter mode structure.
|
||||
|
||||
Remember how we categorized the data in the previous section understand-the-data.
|
||||
|
||||
The `$self->{maps_counters_type}` data structure describes these data while the `$self->{maps_counters}->{global}` one defines
|
||||
their properties like thresholds and how they will be displayed to the users.
|
||||
|
||||
```perl
|
||||
sub set_counters {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
$self->{maps_counters_type} = [
|
||||
# cpu will receive value for both instances (768 and 769) : the type => 1 explicits that
|
||||
# You can define a callback (cb) function to manage the output prefix. This function is called
|
||||
# each time a value is passed to the counter and can be shared across multiple counters.
|
||||
{ name => 'cpu', type => 1, cb_prefix_output => 'prefix_cpu_output', message_multiple => 'All CPUs are ok' }
|
||||
];
|
||||
|
||||
$self->{maps_counters}->{cpu} = [
|
||||
{ label => 'cpu-usage-prct', nlabel => 'cpu.usage.percentage', set => {
|
||||
key_values => [ { name => 'cpu_usage' }, { name => 'name' } ],
|
||||
output_template => '%.2f %%',
|
||||
perfdatas => [
|
||||
# we add the label_extra_instance option to have one perfdata per instance
|
||||
{ label => 'cpu', template => '%.2f', min => 0, max => 100, unit => '%', label_extra_instance => 1, instance_use => 'name' }
|
||||
]
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
```
|
||||
|
||||
### 4.3 Create prefix callback functions
|
||||
|
||||
These functions are not mandatory but help to make the output more readable for a human. We will create
|
||||
it now but as you have noticed the mode compiles so you can choose to keep those for the polishing moment.
|
||||
|
||||
During counters definitions, we associated a callback function like this :
|
||||
- `cb_prefix_output => 'prefix_cpu_output'`
|
||||
|
||||
Define those function by adding it to our `cpu.pm` file. It is self-explanatory.
|
||||
|
||||
```perl
|
||||
sub prefix_cpu_output {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
return "CPU '" . $options{instance_value}->{name} . "' usage: ";
|
||||
}
|
||||
```
|
||||
|
||||
### 4.4 Get raw data from SNMP and understand the data structure
|
||||
|
||||
It's the moment to write the main sub (`manage_selection`) - the most complex, but also the one that
|
||||
will transform your mode to something useful and alive.
|
||||
|
||||
Think about the logic, what we have to do is:
|
||||
|
||||
- Query a specific path corresponding to a SNMP oid
|
||||
- Store and process the result
|
||||
- Spread this result across counters definitions
|
||||
|
||||
```perl
|
||||
sub manage_selection {
|
||||
my ($self, %options) = @_;
|
||||
###################################################
|
||||
##### Load SNMP informations to a result hash #####
|
||||
###################################################
|
||||
|
||||
# Select relevant oids for CPU monitoring
|
||||
my $mapping = {
|
||||
# hashKey => { oid => 'oid_number_path'}
|
||||
hrProcessorID => { oid => '.1.3.6.1.2.1.25.3.3.1.1' },
|
||||
hrProcessorLoad => { oid => '.1.3.6.1.2.1.25.3.3.1.2' }
|
||||
#
|
||||
};
|
||||
|
||||
# Point at the begining of the SNMP table
|
||||
# Oid to point the table ahead all the oids given in mapping
|
||||
my $oid_hrProcessorTable = '.1.3.6.1.2.1.25.3.3.1';
|
||||
|
||||
# Use SNMP Centreon plugins tools to push SNMP result in hash to handle with.
|
||||
my $cpu_result = $options{snmp}->get_table(
|
||||
oid => $oid_hrProcessorTable,
|
||||
nothing_quit => 1
|
||||
);
|
||||
|
||||
###################################################
|
||||
##### SNMP Result table to browse #####
|
||||
###################################################
|
||||
foreach my $oid (keys %{$cpu_result}) {
|
||||
next if ($oid !~ /^$mapping->{hrProcessorID}->{oid}\.(.*)$/);
|
||||
|
||||
# Catch table instance if exist :
|
||||
# Instance is a number availible for a same oid refering to different target
|
||||
my $instance = $1;
|
||||
# Uncomment the lines below to see what instance looks like :
|
||||
|
||||
# use Data::Dumper;
|
||||
# print Dumper($oid);
|
||||
# print Dumper($instance);
|
||||
|
||||
# Data Dumper returns : with oid = hrProcessorID.instance
|
||||
# $VAR1 = '.1.3.6.1.2.1.25.3.3.1.1.769';
|
||||
# $VAR1 = '769';
|
||||
# $VAR1 = '.1.3.6.1.2.1.25.3.3.1.1.768';
|
||||
# $VAR1 = '768';
|
||||
|
||||
my $result = $options{snmp}->map_instance(mapping => $mapping, results => $cpu_result, instance => $instance);
|
||||
|
||||
# Here is the way to handle with basic name/id filter.
|
||||
# This filter is compare with hrProcessorID and in case of no match the oid is skipped
|
||||
if (defined($self->{option_results}->{filter_id}) && $self->{option_results}->{filter_id} ne '' &&
|
||||
$result->{hrProcessorID} !~ /$self->{option_results}->{filter_id}/) {
|
||||
$self->{output}->output_add(long_msg => "skipping '" . $result->{hrProcessorID} . "': no matching filter.", debug => 1);
|
||||
next;
|
||||
}
|
||||
|
||||
# If the oid is not skipped above, here is convert the target values in result hash.
|
||||
# Here is where the counter magic happens.
|
||||
# $self->{cpu} is your counter definition (see $self->{maps_counters}->{<name>})
|
||||
# Here, we map the obtained string $result->{hrProcessorLoad} with the cpu_usage key_value in the counter.
|
||||
$self->{cpu}->{$instance} = {
|
||||
name => $result->{hrProcessorID},
|
||||
cpu_usage => $result->{hrProcessorLoad}
|
||||
};
|
||||
}
|
||||
|
||||
# IMPORTANT !
|
||||
# If you use a way to filter the values set in result hash,
|
||||
# check if at the end of parsing the result table isn't empty.
|
||||
# If it's the case, add a message for user to explain the filter doesn't match.
|
||||
if (scalar(keys %{$self->{cpu}}) <= 0) {
|
||||
$self->{output}->add_option_msg(short_msg => "No processor ID matching with filter found.");
|
||||
$self->{output}->option_exit();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Declare this plugin as a perl module:
|
||||
|
||||
```perl
|
||||
1;
|
||||
```
|
||||
|
||||
Execute this command (`--verbose` will display the long output and the details for each `type => 1` counters).
|
||||
This command is based on use Docker SNMPSIM to simulate snmpwalk behavior (hostname, snmp-community and snmp-port).
|
||||
|
||||
```shell
|
||||
perl centreon_plugins.pl --plugin=network::mysnmpplugin::snmp::plugin --mode=cpu --hostname=localhost --snmp-community=local/os_linux_snmp_plugin --snmp-port=2024 --verbose
|
||||
```
|
||||
|
||||
Here is the expected output:
|
||||
|
||||
```shell
|
||||
OK: All CPUs are ok | '.0.0#cpu.usage.percentage'=6.00%;;;0;100 '.0.0#cpu.usage.percentage'=16.00%;;;0;100
|
||||
CPU '.0.0' usage: 6.00 %
|
||||
CPU '.0.0' usage: 16.00 %
|
||||
```
|
||||
|
||||
### 4.5 Help section and assistant to build your centreon objects
|
||||
|
||||
Last but not least, you need to write a help section to explain users what your mode is
|
||||
doing and what options they can use.
|
||||
|
||||
The centreon-plugins framework has a built-in assistant to help you with the list of counters
|
||||
and options.
|
||||
|
||||
Run this command to obtain a summary that will simplify the work of creating Centreon commands and write
|
||||
the mode's help:
|
||||
|
||||
```shell
|
||||
perl centreon_plugins.pl --plugin=network::mysnmpplugin::snmp::plugin --mode=cpu --hostname='anyvalue' --list-counters --verbose
|
||||
```
|
||||
|
||||
Get information from its output (shown below) to start building your mode's help:
|
||||
|
||||
```shell
|
||||
counter list: cpu-usage-prct
|
||||
configuration: --warning-cpu-usage-prct='$_SERVICEWARNINGCPUUSAGEPRCT$' --critical-cpu-usage-prct='$_SERVICECRITICALCPUUSAGEPRCT$'
|
||||
```
|
||||
|
||||
Here is how you can write the help, note that this time you will add the content after the `1;` and add the same
|
||||
`__END__` instruction like you did in the `plugin.pm` file.
|
||||
|
||||
```perl
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
|
||||
Check system CPUs.
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--filter-id>
|
||||
|
||||
Filter on one ID name.
|
||||
|
||||
=item B<--warning>
|
||||
|
||||
Warning threshold for CPU.
|
||||
|
||||
=item B<--critical>
|
||||
|
||||
Critical threshold for CPU.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
```
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"dependencies": [
|
||||
"libopenwsman-perl",
|
||||
"libjson-perl",
|
||||
"libdatetime-perl"
|
||||
]
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
{
|
||||
"pkg_name": "centreon-plugin-Applications-Backup-Veeam-Wsman",
|
||||
"pkg_summary": "Centreon Plugin",
|
||||
"plugin_name": "centreon_veeam_backup_wsman.pl",
|
||||
"files": [
|
||||
"centreon/plugins/script_wsman.pm",
|
||||
"centreon/plugins/wsman.pm",
|
||||
"apps/backup/veeam/wsman/",
|
||||
"centreon/common/powershell/functions.pm",
|
||||
"centreon/common/powershell/veeam/"
|
||||
]
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"dependencies": [
|
||||
"perl(openwsman)",
|
||||
"perl(JSON::XS)",
|
||||
"perl(POSIX)"
|
||||
]
|
||||
}
|
@ -10,6 +10,7 @@
|
||||
"snmp_standard/mode/memory.pm",
|
||||
"snmp_standard/mode/loadaverage.pm",
|
||||
"snmp_standard/mode/storage.pm",
|
||||
"snmp_standard/mode/uptime.pm",
|
||||
"storage/synology/snmp/"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"dependencies": [
|
||||
"libsnmp-perl"
|
||||
]
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
"pkg_name": "centreon-plugin-Hardware-Ups-Inmatics-Sputnik-Snmp",
|
||||
"pkg_summary": "Centreon Plugin - Hardware UPS Inmatics PSU Sputnik SNMP",
|
||||
"plugin_name": "centreon_ups_sputnik_snmp.pl",
|
||||
"files": [
|
||||
"centreon/plugins/script_snmp.pm",
|
||||
"centreon/plugins/snmp.pm",
|
||||
"hardware/ups/standard/rfc1628/snmp/",
|
||||
"hardware/ups/inmatics/sputnik/snmp/"
|
||||
]
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"dependencies": [
|
||||
"perl(SNMP)"
|
||||
]
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"dependencies": [
|
||||
"libemail-sender-perl",
|
||||
"libemail-mime-perl"
|
||||
"libemail-mime-perl",
|
||||
"libhtml-template-perl"
|
||||
]
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
"dependencies": [
|
||||
"perl(Email::MIME)",
|
||||
"perl(Email::Simple)",
|
||||
"perl(Email::Sender)"
|
||||
"perl(Email::Sender)",
|
||||
"perl(HTML::Template)"
|
||||
]
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"dependencies": [
|
||||
"libjson-perl",
|
||||
"zmq-libzmq4-perl",
|
||||
"libzmq-libzmq4-perl",
|
||||
"libuuid-perl"
|
||||
]
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright 2023 Centreon (http://www.centreon.com/)
|
||||
# Copyright 2024 Centreon (http://www.centreon.com/)
|
||||
#
|
||||
# Centreon is a full-fledged industry-strength solution that meets
|
||||
# the needs in IT infrastructure and application monitoring for
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user