fix(ci): fix installation path of perl libraries (#4913)

Refs: MON-35359
This commit is contained in:
Kevin Duret 2024-02-15 15:42:53 +01:00 committed by GitHub
parent 6c87ae6cdd
commit 098e8bfe40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
27 changed files with 242 additions and 158 deletions

View File

@ -30,7 +30,7 @@ runs:
key: ${{ inputs.cache_key }}
fail-on-cache-miss: true
- uses: jfrog/setup-jfrog-cli@901bb9632db90821c2d3f076012bdeaf66598555 # v3.4.1
- uses: jfrog/setup-jfrog-cli@26da2259ee7690e63b5410d7451b2938d08ce1f9 # v4.0.0
env:
JF_URL: https://centreon.jfrog.io
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}

View File

@ -34,7 +34,7 @@ runs:
fail-on-cache-miss: true
- if: ${{ ! (inputs.distrib == 'jammy' && inputs.stability == 'stable') }}
uses: jfrog/setup-jfrog-cli@901bb9632db90821c2d3f076012bdeaf66598555 # v3.4.1
uses: jfrog/setup-jfrog-cli@26da2259ee7690e63b5410d7451b2938d08ce1f9 # v4.0.0
env:
JF_URL: https://centreon.jfrog.io
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}

View File

@ -17,7 +17,7 @@ inputs:
runs:
using: "composite"
steps:
- uses: jfrog/setup-jfrog-cli@901bb9632db90821c2d3f076012bdeaf66598555 # v3.4.1
- uses: jfrog/setup-jfrog-cli@26da2259ee7690e63b5410d7451b2938d08ce1f9 # v4.0.0
env:
JF_URL: https://centreon.jfrog.io
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}

View File

@ -30,7 +30,7 @@ runs:
key: ${{ inputs.cache_key }}
fail-on-cache-miss: true
- uses: jfrog/setup-jfrog-cli@901bb9632db90821c2d3f076012bdeaf66598555 # v3.4.1
- uses: jfrog/setup-jfrog-cli@26da2259ee7690e63b5410d7451b2938d08ce1f9 # v4.0.0
env:
JF_URL: https://centreon.jfrog.io
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}

View File

@ -31,7 +31,7 @@ runs:
key: ${{ inputs.cache_key }}
fail-on-cache-miss: true
- uses: jfrog/setup-jfrog-cli@901bb9632db90821c2d3f076012bdeaf66598555 # v3.4.1
- uses: jfrog/setup-jfrog-cli@26da2259ee7690e63b5410d7451b2938d08ce1f9 # v4.0.0
env:
JF_URL: https://centreon.jfrog.io
JF_ACCESS_TOKEN: ${{ inputs.artifactory_token }}

View File

@ -1,39 +0,0 @@
name: run-in-docker
description: Run step in docker container
inputs:
script_name:
description: "script_name"
required: true
image_name:
description: "image_name"
required: true
image_version:
description: "image_version"
required: true
centreon_pat:
description: "Secret"
required: false
registry_url:
description: Docker registry url
required: true
registry_username:
description: Docker registry username
required: true
registry_password:
description: Docker registry password
required: true
params:
description: "params for script"
required: false
runs:
using: "composite"
steps:
- name: Login to Registry (via runner)
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2.2.0
with:
registry: ${{ inputs.registry_url }}
username: ${{ inputs.registry_username }}
password: ${{ inputs.registry_password }}
- run: docker run -i -e TOKEN=${{ inputs.centreon_pat }} --entrypoint /src/.github/scripts/${{ inputs.script_name }}.sh -v "$PWD:/src" ${{ inputs.registry_url }}/${{ inputs.image_name }}:${{ inputs.image_version }} ${{ inputs.params }}
shell: bash

View File

