Skip to content

Commit

Permalink
feat(ci): deliver packages to ubuntu repository (#4874)
Browse files Browse the repository at this point in the history
  • Loading branch information
kduret authored Feb 2, 2024
1 parent ce59098 commit 9d7be65
Show file tree
Hide file tree
Showing 13 changed files with 37 additions and 26 deletions.
8 changes: 7 additions & 1 deletion .github/actions/deb-delivery/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,17 @@ runs:
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
2 changes: 1 addition & 1 deletion .github/workflows/connector-vmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:

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

steps:
- name: Checkout sources
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nrpe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:

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

steps:
- name: Checkout sources
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/perl-cpan-libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ jobs:

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

steps:
- name: Checkout sources
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/perl-crypt-argon2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:

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

- name: Set package name and paths according to distrib
run: |
if [ "${{ matrix.distrib }}" = "bullseye" ] || [ "${{ matrix.distrib }}" = "bookworm" ] || [ "${{ matrix.distrib }}" = "jammy" ]; 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"
Expand Down Expand Up @@ -172,6 +172,8 @@ jobs:
arch: amd64
- distrib: bookworm
arch: amd64
- distrib: jammy
arch: amd64
- distrib: bullseye
arch: arm64

Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/perl-filesys-smbclient.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,6 @@ 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
Expand Down Expand Up @@ -176,7 +172,7 @@ jobs:

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

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

steps:
- name: Checkout sources
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/perl-json-path.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:

- name: Install locally JSON::Path
run: |
if [ "${{ matrix.distrib }}" = "bullseye" ] || [ "${{ matrix.distrib }}" = "bookworm" ] || [ "${{ matrix.distrib }}" = "jammy" ]; then
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
apt-get update
apt-get install -y cpanminus gcc
else
Expand All @@ -78,7 +78,7 @@ jobs:
- name: Set package name and paths according to distrib
run: |
VERSION="1.0.3"
if [ "${{ matrix.distrib }}" = "bullseye" ] || [ "${{ matrix.distrib }}" = "bookworm" ] || [ "${{ matrix.distrib }}" = "jammy" ]; then
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
NAME="libjson-path-perl"
PERL_VENDORLIB="/usr/share/perl5"
else
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/perl-keepass-reader.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ jobs:

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

steps:
- name: Checkout sources
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/perl-libssh-session.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:

- name: Install locally Libssh::Session
run: |
if [ "${{ matrix.distrib }}" = "bullseye" ] || [ "${{ matrix.distrib }}" = "bookworm" || [ "${{ matrix.distrib }}" = "jammy" ]; then
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
apt-get update
apt-get install -y cpanminus gcc libssh-dev
else
Expand All @@ -88,7 +88,7 @@ jobs:

- name: Set package name and paths according to distrib
run: |
if [ "${{ matrix.distrib }}" = "bullseye" ] || [ "${{ matrix.distrib }}" = "bookworm" ] || [ "${{ matrix.distrib }}" = "jammy" ]; 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"
Expand Down Expand Up @@ -172,6 +172,8 @@ jobs:
arch: arm64
- distrib: bookworm
arch: amd64
- distrib: jammy
arch: amd64

name: Deliver ${{ matrix.distrib }} ${{ matrix.arch }}

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/perl-net-curl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:

- name: Install locally Net::Curl
run: |
if [ "${{ matrix.distrib }}" = "bullseye" ] || [ "${{ matrix.distrib }}" = "bookworm" ] || [ "${{ matrix.distrib }}" = "jammy" ]; then
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
apt-get update
apt-get install -y libcurl4-openssl-dev cpanminus gcc
else
Expand All @@ -88,7 +88,7 @@ jobs:

- name: Set package name and paths according to distrib
run: |
if [ "${{ matrix.distrib }}" = "bullseye" ] || [ "${{ matrix.distrib }}" = "bookworm" ] || [ "${{ matrix.distrib }}" = "jammy" ]; 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"
Expand Down Expand Up @@ -170,6 +170,8 @@ jobs:
arch: amd64
- distrib: bookworm
arch: amd64
- distrib: jammy
arch: amd64
- distrib: bullseye
arch: arm64

Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/perl-openwsman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:

- name: Install locally sblim-sfcc
run: |
if [ "${{ matrix.distrib }}" = "bullseye" ] || [ "${{ matrix.distrib }}" = "bookworm" ] || [ "${{ matrix.distrib }}" = "jammy" ]; then
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
apt-get update
apt-get install -y libcurl4-openssl-dev
cd /tmp
Expand All @@ -103,7 +103,7 @@ jobs:

- name: Build openwsman
run: |
if [ "${{ matrix.distrib }}" = "bullseye" ] || [ "${{ matrix.distrib }}" = "bookworm" ] || [ "${{ matrix.distrib }}" = "jammy" ]; 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
Expand All @@ -116,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" ] || [ "${{ matrix.distrib }}" = "bookworm" ] || [ "${{ matrix.distrib }}" = "jammy" ]; then
if [[ "${{ matrix.package_extension }}" == "deb" ]]; then
NAME_PERL="libopenwsman-perl"
USRLIB="/usr/lib/"
if [ "${{ matrix.arch }}" = "amd64" ]; then
Expand Down Expand Up @@ -150,7 +151,7 @@ jobs:
shell: bash

- name: Package sblim-sfcc
if: ${{ matrix.distrib == 'bullseye' || matrix.distrib == 'bookworm' || matrix.distrib == 'jammy' }}
if: ${{ matrix.package_extension == 'deb' }}
uses: ./.github/actions/package-nfpm
with:
nfpm_file_pattern: "dependencies/perl-openwsman/sblim-sfcc.yaml"
Expand Down Expand Up @@ -249,6 +250,8 @@ jobs:
arch: amd64
- distrib: bookworm
arch: amd64
- distrib: jammy
arch: amd64
- distrib: bullseye
arch: arm64

Expand Down Expand Up @@ -308,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' || matrix.distrib == 'bookworm' || matrix.distrib == 'jammy' }}
if: ${{ contains(fromJSON('["bullseye", "bookworm", "jammy"]'), matrix.distrib) }}
uses: ./.github/actions/promote-to-stable
with:
artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/perl-vmware-vsphere.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ jobs:

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

steps:
- name: Checkout sources
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/plugin-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
strategy:
fail-fast: false
matrix:
distrib: [bullseye, bookworm]
distrib: [bullseye, bookworm, jammy]

steps:
- name: Checkout sources
Expand Down

0 comments on commit 9d7be65

Please sign in to comment.