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

test(ci): generate perl-crypt-openssl-aes for el7 #5360

Closed
wants to merge 44 commits into from
Closed
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
8c77f2d
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
ca0769e
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
ecc4a5e
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
e4e3103
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
5e90ae9
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
cec2459
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
d8b7db7
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
7876d64
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
819c076
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
3a44022
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
ba0557b
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
3ec4dff
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
ead88db
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
4b88cf6
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
59f49a0
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
6d117d8
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
5a84152
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
4f8c69b
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
8521b4a
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
a2ff012
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
5032df4
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
c668df4
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
5365497
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 18, 2024
da04996
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
dfb6af0
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
7147297
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
94cb97b
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
9b6176d
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
c2d0a26
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
eccf0a1
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
4365c47
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
1d601a2
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
3b51241
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
45b0ba4
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
faf23d2
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
d0f635e
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
6de5c9a
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
b46cec7
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
005b0ea
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
0b83b3b
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
f3b4fca
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
ac63afd
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
c157a76
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 2024
ea32e15
test(ci): generate perl-crypt-openssl-aes for el7
kduret Dec 19, 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
760 changes: 248 additions & 512 deletions .github/workflows/perl-cpan-libraries.yml
Original file line number Diff line number Diff line change
@@ -22,258 +22,256 @@ jobs:
get-environment:
uses: ./.github/workflows/get-environment.yml

package-rpm:
needs: [get-environment]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
needs.get-environment.outputs.stability != 'stable'
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
distrib: [el8, el9]
name:
[
"ARGV::Struct",
"Authen::SASL::SASLprep",
"Authen::SCRAM::Client",
"BSON",
"BSON::XS",
"Config::AWS",
"Convert::Binary::C",
"Convert::EBCDIC",
"Crypt::Blowfish_PP",
"Crypt::OpenSSL::AES",
"DataStruct::Flat",
"DateTime::Format::Duration::ISO8601",
"DBD::Sybase",
"Device::Modbus",
"Device::Modbus::RTU::Client",
"Device::Modbus::TCP::Client",
"Email::Send::SMTP::Gmail",
"FFI::CheckLib",
"FFI::Platypus",
"File::SearchPath",
"HTTP::ProxyPAC",
"JMX::Jmx4Perl",
"Mojo::IOLoop::Signal",
"MongoDB",
"MooseX::ClassAttribute",
"Net::Amazon::Signature::V4",
"Net::DHCP",
"Net::FTPSSL",
"Net::HTTPTunnel",
"Net::NTP",
"Net::SMTPS",
"Net::SMTP_auth",
"Net::Subnet",
"Net::TFTP",
"Paws",
"PBKDF2::Tiny",
"Statistics::Descriptive",
"Statistics::Regression",
"Term::Clui",
"Unicode::Stringprep",
"URI::Template",
"URL::Encode",
"URL::Encode::XS",
"UUID",
"UUID::URandom",
"WWW::Selenium",
"XML::LibXML::Simple",
"ZMQ::Constants",
"ZMQ::FFI",
"ZMQ::LibZMQ4"
]
include:
- build_distribs: "el8,el9"
- rpm_dependencies: ""
- rpm_provides: ""
- version: ""
- spec_file: ""
- distrib: el8
package_extension: rpm
image: packaging-plugins-alma8
- distrib: el9
package_extension: rpm
image: packaging-plugins-alma9
- name: "BSON"
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: "DateTime::Format::Duration::ISO8601"
rpm_provides: "perl(DateTime-Format-Duration-ISO8601)"
- name: "Device::Modbus::RTU::Client"
version: "0.022"
- name: "Device::Modbus::TCP::Client"
version: "0.026"
- name: "FFI::CheckLib"
rpm_dependencies: "perl(Env)"
- name: "FFI::Platypus"
rpm_provides: "perl(FFI::Platypus::Buffer) perl(FFI::Platypus::Memory)"
rpm_dependencies: "perl(Capture::Tiny) perl(FFI::CheckLib) perl(File::Spec::Functions) perl(IPC::Cmd) perl(JSON::PP) perl(List::Util) perl(autodie) perl(constant) perl(parent)"
no-auto-depends: true
- name: "Net::DHCP"
rpm_provides: "perl(Net::DHCP::Constants) perl(Net::DHCP::Packet)"
- name: "Net::SMTPS"
build_distribs: el9
- name: "Statistics::Descriptive"
build_distribs: el9
- name: "Statistics::Regression"
version: "0.53"
- name: "URL::Encode::XS"
build_distribs: el9
- name: "UUID"
version: "0.31"
- name: "ZMQ::Constants"
build_distribs: "el9"
- name: "ZMQ::FFI"
rpm_dependencies: "zeromq"
- name: "ZMQ::LibZMQ4"
version: "0.01"
rpm_dependencies: "zeromq"
- name: "Mojo::IOLoop::Signal"
rpm_dependencies: "perl-Mojolicious"
rpm_provides: "perl(Mojo::IOLoop::Signal)"
no-auto-depends: true