@ -25,8 +25,8 @@ jobs:
version_file: connectors/vmware/src/centreon/script/centreon_vmware.pm
package:
needs:
- get-environment
needs: [get-environment]
if: ${{ needs.get-environment.outputs.stability != 'stable' }}
runs-on: ubuntu-22.04
strategy:
matrix:
@ -66,7 +66,7 @@ jobs:
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
version: ${{ needs.get-environment.outputs.version }}
release: ${{ needs.get-environment.outputs.release }}
release: 1
commit_hash: ${{ github.sha }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }}
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}
@ -75,10 +75,8 @@ jobs:
stability: ${{ needs.get-environment.outputs.stability }}
deliver-rpm:
needs:
- get-environment
- package
if: ${{ contains(fromJson('["stable", "testing", "unstable"]'), needs.get-environment.outputs.stability) }}
needs: [get-environment, package]
if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }}
runs-on: [self-hosted, common]
strategy:
@ -99,10 +97,8 @@ jobs:
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
deliver-deb:
needs:
- get-environment
- package
if: ${{ contains(fromJson('["stable", "testing", "unstable"]'), needs.get-environment.outputs.stability) }}
needs: [get-environment, package]
if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }}
runs-on: [self-hosted, common]
strategy:
@ -121,3 +117,23 @@ jobs:
cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }}
stability: ${{ needs.get-environment.outputs.stability }}
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
promote:
needs: [get-environment]
if: ${{ contains(fromJson('["stable"]'), needs.get-environment.outputs.stability) }}
runs-on: [self-hosted, common]
strategy:
matrix:
distrib: [el8, el9, bullseye, bookworm]
steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Promote ${{ matrix.distrib }} to stable
uses: ./.github/actions/promote-to-stable
with:
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
module: connector-vmware
distrib: ${{ matrix.distrib }}
stability: ${{ needs.get-environment.outputs.stability }}

View File

@ -26,6 +26,7 @@ jobs:
package:
needs: [get-environment]
if: ${{ needs.get-environment.outputs.stability != 'stable' }}
strategy:
fail-fast: false
@ -85,24 +86,28 @@ jobs:
dnf install -y cpanminus gcc
fi
cpanm -v -l /tmp Crypt::Argon2@0.019
cpanm -v -l /tmp Crypt::Argon2@0.020
shell: bash
- name: Set package name and paths according to distrib
run: |
PERL_VERSION=$(perl -E "say $^V" | sed -E "s/v([0-9]+\.[0-9]+).+/\1/g")
echo "Perl version is $PERL_VERSION"
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"
PERL_VENDORARCH="/usr/lib/x86_64-linux-gnu/perl/$PERL_VERSION"
else
PERL_VENDORARCH="/usr/lib/aarch64-linux-gnu/perl5/5.32"
PERL_VENDORARCH="/usr/lib/aarch64-linux-gnu/perl/$PERL_VERSION"
fi
else
NAME="perl-Crypt-Argon2"
if [ "${{ matrix.distrib }}" = "el8" ]; then
PERL_VENDORARCH="/usr/local/lib64/perl5"
else
PERL_VENDORARCH="/usr/local/lib64/perl5/5.32"
PERL_VENDORARCH="/usr/local/lib64/perl5/$PERL_VERSION"
fi
fi
@ -119,7 +124,7 @@ jobs:
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
arch: ${{ matrix.arch }}
release: 3
release: 1
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 }}
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}

View File

