Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Release 20241205 #5314

Merged
merged 30 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
08695b6
Sync Release 20241107 (#5280)
pkippes Nov 7, 2024
77237f9
test(various): split old automated tests (#5229)
sfarouq-ext Nov 8, 2024
63b3054
feat(vmware8-esx): new plugin to monitor ESX status using vSphere 8 A…
omercier Nov 8, 2024
aa785f3
enh(ci): promote testing packages (#5284)
kduret Nov 14, 2024
71eb474
fix(ci): add new outputs to parse-distrib action (#5285)
kduret Nov 14, 2024
80b7a4e
fix(packaging): do not package rpm for perl dependency common::sense …
kduret Nov 14, 2024
9443665
fix(ci): fix jfrog rpm upload command (#5286)
kduret Nov 15, 2024
0bad27b
fix(packaging): do not package cpan libraries already available (#5288)
kduret Nov 15, 2024
b42a281
fix(ci): upload each package once (#5289)
kduret Nov 15, 2024
9cee927
fix(azure-elasticpool): the thresholds weren't applied correctly in s…
omercier Nov 22, 2024
d73866a
fix(tests): change the way test-all-plugins.py identifies the directo…
YanMeddour Nov 25, 2024
1f9e3b4
fix(packaging): various issues + migration to JSON config file (#5291)
omercier Nov 28, 2024
eba027e
feat(nokia-timos-snmp): new sas alarm mode (#5274 #5083)
sfarouq-ext Nov 28, 2024
2a81f01
feat(jmeter) - package jmeter connector (#5298)
sdepassio Nov 29, 2024
69144e3
fix(commvault-storagepools): avoid division by 0 (#5305, #5141)
omercier Nov 29, 2024
4c42e04
fix(linux-local): limit column size to avoid filter issues (#5303)
omercier Nov 29, 2024
7c63a1a
feat(ci): add gorgone dependency in unit tests docker image (#5295)
Evan-Adam Dec 2, 2024
24caa22
feat(skyhigh-webgateway): new snmp plugin forked from McAfee plugin (…
lucie-dubrunfaut Dec 3, 2024
b0e103a
fix(ci): deliver plugins in rpm-plugins and apt-plugins (#5310)
kduret Dec 3, 2024
bbbee4b
enh(keysight-nvos): enhance ports mode and add license mode (#5304)
lucie-dubrunfaut Dec 3, 2024
056589f
enh(hp-procurve-snmp): new stack mode stack (#5306 #5082)
lucie-dubrunfaut Dec 3, 2024
4753f29
ci(slack-notification): new package for an existing plugin (#5312)
lucie-dubrunfaut Dec 5, 2024
651095a
enh(passwordmgr-centreonvault): adapt vault module for plugins to the…
omercier Dec 5, 2024
55409b7
feat(appeartv) - package AppearTV connector (#5313)
sdepassio Dec 5, 2024
61ea714
fix(ci): fix delivery path of rpm plugins
kduret Dec 5, 2024
508b231
fix(ci): fix release_type check in delivery action (#5315)
kduret Dec 5, 2024
15bc166
fix(ci): fix delivery condition (#5316)
kduret Dec 5, 2024
3227104
fix(ci): remove secrets usage in delivery action
kduret Dec 5, 2024
adf172c
fix(ci): limit api rate usage
kduret Dec 5, 2024
967acbd
fix(ci): set version for net-mqtt-simple (#5320)
sdepassio Dec 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
* @centreon/owners-connectors
* @centreon/owners-connectors

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

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

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

*.py @centreon/owners-python
*.py @centreon/owners-python

*.sh @centreon/owners-bash
*.sh @centreon/owners-bash

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

.github/** @centreon/owners-pipelines
packaging/** @centreon/owners-pipelines
selinux/** @centreon/owners-pipelines
.github/** @centreon/owners-pipelines
packaging/** @centreon/owners-perl
selinux/** @centreon/owners-pipelines
.github/scripts/pod_spell_check.t @centreon/owners-perl
49 changes: 0 additions & 49 deletions .github/actions/deb-delivery-legacy/action.yml

This file was deleted.

60 changes: 0 additions & 60 deletions .github/actions/deb-delivery/action.yml

This file was deleted.

200 changes: 200 additions & 0 deletions .github/actions/package-delivery/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
name: "package-delivery"
description: "Deliver packages"
inputs:
module_name:
description: "The package module name"
required: true
distrib:
description: "The distribution used for packaging"
required: true
arch:
description: "The target distribution architecture"
required: false
cache_key:
description: "The cached package key"
required: true
stability:
description: "The package stability (stable, testing, unstable)"
required: true
release_type:
description: "Type of release (hotfix, release)"
required: true
artifactory_token:
description: "token for artifactory"
required: true

runs:
using: "composite"
steps:
- name: Validate inputs
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
if ('${{ inputs.module_name }}' === '') {
throw new Error('module_name input must be defined');
}

if (! ['stable', 'testing', 'unstable'].includes('${{ inputs.stability }}')) {
throw new Error(`Stability ${{ inputs.stability }} should not deliver packages`);
}

if ('${{ inputs.stability }}' === 'testing' && ! ['release', 'hotfix'].includes('${{ inputs.release_type }}')) {
throw new Error('release_type input must be defined when stability is testing');
}

- name: Parse distrib name
id: parse-distrib
uses: ./.github/actions/parse-distrib
with:
distrib: ${{ inputs.distrib }}

- name: Get repository stability path
id: get_repository_stability_path
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
let stabilitySubdirectory = '${{ inputs.stability }}';

if ('${{ inputs.stability }}' === 'testing' && '${{ inputs.release_type }}' === 'hotfix') {
stabilitySubdirectory = '${{ inputs.stability }}-${{ inputs.release_type }}';
}

let repositoryStabilityPath = '';
if ('${{ steps.parse-distrib.outputs.distrib_family }}' === 'el') {
repositoryStabilityPath = `rpm-plugins/${{ inputs.distrib }}/${stabilitySubdirectory}`;
} else if ('${{ steps.parse-distrib.outputs.distrib_family }}' === 'ubuntu') {
repositoryStabilityPath = `ubuntu-plugins-${{ inputs.stability }}`;
} else if ('${{ steps.parse-distrib.outputs.distrib_family }}' === 'debian') {
repositoryStabilityPath = `apt-plugins-${{ inputs.stability }}`;
} else {
throw new Error(`Repository cannot be find for distribution: ${{ inputs.distrib }}`);
}

core.setOutput(
'repository_stability_path',
repositoryStabilityPath,
);

- if: ${{ inputs.stability != 'stable' }}
name: Restore packages from cache
uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: ./*.${{ steps.parse-distrib.outputs.package_extension }}
key: ${{ inputs.cache_key }}
fail-on-cache-miss: true

- uses: jfrog/setup-jfrog-cli@9fe0f98bd45b19e6e931d457f4e98f8f84461fb5 # v4.4.1
with:
disable-job-summary: true
disable-auto-build-publish: true
env:
JF_URL: https://centreon.jfrog.io
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}

- if: ${{ inputs.stability == 'testing' }}
name: Clean existing testing packages
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
if ('${{ steps.parse-distrib.outputs.distrib_family }}' === 'el') {
await exec.exec(
`jf rt del "${{ steps.get_repository_stability_path.outputs.repository_stability_path }}/*/${{ inputs.module_name }}/*.rpm" --exclusions "*/RPMS/*" --quiet`
);
} else if ('${{ steps.parse-distrib.outputs.package_extension }}' === 'deb') {
await exec.exec(
`jf rt del "${{ steps.get_repository_stability_path.outputs.repository_stability_path }}/pool/${{ inputs.module_name }}/*${{ steps.parse-distrib.outputs.package_distrib_name }}*.deb" --quiet --props "release_type=${{ inputs.release_type }}"`
);
}

- name: Download packages from testing
if: ${{ inputs.stability == 'stable' && github.event_name == 'push' && inputs.distrib != 'jammy' }}
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const warningNoPromote = 'No packages are promoted because push is not related to a hotfix/release pull request.';
const commitSha = context.sha;

const pulls = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
sort: 'updated',
direction: 'desc',
state: 'closed',
per_page: 100
});

const pr = pulls.data.find(p => p.merge_commit_sha === commitSha);
if (!pr) {
core.warning(warningNoPromote);
return;
}

const prBaseRef = pr?.base?.ref || 'unknown';
let releaseType = '';
switch (true) {
case /^release.+/.test(prBaseRef):
releaseType = 'release';
break;
case /^hotfix.+/.test(prBaseRef):
releaseType = 'hotfix';
break;
default:
core.warning(warningNoPromote);
return;
}

let fromStabilitySubdirectory = 'testing';
if (releaseType === 'hotfix' ) {
fromStabilitySubdirectory = `testing-${releaseType}`;
}

if ('${{ steps.parse-distrib.outputs.distrib_family }}' === 'el') {
await exec.exec(
`jf rt download "rpm-plugins/${{ inputs.distrib }}/${fromStabilitySubdirectory}/*/${{ inputs.module_name }}/*.rpm" --flat`
);
} else if ('${{ steps.parse-distrib.outputs.distrib_family }}' === 'ubuntu') {
await exec.exec(
`jf rt download "ubuntu-plugins-testing/pool/${{ inputs.module_name }}/*${{ steps.parse-distrib.outputs.package_distrib_name }}*.deb" --props "release_type=${{ inputs.release_type }}" --flat`
);
} else if ('${{ steps.parse-distrib.outputs.distrib_family }}' === 'debian') {
await exec.exec(
`jf rt download "apt-plugins-testing/pool/${{ inputs.module_name }}/*${{ steps.parse-distrib.outputs.package_distrib_name }}*.deb" --props "release_type=${{ inputs.release_type }}" --flat`
);
}

- name: Publish packages to ${{ inputs.stability }}
if: |
contains(fromJson('["testing", "unstable"]'), inputs.stability) ||
(inputs.stability == 'stable' && github.event_name == 'push' && inputs.distrib != 'jammy')
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const path = require('path');
const globber = await glob.create('*.${{ steps.parse-distrib.outputs.package_extension }}');

const debTargetProps = '${{ inputs.stability }}' == 'testing' ? '--target-props "release_type=${{ inputs.release_type }}"' : '';

for await (const file of globber.globGenerator()) {
const fileName = path.basename(file);

if ('${{ steps.parse-distrib.outputs.package_extension }}' === 'rpm') {
let arch = 'noarch';
if (/x86_64/.test(fileName)) {
arch = 'x86_64';
}
await exec.exec(
`jf rt upload "${fileName}" "${{ steps.get_repository_stability_path.outputs.repository_stability_path }}/${arch}/${{ inputs.module_name }}/" --flat`
);
} else if ('${{ steps.parse-distrib.outputs.package_extension }}' === 'deb') {
let arch = 'all';
const matches = fileName.match(/_([^_]+)\.deb/);
if (matches !== null && matches.length > 1) {
arch = matches[1];
}
if ('${{ inputs.arch }}' === '' || '${{ inputs.arch }}' === arch) {
await exec.exec(
`jf rt upload "${fileName}" "${{ steps.get_repository_stability_path.outputs.repository_stability_path }}/pool/${{ inputs.module_name }}/" --deb "${{ inputs.distrib }}/main/${arch}" ${debTargetProps} --flat`
);
}
}
}
15 changes: 1 addition & 14 deletions .github/actions/package-nfpm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ runs:
using: composite

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

- name: Parse distrib name
id: parse-distrib
uses: ./.github/actions/parse-distrib
Expand Down Expand Up @@ -128,14 +122,7 @@ runs:
done
shell: bash

- 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
- uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
path: ./*.${{ inputs.package_extension }}
key: ${{ inputs.cache_key }}
Expand Down
Loading
Loading