name: package ${{ matrix.distrib }} ${{ matrix.name }}
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest
credentials:
username: ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }}
password: ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }}

steps:
- if: ${{ contains(matrix.build_distribs, matrix.distrib) }}
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- 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
yum config-manager --set-enabled powertools || true # alma 8
yum install -y cpanminus rpm-build libcurl-devel libssh-devel expat-devel gcc libuuid-devel zeromq-devel libxml2-devel libffi-devel perl-DBI perl-Net-Pcap freetds freetds-devel perl-Module-Build-Tiny
dnf module reset -y ruby
dnf module enable -y ruby:3.1
dnf install -y ruby ruby-devel
shell: bash

- if: ${{ contains(matrix.build_distribs, matrix.distrib) }}
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: kduret/fpm
ref: fix-rpm-perl-dependency-name-unchanged
path: fpm

- if: ${{ contains(matrix.build_distribs, matrix.distrib) }}
name: Build and install fpm # waiting https://github.com/jordansissel/fpm/pull/2066
run: |
dnf install -y bsdtar
cd fpm
gem install bundler
bundle install
make install
shell: bash

- if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.spec_file == '' }}
run: |
if [ -z "${{ matrix.version }}" ]; then
PACKAGE_VERSION=""
else
PACKAGE_VERSION=" -v ${{ matrix.version }}"
fi
if [ -z "${{ matrix.rpm_dependencies }}" ]; then
PACKAGE_DEPENDENCIES=""
else
for PACKAGE_DEPENDENCY in `echo "${{ matrix.rpm_dependencies }}"`; do
PACKAGE_DEPENDENCIES="$PACKAGE_DEPENDENCIES --depends "$PACKAGE_DEPENDENCY""
done
fi
if [ ! -z "${{ matrix.no-auto-depends }}" ]; then
PACKAGE_DEPENDENCIES="$PACKAGE_DEPENDENCIES --no-auto-depends"
fi
if [ -z "${{ matrix.rpm_provides }}" ]; then
PACKAGE_PROVIDES=""
else
for PACKAGE_PROVIDE in `echo "${{ matrix.rpm_provides }}"`; do
PACKAGE_PROVIDES="$PACKAGE_PROVIDES --provides $PACKAGE_PROVIDE"
done
fi
cpanm Module::Build::Tiny
cpanm Module::Install
export SYBASE="/usr"
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.spec_file != '' }}
run: |
mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
rpmbuild --undefine=_disable_source_fetch -ba ${{ matrix.spec_file }}
cp -r ~/rpmbuild/RPMS/noarch/*.rpm .
shell: bash

- if: ${{ contains(matrix.build_distribs, matrix.distrib) }}
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

- if: ${{ contains(matrix.build_distribs, matrix.distrib) }}
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
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: [get-environment, package-rpm]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
needs.get-environment.outputs.stability != 'stable'
runs-on: ubuntu-24.04
strategy:
matrix:
distrib: [el8, el9]

steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: packages-rpm-${{ matrix.distrib }}
pattern: packages-rpm-${{ matrix.distrib }}-*
delete-merged: false # cannot be set to true due to random fails: Failed to DeleteArtifact: Unable to make request: ECONNRESET
retention-days: 1

- name: Delete merged artifacts
uses: geekyeggo/delete-artifact@f275313e70c08f6120db482d7a6b98377786765b # v5.1.0
with:
name: packages-rpm-${{ matrix.distrib }}-*
failOnError: false
# package-rpm:
# needs: [get-environment]
# if: |
# needs.get-environment.outputs.skip_workflow == 'false' &&
# needs.get-environment.outputs.stability != 'stable'

# runs-on: [self-hosted, common]
# strategy:
# fail-fast: false
# matrix:
# distrib: [el7]
# name:
# [
# "Crypt::OpenSSL::AES",
# ]
# include:
# - build_distribs: "el7"
# - rpm_dependencies: ""
# - rpm_provides: ""
# # - version: "0.21"
# - version: "0.05"
# - spec_file: ""
# - distrib: el7
# package_extension: rpm
# image: packaging-plugins-centos7

# name: package ${{ matrix.distrib }} ${{ matrix.name }}
# container:
# image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest
# credentials:
# username: ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }}
# password: ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }}
# env:
# FORCE_JAVASCRIPT_ACTIONS_TO_NODE20: 'false'
# ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
# ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: 'true'

# steps:
# - run: git clone https://github.com/centreon/centreon-plugins.git --branch generate-perl-crypt-openssl-aes --single-branch
# - run: |
# curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
# # source ~/.bashrc
# export NVM_DIR="$HOME/.nvm"
# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# nvm install 16
# - uses: actions/cache@v3
# with:
# key: kdu-${{ github.sha }}-${{ github.run_id }}
# path: ./src

# - if: ${{ contains(matrix.build_distribs, matrix.distrib) }}
# run: |
# # BASE CENTOS 7 REPOSITORIES
# for file in $(grep -l mirrorlist /etc/yum.repos.d/CentOS-*);do
# if [[ "$file" == "/etc/yum.repos.d/CentOS-CR.repo" ]];then
# echo "Enabling vault.centos.org in $file"
# sed -i 's/baseurl\=http\:\/\/mirror\.centos\.org/baseurl\=http\:\/\/vault\.centos\.org/g' $file
# else
# echo "Disabling mirrorlist.centos.org in $file"
# sed -i 's/mirrorlist\=/\#mirrorlist\=/g' $file
# echo "Enabling vault.centos.org in $file"
# sed -i 's/\#baseurl\=http\:\/\/mirror\.centos\.org/baseurl\=http\:\/\/vault\.centos\.org/g' $file
# fi
# done
# # SOFTWARE COLLECTION CENTOS 7 REPOSITORIES
# for file in $(grep -l mirrorlist /etc/yum.repos.d/CentOS-SCLo*);do
# echo "Disabling mirrorlist.centos.org in $file"
# sed -i 's/mirrorlist\=/\#mirrorlist\=/g' $file
# if [[ "$file" == "/etc/yum.repos.d/CentOS-SCLo-scl.repo" ]];then
# echo "Enabling vault.centos.org in scl."
# sed -i 's/\#\ baseurl\=http\:\/\/mirror\.centos\.org/baseurl\=http\:\/\/vault\.centos\.org/g' $file
# elif [[ "$file" == "/etc/yum.repos.d/CentOS-SCLo-scl-rh.repo" ]];then
# echo "Enabling vault.centos.org in scl-rh"
# sed -i 's/\#baseurl\=http\:\/\/mirror\.centos\.org/baseurl\=http\:\/\/vault\.centos\.org/g' $file
# else
# echo "Not a SCL repo file"
# fi
# done
# yum install -y yum-utils epel-release git
# yum config-manager --set-enabled crb || true # alma 9
# yum config-manager --set-enabled powertools || true # alma 8
# yum install -y cpanminus rpm-build libcurl-devel libssh-devel expat-devel gcc libuuid-devel zeromq-devel libxml2-devel libffi-devel perl-DBI perl-Net-Pcap freetds freetds-devel perl-Module-Build-Tiny

# # yum install -y git-core zlib zlib-devel gcc-c++ patch readline readline-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison curl sqlite-devel
# # curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
# # echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
# # echo 'eval "$(rbenv init -)"' >> ~/.bashrc
# # source ~/.bashrc

# # yum install -y ruby
# # gem install fpm

# # yum module reset -y ruby
# # yum module enable -y ruby:3.1
# # yum install -y ruby ruby-devel
# # yum install -y centos-release-scl-rh
# # # BASE CENTOS 7 REPOSITORIES
# # for file in $(grep -l mirrorlist /etc/yum.repos.d/CentOS-*);do
# # if [[ "$file" == "/etc/yum.repos.d/CentOS-CR.repo" ]];then
# # echo "Enabling vault.centos.org in $file"
# # sed -i 's/baseurl\=http\:\/\/mirror\.centos\.org/baseurl\=http\:\/\/vault\.centos\.org/g' $file
# # else
# # echo "Disabling mirrorlist.centos.org in $file"
# # sed -i 's/mirrorlist\=/\#mirrorlist\=/g' $file
# # echo "Enabling vault.centos.org in $file"
# # sed -i 's/\#baseurl\=http\:\/\/mirror\.centos\.org/baseurl\=http\:\/\/vault\.centos\.org/g' $file
# # fi
# # done
# # # SOFTWARE COLLECTION CENTOS 7 REPOSITORIES
# # for file in $(grep -l mirrorlist /etc/yum.repos.d/CentOS-SCLo*);do
# # echo "Disabling mirrorlist.centos.org in $file"
# # sed -i 's/mirrorlist\=/\#mirrorlist\=/g' $file
# # if [[ "$file" == "/etc/yum.repos.d/CentOS-SCLo-scl.repo" ]];then
# # echo "Enabling vault.centos.org in scl."
# # sed -i 's/\#\ baseurl\=http\:\/\/mirror\.centos\.org/baseurl\=http\:\/\/vault\.centos\.org/g' $file
# # elif [[ "$file" == "/etc/yum.repos.d/CentOS-SCLo-scl-rh.repo" ]];then
# # echo "Enabling vault.centos.org in scl-rh"
# # sed -i 's/\#baseurl\=http\:\/\/mirror\.centos\.org/baseurl\=http\:\/\/vault\.centos\.org/g' $file
# # else
# # echo "Not a SCL repo file"
# # fi
# # done
# # yum install -y devtoolset-7-gcc-c++
# # yum install -y rbenv
# # CC=/opt/rh/devtoolset-7/root/usr/bin/gcc rbenv install 3.1.4 -v
# shell: bash
# - run: |
# yum install -y ruby
# gem install dotenv -v 2.8.1 -N
# gem install rexml -v 3.2.4 -N
# gem install backports -v 3.21.0
# gem install fpm -v 1.15.0


# # gem install dotenv -v 2.8.1 -N
# # gem install rexml -v 3.2.4 -N
# # gem install backports -v 3.21.0 -N
# # gem install fpm -N
# # ~/.rbenv/bin/rbenv install 3.1.6 || true
# # cat /tmp/ruby-build*
# # gem install fpm
# shell: bash
# # - uses: ruby/setup-ruby@v1
# # with:
# # ruby-version: '3.1' # Not needed with a `.ruby-version` or `.tool-versions`
# # bundler-cache: true

# # - run: git clone https://github.com/kduret/fpm.git --branch fix-rpm-perl-dependency-name-unchanged --single-branch fpm
# # - if: ${{ contains(matrix.build_distribs, matrix.distrib) }}
# # uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# # with:
# # repository: kduret/fpm
# # ref: fix-rpm-perl-dependency-name-unchanged
# # path: fpm

# # - if: ${{ contains(matrix.build_distribs, matrix.distrib) }}
# # name: Build and install fpm # waiting https://github.com/jordansissel/fpm/pull/2066
# # run: |
# # yum install -y bsdtar
# # cd fpm
# # gem install bundler
# # bundle install
# # make install
# # shell: bash

# - if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.spec_file == '' }}
# run: |
# set -x
# if [ -z "${{ matrix.version }}" ]; then
# PACKAGE_VERSION=""
# else
# PACKAGE_VERSION=" -v ${{ matrix.version }}"
# fi

# if [ -z "${{ matrix.rpm_dependencies }}" ]; then
# PACKAGE_DEPENDENCIES=""
# else
# for PACKAGE_DEPENDENCY in `echo "${{ matrix.rpm_dependencies }}"`; do
# PACKAGE_DEPENDENCIES="$PACKAGE_DEPENDENCIES --depends "$PACKAGE_DEPENDENCY""
# done
# fi

# if [ -z "${{ matrix.rpm_provides }}" ]; then
# PACKAGE_PROVIDES=""
# else
# for PACKAGE_PROVIDE in `echo "${{ matrix.rpm_provides }}"`; do
# PACKAGE_PROVIDES="$PACKAGE_PROVIDES --provides $PACKAGE_PROVIDE"
# done
# fi

# cpanm Module::Build::Tiny
# cpanm Module::Install
# cpanm MSCHWERN/ExtUtils-MakeMaker-6.64.tar.gz --notest
# yum install -y perl-local-lib openssl-devel

# PERL_CPANM_OPT="--notest --skip-installed --skip-satisfied" 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) }}
# 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

# - if: ${{ contains(matrix.build_distribs, matrix.distrib) }}
# uses: actions/upload-artifact@v3 # v4.4.0
# with:
# 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: [get-environment, package-rpm]
# if: |
# needs.get-environment.outputs.skip_workflow == 'false' &&
# needs.get-environment.outputs.stability != 'stable'
# runs-on: ubuntu-24.04
# strategy:
# matrix:
# distrib: [el7]

# steps:
# - name: Merge Artifacts
# uses: actions/upload-artifact/merge@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
# with:
# name: packages-rpm-${{ matrix.distrib }}
# pattern: packages-rpm-${{ matrix.distrib }}-*
# delete-merged: false # cannot be set to true due to random fails: Failed to DeleteArtifact: Unable to make request: ECONNRESET
# retention-days: 1

# - name: Delete merged artifacts
# uses: geekyeggo/delete-artifact@f275313e70c08f6120db482d7a6b98377786765b # v5.1.0
# with:
# name: packages-rpm-${{ matrix.distrib }}-*
# failOnError: false

sign-rpm:
needs: [get-environment, merge-package-rpm-artifacts]
needs: [get-environment]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
needs.get-environment.outputs.stability != 'stable'
runs-on: ubuntu-24.04
strategy:
matrix:
distrib: [el8, el9]
distrib: [el7]
name: sign rpm ${{ matrix.distrib }}
container:
image: docker.centreon.com/centreon-private/rpm-signing:latest
@@ -288,10 +286,10 @@ jobs:

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: packages-rpm-${{ matrix.distrib }}
path: ./
# - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
# with:
# name: packages-rpm-${{ matrix.distrib }}
# path: ./

- run: echo "HOME=/root" >> $GITHUB_ENV
shell: bash
@@ -304,270 +302,8 @@ jobs:
path: ./*.rpm
key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}

package-deb:
needs: [get-environment]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
needs.get-environment.outputs.stability != 'stable'
runs-on: ${{ matrix.runner_name }}
strategy:
fail-fast: false
matrix:
image: [packaging-plugins-bullseye, packaging-plugins-bookworm, packaging-plugins-jammy, packaging-plugins-bullseye-arm64]
name:
[
"ARGV::Struct",
"Authen::SCRAM::Client",
"Config::AWS",
"Convert::EBCDIC",
"Crypt::Blowfish_PP",
"Crypt::OpenSSL::AES",
"DataStruct::Flat",
"DateTime::Format::Duration::ISO8601",
"Device::Modbus",
"Device::Modbus::RTU::Client",
"Device::Modbus::TCP::Client",
"Digest::SHA1",
"Email::Send::SMTP::Gmail",
"Hash::Ordered",
"HTTP::ProxyPAC",
"JMX::Jmx4Perl",
"Mojo::IOLoop::Signal",
"Net::Amazon::Signature::V4",
"Net::FTPSSL",
"Net::HTTPTunnel",
"Net::MQTT::Simple",
"Net::SMTP_auth",
"Paws",
"Statistics::Regression",
"WWW::Selenium",
"ZMQ::Constants",
"ZMQ::LibZMQ4"
]
include:
- runner_name: ubuntu-24.04
- arch: amd64
- 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
- distrib: bullseye
package_extension: deb
image: packaging-plugins-bullseye-arm64
arch: arm64
runner_name: ["self-hosted", "collect-arm64"]
- name: "Device::Modbus::RTU::Client"
build_distribs: "bookworm"
- name: "Device::Modbus::TCP::Client"
build_distribs: "bookworm"
- name: "Net::Amazon::Signature::V4"
build_distribs: ["bullseye", "jammy"]
- name: "Net::MQTT::Simple"
version: "1.29"
- name: "Paws"
use_dh_make_perl: "false"
deb_dependencies: "libmoose-perl libmoosex-classattribute-perl libjson-maybexs-perl liburl-encode-perl libargv-struct-perl libmoo-perl libtype-tiny-perl libdatastruct-flat-perl libmodule-find-perl libthrowable-perl liburi-template-perl libnet-amazon-signature-v4-perl"
no-auto-depends: true
- name: "Statistics::Regression"
build_distribs: "bullseye"
version: "0.53"
- name: "ZMQ::LibZMQ4"
use_dh_make_perl: "false"
version: "0.01"
deb_dependencies: "libzmq5"
name: package ${{ matrix.distrib }} ${{ matrix.arch }} ${{ matrix.name }}
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest
credentials:
username: ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }}
password: ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }}

steps:
- if: ${{ contains(matrix.build_distribs, matrix.distrib) }}
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- if: ${{ contains(matrix.build_distribs, matrix.distrib) }}
name: Parse distrib name
id: parse-distrib
uses: ./.github/actions/parse-distrib
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
distrib: ${{ matrix.distrib }}

- if: ${{ contains(matrix.build_distribs, matrix.distrib) }}
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
if [ -z "${{ matrix.deb_dependencies }}" ]; then
PACKAGE_DEPENDENCIES=""
else
for PACKAGE_DEPENDENCY in `echo ${{ matrix.deb_dependencies }}`; do
PACKAGE_DEPENDENCIES="$PACKAGE_DEPENDENCIES --depends $PACKAGE_DEPENDENCY"
done
fi
if [ ! -z "${{ matrix.no-auto-depends }}" ]; then
PACKAGE_DEPENDENCIES="$PACKAGE_DEPENDENCIES --no-auto-depends"
fi
cpanm Module::Build::Tiny
cpanm Module::Install
gem install fpm
# Patch to apply fpm fix for debian package generation while waiting for the official fix to be released.
patch -i .github/patch/fpm-deb.rb.diff $(find / -type f -name "deb.rb")
fpm -a native -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --iteration ${{ steps.parse-distrib.outputs.package_distrib_name }} --verbose --cpan-verbose --no-cpan-test$PACKAGE_DEPENDENCIES -v ${{ steps.package-version.outputs.package_version }} ${{ matrix.name }}
shell: bash

- if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'true' }}
run: |
apt-get install -y libcurl4-openssl-dev dh-make-perl libssh-dev uuid-dev libczmq-dev libmodule-install-perl libmodule-build-tiny-perl
# module-build-tiny is required for Mojo::IOLoop::Signal build.
DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --dist ${{ matrix.distrib }} --build --version ${{ steps.package-version.outputs.package_version }}${{ steps.parse-distrib.outputs.package_distrib_separator }}${{ steps.parse-distrib.outputs.package_distrib_name }} --cpan ${{ matrix.name }}
shell: bash

- if: ${{ contains(matrix.build_distribs, matrix.distrib) }}
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

- if: ${{ contains(matrix.build_distribs, matrix.distrib) }}
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ matrix.arch }}-${{ steps.package-name.outputs.name_with_dash}}
path: ./*.${{ matrix.package_extension }}
retention-days: 1

merge-package-deb-artifacts:
needs: [get-environment, package-deb]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
needs.get-environment.outputs.stability != 'stable'
runs-on: ubuntu-24.04
strategy:
matrix:
distrib: [bullseye, bookworm, jammy]

steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: packages-deb-${{ matrix.distrib }}
pattern: packages-deb-${{ matrix.distrib }}-*
delete-merged: false # cannot be set to true due to random fails: Failed to DeleteArtifact: Unable to make request: ECONNRESET
name: packages-signed-rpm-${{ matrix.distrib }}
path: ./*.rpm
retention-days: 1

- name: Delete merged artifacts
uses: geekyeggo/delete-artifact@f275313e70c08f6120db482d7a6b98377786765b # v5.1.0
with:
name: packages-deb-${{ matrix.distrib }}-*
failOnError: false

download-and-cache-deb:
needs: [get-environment, merge-package-deb-artifacts]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
needs.get-environment.outputs.stability != 'stable'
runs-on: ubuntu-24.04
strategy:
matrix:
distrib: [bullseye, bookworm, jammy]
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: packages-deb-${{ matrix.distrib }}
path: ./

- uses: actions/cache/save@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ./*.deb
key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }}

deliver-packages:
needs: [get-environment, sign-rpm, download-and-cache-deb]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
(contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) || ( needs.get-environment.outputs.stability == 'stable' && github.event_name != 'workflow_dispatch')) &&
! cancelled() &&
! contains(needs.*.result, 'failure') &&
! contains(needs.*.result, 'cancelled')
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- distrib: el8
package_extension: rpm
- distrib: el9
package_extension: rpm
- distrib: bullseye
package_extension: deb
- distrib: bookworm
package_extension: deb
- distrib: jammy
package_extension: deb

name: deliver ${{ matrix.distrib }}
steps:
- name: Checkout sources
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0

- name: Delivery
uses: ./.github/actions/package-delivery
with:
module_name: perl-cpan-libraries
distrib: ${{ matrix.distrib }}
cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }}
stability: ${{ needs.get-environment.outputs.stability }}
release_type: ${{ needs.get-environment.outputs.release_type }}
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}

set-skip-label:
needs: [get-environment, deliver-packages]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
! cancelled() &&
! contains(needs.*.result, 'failure') &&
! contains(needs.*.result, 'cancelled')
uses: ./.github/workflows/set-pull-request-skip-label.yml
Binary file added perl-Crypt-OpenSSL-AES-0.05-1.el7.x86_64.rpm
Binary file not shown.