@ -118,6 +118,10 @@ jobs:
include:
- image: packaging-plugins-bullseye
distrib: bullseye
- image: packaging-plugins-bookworm
distrib: bookworm
- image: packaging-plugins-jammy
distrib: jammy
name: package ${{ matrix.distrib }}
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest
@ -135,7 +139,7 @@ jobs:
mv dependencies/perl-filesys-smbclient/src/ perl-filesys-smbclient
tar czf perl-filesys-smbclient.tar.gz perl-filesys-smbclient
DEB_BUILD_OPTIONS="nocheck nodocs notest noautodbgsym" dh-make-perl make --verbose --build --version 4.0-${{ matrix.distrib }} perl-filesys-smbclient/
DEB_BUILD_OPTIONS="nocheck nodocs notest noautodbgsym" dh-make-perl make --dist ${{ matrix.distrib }} --verbose --build --version 4.0-${{ matrix.distrib }} perl-filesys-smbclient/
shell: bash
- uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
@ -172,7 +176,7 @@ jobs:
strategy:
matrix:
distrib: [bullseye]
distrib: [bullseye, bookworm, jammy]
steps:
- name: Checkout sources
@ -193,7 +197,7 @@ jobs:
runs-on: [self-hosted, common]
strategy:
matrix:
distrib: [el8, el9, bullseye]
distrib: [el8, el9, bullseye, bookworm]
steps:
- name: Checkout sources

View File

@ -24,6 +24,7 @@ jobs:
package:
needs: [get-environment]
if: ${{ needs.get-environment.outputs.stability != 'stable' }}
strategy:
fail-fast: false
@ -78,6 +79,11 @@ jobs:
- name: Set package name and paths according to distrib
run: |
VERSION="1.0.4"
PERL_VERSION=$(perl -E "say $^V" | sed -E "s/v([0-9]+\.[0-9]+).+/\1/g")
echo "Perl version is $PERL_VERSION"
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
NAME="libjson-path-perl"
PERL_VENDORLIB="/usr/share/perl5"
@ -87,7 +93,7 @@ jobs:
VERSION="0.5" # https://github.com/centreon/centreon-plugins/issues/4540
PERL_VENDORLIB="/usr/local/share/perl5"
else
PERL_VENDORLIB="/usr/local/share/perl5/5.32"
PERL_VENDORLIB="/usr/local/share/perl5/$PERL_VERSION"
fi
fi
@ -153,7 +159,7 @@ jobs:
strategy:
matrix:
distrib: [bullseye, bookworm]
distrib: [bullseye, bookworm, jammy]
name: Deliver ${{ matrix.distrib }}
@ -176,7 +182,7 @@ jobs:
runs-on: [self-hosted, common]
strategy:
matrix:
distrib: [bullseye, bookworm]
distrib: [el8, el9, bullseye, bookworm]
steps:
- name: Checkout sources

View File

@ -79,6 +79,10 @@ jobs:
- name: Set package name and paths according to distrib
run: |
PERL_VERSION=$(perl -E "say $^V" | sed -E "s/v([0-9]+\.[0-9]+).+/\1/g")
echo "Perl version is $PERL_VERSION"
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
NAME="libkeepass-reader-perl"
PERL_VENDORLIB="/usr/share/perl5"
@ -87,7 +91,7 @@ jobs:
if [[ "${{ matrix.distrib }}" == "el8" ]]; then
PERL_VENDORLIB="/usr/local/share/perl5"
else
PERL_VENDORLIB="/usr/local/share/perl5/5.32"
PERL_VENDORLIB="/usr/local/share/perl5/$PERL_VERSION"
fi
fi
@ -104,7 +108,7 @@ jobs:
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
version: "0.2"
release: "2"
release: "3"
arch: all
commit_hash: ${{ github.sha }}
cache_key: cache-${{ github.run_id }}-${{ matrix.package_extension }}-${{ env.module_name }}-${{ matrix.distrib }}

View File

