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

feat(packaging): package for Debian 12 #4826

Merged
merged 22 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e9899a4
try to deliver deb12 packages
mushroomempires Jan 12, 2024
666c5f4
fix package input job
mushroomempires Jan 12, 2024
bc9a9a2
fix dockerfile
mushroomempires Jan 15, 2024
e257b8f
add stability variable on secondary packaging actions
mushroomempires Jan 15, 2024
f950ecb
fix perl-vmware vsphere action dependency
mushroomempires Jan 15, 2024
03bd824
add distribution to packaging jobs
mushroomempires Jan 15, 2024
45b33fe
doubled bullseye usage with bookworm
mushroomempires Jan 15, 2024
7011c0b
removed mention of env file as it's not ready yet
mushroomempires Jan 15, 2024
b6a1d78
triggering packaging and delivery for deb12 only
mushroomempires Jan 15, 2024
0da7dbc
forgot to deactivate plugins job delivery
mushroomempires Jan 15, 2024
e052917
Revert "forgot to deactivate plugins job delivery"
mushroomempires Jan 15, 2024
cc29de2
Revert "triggering packaging and delivery for deb12 only"
mushroomempires Jan 15, 2024
16bd325
remove branch name in value that triggers testing pkg
mushroomempires Jan 15, 2024
013dd84
Merge branch 'develop' of https://github.com/centreon/centreon-plugin…
mushroomempires Jan 15, 2024
a31f0b1
back to commenting most deliveries to get perl dependencies delivered…
mushroomempires Jan 16, 2024
43f5a6b
Revert "back to commenting most deliveries to get perl dependencies d…
mushroomempires Jan 17, 2024
cfedf69
Merge branch 'develop' of https://github.com/centreon/centreon-plugin…
mushroomempires Jan 18, 2024
6196bf5
updated zmq4 to zmq5
mushroomempires Jan 18, 2024
05f57d2
updated lib for vmware-connector-plugin with correct path
mushroomempires Jan 24, 2024
4fc8023
fix
mushroomempires Jan 24, 2024
3a27c7f
cleanup
mushroomempires Jan 24, 2024
931e94c
Merge branch 'develop' of https://github.com/centreon/centreon-plugin…
mushroomempires Jan 25, 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
8 changes: 8 additions & 0 deletions .github/actions/package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ inputs:
rpm_gpg_signing_passphrase:
description: The rpm gpg signing passphrase
required: true
stability:
description: "The package stability (stable, testing, unstable, canary)"
required: true

runs:
using: composite
Expand All @@ -53,6 +56,11 @@ runs:
if [ "${{ inputs.package_extension }}" = "rpm" ]; then
export DIST=".${{ inputs.distrib }}"
else
if [ "${{ inputs.stability }}" = "unstable" ] || [ "${{ inputs.stability }}" = "canary" ]; then
export RELEASE="$RELEASE-${{ inputs.distrib }}"
elif [ "${{ inputs.stability }}" = "testing" ]; then
export RELEASE="${{ inputs.distrib }}"
fi
export DIST=""
fi

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/promote-to-stable/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"

Expand Down
53 changes: 53 additions & 0 deletions .github/docker/Dockerfile.packaging-plugins-bookworm
Original file line number Diff line number Diff line change
@@ -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
6 changes: 5 additions & 1 deletion .github/workflows/connector-vmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ jobs:
- package_extension: deb
image: packaging-plugins-bullseye
distrib: bullseye
- package_extension: deb
image: packaging-plugins-bookworm
distrib: bookworm

container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
Expand All @@ -66,6 +69,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:
Expand Down Expand Up @@ -100,7 +104,7 @@ jobs:

strategy:
matrix:
distrib: [bullseye]
distrib: [bullseye, bookworm]

steps:
- name: Checkout sources
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/docker-builder-packaging-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ 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

runs-on: ${{ matrix.runner }}

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/nrpe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ jobs:
- package_extension: deb
image: packaging-plugins-bullseye
distrib: bullseye
- package_extension: deb
image: packaging-plugins-bookworm
distrib: bookworm

container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}
Expand Down Expand Up @@ -106,6 +109,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]
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/perl-cpan-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false
matrix:
distrib: [el8, el9, bullseye]
distrib: [el8, el9, bullseye, bookworm]
name:
[
"Authen::SASL::SASLprep",
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
"ZMQ::LibZMQ4"
]
include:
- build_distribs: "el8,el9,bullseye"
- build_distribs: "el8,el9,bullseye,bookworm"
- rpm_dependencies: ""
- deb_dependencies: ""
- rpm_provides: ""
Expand All @@ -114,6 +114,9 @@ jobs:
- distrib: bullseye
package_extension: deb
image: packaging-plugins-bullseye
- distrib: bookworm
package_extension: deb
image: packaging-plugins-bookworm
- 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)"
Expand Down Expand Up @@ -145,7 +148,7 @@ jobs:
build_distribs: "el8,el9"
version: "0.31"
- name: "ZMQ::Constants"
build_distribs: "el9,bullseye"
build_distribs: "el9,bullseye,bookworm"
- name: "ZMQ::FFI"
build_distribs: "el8,el9"
rpm_dependencies: "zeromq"
Expand Down Expand Up @@ -301,16 +304,19 @@ jobs:
download-and-cache-deb:
needs: [package]
runs-on: ubuntu-22.04
strategy:
matrix:
distrib: [bullseye, bookworm]
steps:
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: packages-deb-bullseye
name: packages-deb-${{ matrix.distrib }}
path: ./

- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
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]
Expand Down Expand Up @@ -341,7 +347,7 @@ jobs:

strategy:
matrix:
distrib: [bullseye]
distrib: [bullseye, bookworm]

steps:
- name: Checkout sources
Expand All @@ -362,7 +368,7 @@ jobs:
runs-on: [self-hosted, common]
strategy:
matrix:
distrib: [el8, el9, bullseye]
distrib: [el8, el9, bullseye, bookworm]

steps:
- name: Checkout sources
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/perl-crypt-argon2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ 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-bullseye-arm64
distrib: bullseye
package_extension: deb
Expand All @@ -68,7 +73,7 @@ jobs:

- name: Install locally Crypt::Argon2
run: |
if [ "${{ matrix.distrib }}" = "bullseye" ]; then
if [ "${{ matrix.distrib }}" = "bullseye" ] || [ "${{ matrix.distrib }}" = "bookworm" ]; then
apt-get update
apt-get install -y cpanminus gcc
else
Expand All @@ -80,7 +85,7 @@ jobs:

- name: Set package name and paths according to distrib
run: |
if [ "${{ matrix.distrib }}" = "bullseye" ]; then
if [ "${{ matrix.distrib }}" = "bullseye" ] || [ "${{ matrix.distrib }}" = "bookworm" ]; then
NAME="libcrypt-argon2-perl"
if [ "${{ matrix.arch }}" = "amd64" ]; then
PERL_VENDORARCH="/usr/lib/x86_64-linux-gnu/perl5/5.32"
Expand Down Expand Up @@ -158,6 +163,8 @@ jobs:
include:
- distrib: bullseye
arch: amd64
- distrib: bookworm
arch: amd64
- distrib: bullseye
arch: arm64

Expand Down Expand Up @@ -189,6 +196,8 @@ jobs:
arch: amd64
- distrib: bullseye
arch: amd64
- distrib: bookworm
arch: amd64
- distrib: bullseye
arch: arm64

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/perl-filesys-smbclient.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ jobs:
include:
- image: packaging-plugins-bullseye
distrib: bullseye
- image: packaging-plugins-bookworm
distrib: bookworm
name: package ${{ matrix.distrib }}
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest
Expand Down Expand Up @@ -172,7 +174,7 @@ jobs:

strategy:
matrix:
distrib: [bullseye]
distrib: [bullseye, bookworm]

steps:
- name: Checkout sources
Expand All @@ -193,7 +195,7 @@ jobs:
runs-on: [self-hosted, common]
strategy:
matrix:
distrib: [el8, el9, bullseye]
distrib: [el8, el9, bullseye, bookworm]

steps:
- name: Checkout sources
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/perl-json-path.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ jobs:
- image: packaging-plugins-bullseye
distrib: bullseye
package_extension: deb
- image: packaging-plugins-bookworm
distrib: bookworm
package_extension: deb

runs-on: ubuntu-22.04

Expand All @@ -55,7 +58,7 @@ jobs:

- name: Install locally JSON::Path
run: |
if [ "${{ matrix.distrib }}" = "bullseye" ]; then
if [ "${{ matrix.distrib }}" = "bullseye" ] || [ "${{ matrix.distrib }}" = "bookworm" ]; then
apt-get update
apt-get install -y cpanminus gcc
else
Expand All @@ -72,7 +75,7 @@ jobs:
- name: Set package name and paths according to distrib
run: |
VERSION="1.0.3"
if [ "${{ matrix.distrib }}" = "bullseye" ]; then
if [ "${{ matrix.distrib }}" = "bullseye" ] || [ "${{ matrix.distrib }}" = "bookworm" ]; then
NAME="libjson-path-perl"
PERL_VENDORLIB="/usr/share/perl5"
else
Expand Down Expand Up @@ -145,8 +148,7 @@ jobs:

strategy:
matrix:
distrib: [bullseye]

distrib: [bullseye, bookworm]

name: Deliver ${{ matrix.distrib }}

Expand All @@ -169,7 +171,7 @@ jobs:
runs-on: [self-hosted, common]
strategy:
matrix:
distrib: [bullseye]
distrib: [bullseye, bookworm]

steps:
- name: Checkout sources
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/perl-keepass-reader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ jobs:
include:
- image: bullseye
distrib: bullseye
- image: bookworm
distrib: bookworm
name: package ${{ matrix.distrib }}
container:
image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/packaging-plugins-${{ matrix.image }}:latest
Expand Down Expand Up @@ -180,7 +182,7 @@ jobs:

strategy:
matrix:
distrib: [bullseye]
distrib: [bullseye, bookworm]

steps:
- name: Checkout sources
Expand All @@ -201,7 +203,7 @@ jobs:
runs-on: [self-hosted, common]
strategy:
matrix:
distrib: [el8, el9, bullseye]
distrib: [el8, el9, bullseye, bookworm]

steps:
- name: Checkout sources
Expand Down
Loading
Loading