@ -24,6 +24,7 @@ jobs:
package:
needs: [get-environment]
if: ${{ needs.get-environment.outputs.stability != 'stable' }}
strategy:
fail-fast: false
@ -88,19 +89,23 @@ jobs:
- name: Set package name and paths according to distrib
run: |
PERL_VERSION=$(perl -E "say $^V" | sed -E "s/v([0-9]+\.[0-9]+).+/\1/g")
echo "Perl version is $PERL_VERSION"
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"
PERL_VENDORARCH="/usr/lib/x86_64-linux-gnu/perl/$PERL_VERSION"
else
PERL_VENDORARCH="/usr/lib/aarch64-linux-gnu/perl5/5.32"
PERL_VENDORARCH="/usr/lib/aarch64-linux-gnu/perl/$PERL_VERSION"
fi
else
NAME="perl-Libssh-Session"
if [ "${{ matrix.distrib }}" = "el8" ]; then
PERL_VENDORARCH="/usr/local/lib64/perl5"
else
PERL_VENDORARCH="/usr/local/lib64/perl5/5.32"
PERL_VENDORARCH="/usr/local/lib64/perl5/$PERL_VERSION"
fi
fi
@ -117,7 +122,7 @@ jobs:
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
arch: ${{ matrix.arch }}
release: 4
release: 5
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 }}
rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }}

View File

@ -24,6 +24,7 @@ jobs:
package:
needs: [get-environment]
if: ${{ needs.get-environment.outputs.stability != 'stable' }}
strategy:
fail-fast: false
@ -83,24 +84,28 @@ jobs:
dnf install -y libcurl-devel cpanminus gcc
fi
cpanm -v -l /tmp Net::Curl@0.54
cpanm -v -l /tmp Net::Curl@0.55
shell: bash
- name: Set package name and paths according to distrib
run: |
PERL_VERSION=$(perl -E "say $^V" | sed -E "s/v([0-9]+\.[0-9]+).+/\1/g")
echo "Perl version is $PERL_VERSION"
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"
PERL_VENDORARCH="/usr/lib/x86_64-linux-gnu/perl/$PERL_VERSION"
else
PERL_VENDORARCH="/usr/lib/aarch64-linux-gnu/perl5/5.32"
PERL_VENDORARCH="/usr/lib/aarch64-linux-gnu/perl/$PERL_VERSION"
fi
else
NAME="perl-Net-Curl"
if [ "${{ matrix.distrib }}" = "el8" ]; then
PERL_VENDORARCH="/usr/local/lib64/perl5"
else
PERL_VENDORARCH="/usr/local/lib64/perl5/5.32"
PERL_VENDORARCH="/usr/local/lib64/perl5/$PERL_VERSION"
fi
fi
@ -118,7 +123,7 @@ jobs:
package_extension: ${{ matrix.package_extension }}
arch: ${{ matrix.arch }}
commit_hash: ${{ github.sha }}
release: 3
release: 1
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 }}

View File

@ -22,6 +22,7 @@ jobs:
package:
needs: [get-environment]
if: ${{ needs.get-environment.outputs.stability != 'stable' }}
strategy:
fail-fast: false
@ -32,37 +33,31 @@ jobs:
package_extension: rpm
runner: ubuntu-22.04
arch: amd64
version: 2.7.2
- image: packaging-plugins-alma9
distrib: el9
package_extension: rpm
runner: ubuntu-22.04
arch: amd64
version: 2.7.2
- image: packaging-plugins-bullseye
distrib: bullseye
package_extension: deb
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
runner: ["self-hosted", "collect-arm64"]
arch: arm64
version: 2.7.2
runs-on: ${{ matrix.runner }}
@ -74,6 +69,10 @@ jobs:
name: package ${{ matrix.distrib }} ${{ matrix.arch }}
env:
version: "2.7.2"
release: "6"
steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@ -110,8 +109,8 @@ jobs:
fi
cd /tmp
wget -O - https://github.com/Openwsman/openwsman/archive/refs/tags/v${{ matrix.version }}.tar.gz|tar zxvf -
cd openwsman-${{ matrix.version }}/
wget -O - https://github.com/Openwsman/openwsman/archive/refs/tags/v${{ env.version }}.tar.gz|tar zxvf -
cd openwsman-${{ env.version }}/
mkdir build
cd build
cmake .. -DBUILD_PYTHON=No -DBUILD_PYTHON3=No -DBUILD_JAVA=No -DBUILD_RUBY=No -DBUILD_PERL=Yes
@ -120,13 +119,23 @@ jobs:
- name: Set package name and paths according to distrib
run: |
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
apt-get install -y perl
else
dnf install -y perl
fi
PERL_VERSION=$(perl -E "say $^V" | sed -E "s/v([0-9]+\.[0-9]+).+/\1/g")
echo "Perl version is $PERL_VERSION"
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
NAME_PERL="libopenwsman-perl"
USRLIB="/usr/lib/"
if [ "${{ matrix.arch }}" = "amd64" ]; then
PERL_VENDORARCH="/usr/lib/x86_64-linux-gnu/perl5/5.32"
PERL_VENDORARCH="/usr/lib/x86_64-linux-gnu/perl/$PERL_VERSION"
else
PERL_VENDORARCH="/usr/lib/aarch64-linux-gnu/perl5/5.32"
PERL_VENDORARCH="/usr/lib/aarch64-linux-gnu/perl/$PERL_VERSION"
fi
else
NAME_PERL="openwsman-perl"
@ -134,15 +143,13 @@ jobs:
if [ "${{ matrix.distrib }}" = "el8" ]; then
PERL_VENDORARCH="/usr/local/lib64/perl5"
else
PERL_VENDORARCH="/usr/local/lib64/perl5/5.32"
PERL_VENDORARCH="/usr/local/lib64/perl5/$PERL_VERSION"
fi
fi
sed -i "s/@VERSION@/${{ matrix.version }}/g" dependencies/perl-openwsman/libwsman.yaml
sed -i "s#@USRLIB@#$USRLIB#g" dependencies/perl-openwsman/libwsman.yaml
sed -i "s/@NAME@/$NAME_PERL/g" dependencies/perl-openwsman/perl-openwsman.yaml
sed -i "s/@VERSION@/${{ matrix.version }}/g" dependencies/perl-openwsman/perl-openwsman.yaml
sed -i "s#@PERL_VENDORARCH@#$PERL_VENDORARCH#g" dependencies/perl-openwsman/perl-openwsman.yaml
cat dependencies/perl-openwsman/sblim-sfcc.yaml
@ -158,7 +165,8 @@ jobs:
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
arch: ${{ matrix.arch }}
release: 2
version: ${{ env.version }}
release: ${{ env.release }}
commit_hash: ${{ github.sha }}
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 }}
@ -173,7 +181,8 @@ jobs:
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
arch: ${{ matrix.arch }}
release: 4
version: ${{ env.version }}
release: ${{ env.release }}
commit_hash: ${{ github.sha }}
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 }}
@ -188,7 +197,8 @@ jobs:
distrib: ${{ matrix.distrib }}
package_extension: ${{ matrix.package_extension }}
arch: ${{ matrix.arch }}
release: 4
version: ${{ env.version }}
release: ${{ env.release }}
commit_hash: ${{ github.sha }}
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 }}
@ -196,15 +206,6 @@ jobs:
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@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: packages-${{ matrix.distrib }}-${{ matrix.arch }}
path: ./*.${{ matrix.package_extension}}
retention-days: 1
deliver-rpm:
needs: [get-environment, package]
if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }}

View File

@ -23,6 +23,8 @@ jobs:
version_file: connectors/vmware/src/centreon/script/centreon_vmware.pm
get-sources:
needs: [get-environment]
if: ${{ needs.get-environment.outputs.stability != 'stable' }}
runs-on: ubuntu-22.04
steps:
- name: Download vsphere cli sources
@ -45,28 +47,43 @@ jobs:
key: ${{ github.sha }}-${{ github.run_id }}-sources-perl-vmware-vsphere
package:
needs:
- get-sources
- get-environment
runs-on: ubuntu-22.04
needs: [get-environment, get-sources]
strategy:
matrix:
include:
- package_extension: rpm
image: packaging-plugins-alma8
distrib: el8
runner: ubuntu-22.04
arch: amd64
- package_extension: rpm
image: packaging-plugins-alma9
distrib: el9
runner: ubuntu-22.04
arch: amd64
- package_extension: deb
image: packaging-plugins-bullseye
distrib: bullseye
runner: ubuntu-22.04
arch: amd64
- package_extension: deb
image: packaging-plugins-bookworm
distrib: bookworm
runner: ubuntu-22.04
arch: amd64
- package_extension: deb
image: packaging-plugins-jammy
distrib: jammy
runner: ubuntu-22.04
arch: amd64
- package_extension: deb
image: packaging-plugins-bullseye-arm64
distrib: bullseye
runner: ["self-hosted", "collect-arm64"]
arch: arm64
runs-on: ${{ matrix.runner }}
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
@ -74,7 +91,7 @@ jobs:
username: ${{ secrets.DOCKER_REGISTRY_ID }}
password: ${{ secrets.DOCKER_REGISTRY_PASSWD }}
name: package ${{ matrix.distrib }}
name: package ${{ matrix.distrib }} ${{ matrix.arch }}
steps:
- name: Checkout sources
@ -87,25 +104,50 @@ jobs:
key: ${{ github.sha }}-${{ github.run_id }}-sources-perl-vmware-vsphere
fail-on-cache-miss: true
- name: Set paths according to distrib
run: |
PERL_VERSION=$(perl -E "say $^V" | sed -E "s/v([0-9]+\.[0-9]+).+/\1/g")
echo "Perl version is $PERL_VERSION"
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
if [ "${{ matrix.arch }}" = "amd64" ]; then
PERL_VENDORARCH="/usr/lib/x86_64-linux-gnu/perl/$PERL_VERSION"
else
PERL_VENDORARCH="/usr/lib/aarch64-linux-gnu/perl/$PERL_VERSION"
fi
else
if [ "${{ matrix.distrib }}" = "el8" ]; then
PERL_VENDORARCH="/usr/local/lib64/perl5"
else
PERL_VENDORARCH="/usr/local/lib64/perl5/$PERL_VERSION"
fi
fi
sed -i "s#@PERL_VENDORARCH@#$PERL_VENDORARCH#g" dependencies/perl-vmware-vsphere/packaging/perl-vmware-vsphere.yaml
cat dependencies/perl-vmware-vsphere/packaging/perl-vmware-vsphere.yaml
shell: bash
- name: 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 }}
arch: ${{ matrix.arch }}
commit_hash: ${{ github.sha }}
release: ${{ needs.get-environment.outputs.release }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }}
version: "7.0.1"
release: "17698549"
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ matrix.arch }}
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
if: ${{ contains(fromJson('["stable", "testing", "unstable"]'), needs.get-environment.outputs.stability) }}
needs: [get-environment, package]
if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }}
runs-on: [self-hosted, common]
strategy:
@ -119,22 +161,28 @@ jobs:
- name: Delivery
uses: ./.github/actions/rpm-delivery
with:
module_name: perl-vmware-vsphere
module_name: perl-vmware-vsphere-amd64
distrib: ${{ matrix.distrib }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}-amd64
stability: ${{ needs.get-environment.outputs.stability }}
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
deliver-deb:
needs:
- get-environment
- package
if: ${{ contains(fromJson('["stable", "testing", "unstable"]'), needs.get-environment.outputs.stability) }}
needs: [get-environment, package]
if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }}
runs-on: [self-hosted, common]
strategy:
matrix:
distrib: [bullseye, bookworm, jammy]
include:
- distrib: bullseye
arch: amd64
- distrib: bullseye
arch: arm64
- distrib: bookworm
arch: amd64
- distrib: jammy
arch: amd64
steps:
- name: Checkout sources
@ -143,8 +191,38 @@ jobs:
- name: Delivery
uses: ./.github/actions/deb-delivery
with:
module_name: perl-vmware-vsphere
module_name: perl-vmware-vsphere-${{ matrix.arch }}
distrib: ${{ matrix.distrib }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }}-${{ matrix.arch }}
stability: ${{ needs.get-environment.outputs.stability }}
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
promote:
needs: [get-environment]
if: ${{ contains(fromJson('["stable"]'), needs.get-environment.outputs.stability) }}
runs-on: [self-hosted, common]
strategy:
matrix:
include:
- distrib: el8
arch: amd64
- distrib: el9
arch: amd64
- distrib: bullseye
arch: amd64
- distrib: bookworm
arch: amd64
- distrib: bullseye
arch: arm64
steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Promote ${{ matrix.distrib }} ${{ matrix.arch }} to stable
uses: ./.github/actions/promote-to-stable
with:
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
module: perl-vmware-vsphere-${{ matrix.arch }}
distrib: ${{ matrix.distrib }}
stability: ${{ needs.get-environment.outputs.stability }}

View File

@ -40,9 +40,9 @@ BEGIN {
# it's a hack if you unset that
#$ENV{PERL_NET_HTTPS_SSL_SOCKET_CLASS} = "Net::SSL";
# The option is not omit to verify the certificate chain.
# The option is not omit to verify the certificate chain.
$ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
eval {
# required for new IO::Socket::SSL versions
require IO::Socket::SSL;
@ -54,7 +54,7 @@ BEGIN {
use base qw(centreon::vmware::script);
use vars qw(%centreon_vmware_config);
my $VERSION = '3.2.5';
my $VERSION = '3.2.6';
my %handlers = (TERM => {}, HUP => {}, CHLD => {});
my @load_modules = (

View File

@ -45,7 +45,7 @@ sub init_response {
my (%options) = @_;
$manager_response->{code} = 0;
$manager_response->{vmware_connector_version} = '3.2.5';
$manager_response->{vmware_connector_version} = '3.2.6';
$manager_response->{short_message} = 'OK';
$manager_response->{extra_message} = '';
$manager_response->{identity} = $options{identity} if (defined($options{identity}));

View File

@ -1,15 +1,15 @@
#!/usr/bin/perl
# Copyright 2015 Centreon (http://www.centreon.com/)
#
# Centreon is a full-fledged industry-strength solution that meets
# the needs in IT infrastructure and application monitoring for
# 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
# 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,
@ -50,7 +50,7 @@ Print a brief help message and exits.
=head1 DESCRIPTION
B<centreon_vmware.pl> will connect to ESX and/or VirtualCenter.
B<centreon_vmware.pl> will connect to ESX and/or VirtualCenter.
Use the plugin 'apps::vmware::connector::plugin' from: https://github.com/centreon/centreon-plugins
=cut

View File

@ -2,7 +2,7 @@ name: "@NAME@"
arch: "${ARCH}"
platform: "linux"
version_schema: "none"
version: "0.019"
version: "0.020"
release: "${RELEASE}${DIST}"
section: "default"
priority: "optional"

View File

@ -10,4 +10,4 @@ WriteMakefile(
DEFINE => '',
INC => '-I.',
OBJECT => 'libauthSamba.o SmbClient.o',
);
);

View File

@ -31,7 +31,7 @@ sub new {
sub error {
my ($self, %options) = @_;
if (defined($options{message})) {
$self->{error_msg} = $options{message};
}
@ -42,7 +42,7 @@ sub error {
sub load_db {
my ($self, %options) = @_;
$self->{error_msg} = undef;
$self->{error_msg} = undef;
$self->{buffer_file} = undef;
$self->{master_read_pos} = 0;

View File

@ -33,7 +33,7 @@ contents:
overrides:
rpm:
depends:
- perl
- perl-interpreter
- libssh
conflicts:
- perl-Libssh-Session-debuginfo

View File

@ -2,7 +2,7 @@ name: "@NAME@"
arch: "${ARCH}"
platform: "linux"
version_schema: "none"
version: "0.54"
version: "0.55"
release: "${RELEASE}${DIST}"
section: "default"
priority: "optional"
@ -40,7 +40,7 @@ contents:
overrides:
rpm:
depends:
- perl
- perl-interpreter
- libcurl
conflicts:
- perl-Net-Curl-debuginfo

View File

@ -2,7 +2,7 @@ name: "libwsman1"
arch: "${ARCH}"
platform: "linux"
version_schema: "none"
version: "@VERSION@"
version: "${VERSION}"
release: "${RELEASE}${DIST}"
section: "default"
priority: "optional"
@ -14,16 +14,21 @@ homepage: "http://www.openwsman.org/"
license: "BSD"
contents:
- src: "/tmp/openwsman-@VERSION@/build/src/lib/libwsman.so.*"
- src: "/tmp/openwsman-${VERSION}/build/src/lib/libwsman.so.*"
dst: "@USRLIB@"
expand: true
file_info:
mode: 0644
- src: "/tmp/openwsman-@VERSION@/build/src/lib/libwsman_client.so.*"
- src: "/tmp/openwsman-${VERSION}/build/src/lib/libwsman_client.so.*"
dst: "@USRLIB@"
expand: true
file_info:
mode: 0644
- src: "/tmp/openwsman-@VERSION@/build/src/lib/libwsman_curl_client_transport.so.*"
- src: "/tmp/openwsman-${VERSION}/build/src/lib/libwsman_curl_client_transport.so.*"
dst: "@USRLIB@"
expand: true
file_info:
mode: 0644

View File

@ -2,7 +2,7 @@ name: "@NAME@"
arch: "${ARCH}"
platform: "linux"
version_schema: "none"
version: "@VERSION@"
version: "${VERSION}"
release: "${RELEASE}${DIST}"
section: "default"
priority: "optional"
@ -14,13 +14,15 @@ homepage: "http://www.openwsman.org/"
license: "BSD"
contents:
- src: "/tmp/openwsman-@VERSION@/build/bindings/perl/openwsman.so"
- src: "/tmp/openwsman-${VERSION}/build/bindings/perl/openwsman.so"
dst: "@PERL_VENDORARCH@/"
expand: true
file_info:
mode: 0644
- src: "/tmp/openwsman-@VERSION@/build/bindings/perl/openwsman.pm"
- src: "/tmp/openwsman-${VERSION}/build/bindings/perl/openwsman.pm"
dst: "@PERL_VENDORARCH@/"
expand: true
file_info:
mode: 0644

View File

@ -2,7 +2,7 @@ name: "sblim-sfcc"
arch: "${ARCH}"
platform: "linux"
version_schema: "none"
version: "2.7.2"
version: "${VERSION}"
release: "${RELEASE}${DIST}"
section: "default"
priority: "optional"

View File

@ -1,9 +1,9 @@
name: "perl-VMware-vSphere"
arch: "amd64"
arch: "${ARCH}"
platform: "linux"
version_schema: "none"
version: "7.0.0"
release: "17698549${DIST}"
version: "${VERSION}"
release: "${RELEASE}${DIST}"
section: "default"
priority: "optional"
maintainer: "Centreon <contact@centreon.com>"
@ -20,18 +20,10 @@ license: "GPLv2+"
contents:
- src: "../../../vmware-vsphere-cli-distrib/VMware"
dst: "@PERL_SITELIB@/VMware"
packager: rpm
- src: "../../../vmware-vsphere-cli-distrib/VMware"
dst: "/usr/share/perl5/VMware"
packager: deb
dst: "@PERL_VENDORARCH@/VMware"
- src: "../../../vmware-vsphere-cli-distrib/WSMan"
dst: "@PERL_SITELIB@/WSMan"
packager: rpm
- src: "../../../vmware-vsphere-cli-distrib/WSMan"
dst: "/usr/share/perl5/WSMan"
packager: deb
dst: "@PERL_VENDORARCH@/WSMan"
overrides:
rpm: