From 5c84997be11a7093632669fe9883da832642e412 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Dec 2023 11:25:22 +0000 Subject: [PATCH 01/29] Bump actions/download-artifact from 3.0.2 to 4.1.0 Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3.0.2 to 4.1.0. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/9bc31d5ccc31df68ecc42ccf4149144866c47d8a...f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/perl-cpan-libraries.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index d2b9bbaff..132b3bfc3 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -282,7 +282,7 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + - uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: name: packages-rpm-${{ matrix.distrib }} path: ./ @@ -302,7 +302,7 @@ jobs: needs: [package] runs-on: ubuntu-22.04 steps: - - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 + - uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: name: packages-deb-bullseye path: ./ From d7a693e8b58bc8ad0b27cf1bae6416b0eb5e393c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Dec 2023 11:25:12 +0000 Subject: [PATCH 02/29] Bump actions/upload-artifact from 3.1.3 to 4.0.0 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.3 to 4.0.0. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/a8a3f3ad30e3422c9c7b888a15615d19a852ae32...c7d193f32edcb7bfad88892161225aeda64e9392) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/perl-cpan-libraries.yml | 2 +- .github/workflows/perl-crypt-argon2.yml | 2 +- .github/workflows/perl-json-path.yml | 2 +- .github/workflows/perl-keepass-reader.yml | 4 ++-- .github/workflows/perl-libssh-session.yml | 2 +- .github/workflows/perl-net-curl.yml | 2 +- .github/workflows/perl-openwsman.yml | 2 +- .github/workflows/plink.yml | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index 132b3bfc3..7932e5342 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -255,7 +255,7 @@ jobs: DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --build $PACKAGE_VERSION --cpan ${{ matrix.name }} shell: bash - - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + - uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 with: name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }} path: ./*.${{ matrix.package_extension }} diff --git a/.github/workflows/perl-crypt-argon2.yml b/.github/workflows/perl-crypt-argon2.yml index 2706c1b74..9b4f86f64 100644 --- a/.github/workflows/perl-crypt-argon2.yml +++ b/.github/workflows/perl-crypt-argon2.yml @@ -118,7 +118,7 @@ jobs: # set condition to true if artifacts are needed - if: ${{ false }} name: Upload package artifacts - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 with: name: packages-${{ matrix.distrib }}-${{ matrix.arch }} path: ./*.${{ matrix.package_extension}} diff --git a/.github/workflows/perl-json-path.yml b/.github/workflows/perl-json-path.yml index 251be4850..da00740b4 100644 --- a/.github/workflows/perl-json-path.yml +++ b/.github/workflows/perl-json-path.yml @@ -108,7 +108,7 @@ jobs: # set condition to true if artifacts are needed - if: ${{ false }} name: Upload package artifacts - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 with: name: packages-${{ matrix.distrib }} path: ./*.${{ matrix.package_extension}} diff --git a/.github/workflows/perl-keepass-reader.yml b/.github/workflows/perl-keepass-reader.yml index f0fb14c34..f1bef5015 100644 --- a/.github/workflows/perl-keepass-reader.yml +++ b/.github/workflows/perl-keepass-reader.yml @@ -104,7 +104,7 @@ jobs: path: ./*.rpm key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} - - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + - uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 with: name: packages-${{ matrix.distrib }} path: ./*.rpm @@ -145,7 +145,7 @@ jobs: path: ./*.deb key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} - - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + - uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 with: name: packages-${{ matrix.distrib }} path: ./*.deb diff --git a/.github/workflows/perl-libssh-session.yml b/.github/workflows/perl-libssh-session.yml index b50b85779..9412794e9 100644 --- a/.github/workflows/perl-libssh-session.yml +++ b/.github/workflows/perl-libssh-session.yml @@ -116,7 +116,7 @@ jobs: # set condition to true if artifacts are needed - if: ${{ false }} name: Upload package artifacts - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 with: name: packages-${{ matrix.distrib }}-${{ matrix.arch }} path: ./*.${{ matrix.package_extension}} diff --git a/.github/workflows/perl-net-curl.yml b/.github/workflows/perl-net-curl.yml index ac184b3cd..d4f13e089 100644 --- a/.github/workflows/perl-net-curl.yml +++ b/.github/workflows/perl-net-curl.yml @@ -116,7 +116,7 @@ jobs: # set condition to true if artifacts are needed - if: ${{ false }} name: Upload package artifacts - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 with: name: packages-${{ matrix.distrib }}-${{ matrix.arch }} path: ./*.${{ matrix.package_extension}} diff --git a/.github/workflows/perl-openwsman.yml b/.github/workflows/perl-openwsman.yml index 82ed23b6e..b3a94b304 100644 --- a/.github/workflows/perl-openwsman.yml +++ b/.github/workflows/perl-openwsman.yml @@ -180,7 +180,7 @@ jobs: # set condition to true if artifacts are needed - if: ${{ false }} name: Upload package artifacts - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 with: name: packages-${{ matrix.distrib }}-${{ matrix.arch }} path: ./*.${{ matrix.package_extension}} diff --git a/.github/workflows/plink.yml b/.github/workflows/plink.yml index ff5429a78..c276bc7c1 100644 --- a/.github/workflows/plink.yml +++ b/.github/workflows/plink.yml @@ -102,7 +102,7 @@ jobs: path: ./*.rpm key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} - - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + - uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 with: name: packages-${{ matrix.distrib }} path: ./*.rpm From a40986de3fb22a4145c4e12f6144406d8e402fa2 Mon Sep 17 00:00:00 2001 From: Paul Oureib Date: Thu, 1 Feb 2024 15:34:08 +0100 Subject: [PATCH 03/29] updated actions --- .github/actions/package-nfpm/action.yml | 2 +- .github/actions/package/action.yml | 2 +- .github/workflows/perl-cpan-libraries.yml | 6 +++--- .github/workflows/perl-crypt-argon2.yml | 2 +- .github/workflows/perl-json-path.yml | 2 +- .github/workflows/perl-keepass-reader.yml | 4 ++-- .github/workflows/perl-libssh-session.yml | 2 +- .github/workflows/perl-net-curl.yml | 2 +- .github/workflows/perl-openwsman.yml | 2 +- .github/workflows/plink.yml | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/actions/package-nfpm/action.yml b/.github/actions/package-nfpm/action.yml index 50bc05e38..5aa9d0a69 100644 --- a/.github/actions/package-nfpm/action.yml +++ b/.github/actions/package-nfpm/action.yml @@ -113,7 +113,7 @@ runs: # Update if condition to true to get packages as artifacts - if: ${{ false }} name: Upload package artifacts - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: name: packages-${{ inputs.distrib }} path: ./*.${{ inputs.package_extension}} diff --git a/.github/actions/package/action.yml b/.github/actions/package/action.yml index f8e5d685f..114178f3d 100644 --- a/.github/actions/package/action.yml +++ b/.github/actions/package/action.yml @@ -72,7 +72,7 @@ runs: shell: bash - name: Upload package artifacts - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: name: packages-${{ inputs.distrib }} path: ./*.${{ inputs.package_extension }} diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index 7932e5342..9a5df2dd3 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -255,7 +255,7 @@ jobs: DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --build $PACKAGE_VERSION --cpan ${{ matrix.name }} shell: bash - - uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 + - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }} path: ./*.${{ matrix.package_extension }} @@ -282,7 +282,7 @@ jobs: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 + - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 with: name: packages-rpm-${{ matrix.distrib }} path: ./ @@ -302,7 +302,7 @@ jobs: needs: [package] runs-on: ubuntu-22.04 steps: - - uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 + - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 with: name: packages-deb-bullseye path: ./ diff --git a/.github/workflows/perl-crypt-argon2.yml b/.github/workflows/perl-crypt-argon2.yml index 9b4f86f64..bce1d7415 100644 --- a/.github/workflows/perl-crypt-argon2.yml +++ b/.github/workflows/perl-crypt-argon2.yml @@ -118,7 +118,7 @@ jobs: # set condition to true if artifacts are needed - if: ${{ false }} name: Upload package artifacts - uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: name: packages-${{ matrix.distrib }}-${{ matrix.arch }} path: ./*.${{ matrix.package_extension}} diff --git a/.github/workflows/perl-json-path.yml b/.github/workflows/perl-json-path.yml index da00740b4..bb5adc4a7 100644 --- a/.github/workflows/perl-json-path.yml +++ b/.github/workflows/perl-json-path.yml @@ -108,7 +108,7 @@ jobs: # set condition to true if artifacts are needed - if: ${{ false }} name: Upload package artifacts - uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: name: packages-${{ matrix.distrib }} path: ./*.${{ matrix.package_extension}} diff --git a/.github/workflows/perl-keepass-reader.yml b/.github/workflows/perl-keepass-reader.yml index f1bef5015..1274b533d 100644 --- a/.github/workflows/perl-keepass-reader.yml +++ b/.github/workflows/perl-keepass-reader.yml @@ -104,7 +104,7 @@ jobs: path: ./*.rpm key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} - - uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 + - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: name: packages-${{ matrix.distrib }} path: ./*.rpm @@ -145,7 +145,7 @@ jobs: path: ./*.deb key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} - - uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 + - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: name: packages-${{ matrix.distrib }} path: ./*.deb diff --git a/.github/workflows/perl-libssh-session.yml b/.github/workflows/perl-libssh-session.yml index 9412794e9..44b2051ed 100644 --- a/.github/workflows/perl-libssh-session.yml +++ b/.github/workflows/perl-libssh-session.yml @@ -116,7 +116,7 @@ jobs: # set condition to true if artifacts are needed - if: ${{ false }} name: Upload package artifacts - uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: name: packages-${{ matrix.distrib }}-${{ matrix.arch }} path: ./*.${{ matrix.package_extension}} diff --git a/.github/workflows/perl-net-curl.yml b/.github/workflows/perl-net-curl.yml index d4f13e089..e19efeb9f 100644 --- a/.github/workflows/perl-net-curl.yml +++ b/.github/workflows/perl-net-curl.yml @@ -116,7 +116,7 @@ jobs: # set condition to true if artifacts are needed - if: ${{ false }} name: Upload package artifacts - uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: name: packages-${{ matrix.distrib }}-${{ matrix.arch }} path: ./*.${{ matrix.package_extension}} diff --git a/.github/workflows/perl-openwsman.yml b/.github/workflows/perl-openwsman.yml index b3a94b304..3e74e157a 100644 --- a/.github/workflows/perl-openwsman.yml +++ b/.github/workflows/perl-openwsman.yml @@ -180,7 +180,7 @@ jobs: # set condition to true if artifacts are needed - if: ${{ false }} name: Upload package artifacts - uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 + uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: name: packages-${{ matrix.distrib }}-${{ matrix.arch }} path: ./*.${{ matrix.package_extension}} diff --git a/.github/workflows/plink.yml b/.github/workflows/plink.yml index c276bc7c1..36f3f4548 100644 --- a/.github/workflows/plink.yml +++ b/.github/workflows/plink.yml @@ -102,7 +102,7 @@ jobs: path: ./*.rpm key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} - - uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 + - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: name: packages-${{ matrix.distrib }} path: ./*.rpm From e9f4582045dd13a5e7747d01fbe810e31ac6e100 Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 08:27:44 +0100 Subject: [PATCH 04/29] use merge-artifacts action in perl-cpan-libraries --- .github/actions/merge-artifacts/action.yml | 65 ++++++++++++++++++++++ .github/workflows/perl-cpan-libraries.yml | 44 ++++++++++++++- 2 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 .github/actions/merge-artifacts/action.yml diff --git a/.github/actions/merge-artifacts/action.yml b/.github/actions/merge-artifacts/action.yml new file mode 100644 index 000000000..4717619fd --- /dev/null +++ b/.github/actions/merge-artifacts/action.yml @@ -0,0 +1,65 @@ +name: 'Merge Artifacts' +description: 'Merge Artifacts' +inputs: + target_name: + description: 'The name of the result artifact' + required: true + source_paths: + description: 'The path to the files that will be uplaoded' + required: true + source_name_pattern: + description: "Artifact's pattern to be merged" + required: true + github_token: + description: 'The Github Token to use' + required: true + +runs: + using: 'composite' + steps: + - name: Download ${{ matrix.type_of_report }} Artifacts + uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 + with: + pattern: ${{ inputs.source_name_pattern }}* + path: ${{ inputs.target_name }} + merge-multiple: true + + - name: Upload the Regrouped Artifact + uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 + with: + name: ${{ inputs.target_name }} + path: | + ${{ inputs.source_paths }} + retention-days: 1 + + - name: Delete ${{ matrix.type_of_report }} Artifacts + run: | + artifact_pattern="${{ inputs.source_name_pattern }}" + TOKEN="${{ inputs.github_token }}" + artifact_exists=true + while [ "$artifact_exists" = true ]; do + artifact_exists=false + artifacts_response=$(curl -L \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $TOKEN" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/${{ github.repository }}/actions/artifacts?per_page=100") + artifacts=$(echo $artifacts_response | jq -c '.artifacts[]') + echo "Those are the artifacts : $artifacts" + while read row; do + artifact_name=$(echo "$row" | jq -r '.name') + if [[ "$artifact_name" =~ ^.*"$artifact_pattern".* ]]; then + artifact_exists=true + echo "Deleting : $artifact_name" + artifact_id=$(echo "$row" | jq -r '.id') + curl -L \ + -X DELETE \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $TOKEN" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/${{ github.repository }}/actions/artifacts/${artifact_id}" + fi + done <<< "$artifacts" + done + echo "End of Deleting" + shell: bash diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index 19f4f2640..b8c19d512 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -202,10 +202,30 @@ jobs: - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: - name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }} + name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ matrix.name }} path: ./*.${{ matrix.package_extension }} retention-days: 1 + merge-package-rpm-artifacts: + needs: [package-rpm] + + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + distrib: [el8, el9] + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Merging Artifacts + uses: ./.github/actions/merge-artifacts + with: + target_name: packages-rpm-${{ matrix.distrib }} + source_paths: packages-rpm-${{ matrix.distrib }}/*.rpm + source_name_pattern: packages-rpm-${{ matrix.distrib }}- + github_token: ${{ secrets.GITHUB_TOKEN }} + package-deb: needs: [get-environment] if: ${{ needs.get-environment.outputs.stability != 'stable' }} @@ -347,10 +367,30 @@ jobs: - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: - name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }} + name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ matrix.name }} path: ./*.${{ matrix.package_extension }} retention-days: 1 + merge-package-deb-artifacts: + needs: [package-deb] + + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + distrib: [bullseye, bookworm, jammy] + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Merging Artifacts + uses: ./.github/actions/merge-artifacts + with: + target_name: packages-deb-${{ matrix.distrib }} + source_paths: packages-deb-${{ matrix.distrib }}/*.deb + source_name_pattern: packages-deb-${{ matrix.distrib }}- + github_token: ${{ secrets.GITHUB_TOKEN }} + sign-rpm: needs: [package-rpm] From 17b84c077ddb7dbf032781843c48d9ddf4f8c3ba Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 08:43:12 +0100 Subject: [PATCH 05/29] use merge-artifacts action in perl-cpan-libraries --- .github/workflows/perl-cpan-libraries.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index b8c19d512..8d43dada3 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -200,9 +200,18 @@ jobs: cp -r ~/rpmbuild/RPMS/noarch/*.rpm . shell: bash + - 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 + - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 with: - name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ matrix.name }} + name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ steps.package-name.outputs.name_with_dash }} path: ./*.${{ matrix.package_extension }} retention-days: 1 @@ -365,9 +374,18 @@ jobs: DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --build $PACKAGE_VERSION --cpan ${{ matrix.name }} shell: bash + - 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 + - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: - name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ matrix.name }} + name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ steps.package-name.outputs.name_with_dash}} path: ./*.${{ matrix.package_extension }} retention-days: 1 From a2067bfbef417554d9d26da1a31dad17d8363d83 Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 09:11:18 +0100 Subject: [PATCH 06/29] adapt download-artifacts action in perl-cpan-libraries --- .github/workflows/perl-cpan-libraries.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index 8d43dada3..9c64eb736 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -410,7 +410,7 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} sign-rpm: - needs: [package-rpm] + needs: [package-rpm,merge-package-rpm-artifacts] runs-on: ubuntu-22.04 strategy: @@ -447,7 +447,7 @@ jobs: key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} download-and-cache-deb: - needs: [package-deb] + needs: [package-deb,merge-package-deb-artifacts] runs-on: ubuntu-22.04 strategy: matrix: From a077d95bdf81ec05cc65ed7d301bf75f0dcc6d72 Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 09:12:39 +0100 Subject: [PATCH 07/29] fix yaml lint --- .github/workflows/perl-cpan-libraries.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index 9c64eb736..8089faddb 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -410,7 +410,7 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} sign-rpm: - needs: [package-rpm,merge-package-rpm-artifacts] + needs: [package-rpm, merge-package-rpm-artifacts] runs-on: ubuntu-22.04 strategy: @@ -447,7 +447,7 @@ jobs: key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} download-and-cache-deb: - needs: [package-deb,merge-package-deb-artifacts] + needs: [package-deb, merge-package-deb-artifacts] runs-on: ubuntu-22.04 strategy: matrix: From f256ebfafaae6fdb3ce6da16222be903dd36dc26 Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 09:22:52 +0100 Subject: [PATCH 08/29] focus only on rpm --- .github/workflows/perl-cpan-libraries.yml | 344 +++++++++++----------- 1 file changed, 172 insertions(+), 172 deletions(-) diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index 8089faddb..4614e9022 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -235,179 +235,179 @@ jobs: source_name_pattern: packages-rpm-${{ matrix.distrib }}- github_token: ${{ secrets.GITHUB_TOKEN }} - package-deb: - needs: [get-environment] - if: ${{ needs.get-environment.outputs.stability != 'stable' }} + # package-deb: + # needs: [get-environment] + # if: ${{ needs.get-environment.outputs.stability != 'stable' }} - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - matrix: - distrib: [bullseye, bookworm, jammy] - name: - [ - "Authen::SASL::SASLprep", - "Authen::SCRAM::Client", - "boolean", - "Carp::Assert", - "Clone", - "Clone::Choose", - "common::sense", - "Convert::EBCDIC", - "Crypt::Blowfish_PP", - "DateTime::Format::Duration::ISO8601", - "Device::Modbus", - "Digest::MD5::File", - "Digest::SHA1", - "Email::Send::SMTP::Gmail", - "FFI::CheckLib", - "File::SearchPath", - "Hash::Merge", - "Hash::Ordered", - "HTTP::Daemon", - "HTTP::Daemon::SSL", - "HTTP::ProxyPAC", - "JMX::Jmx4Perl", - "JSON::Parse", - "JSON::WebToken", - "LV", - "MIME::Types", - "MongoDB", - "Net::FTPSSL", - "Net::HTTPTunnel", - "Net::NTP", - "Net::SMTPS", - "Net::SMTP_auth", - "Net::Subnet", - "Net::TFTP", - "PBKDF2::Tiny", - "Schedule::Cron", - "Statistics::Descriptive", - "Statistics::Regression", - "Sys::SigAction", - "Term::Clui", - "Term::ShellUI", - "Unicode::Stringprep", - "URI::Encode", - "URI::Template", - "URL::Encode", - "UUID::URandom", - "WWW::Selenium", - "XML::Filter::BufferText", - "XML::LibXML::Simple", - "XML::SAX::Writer", - "ZMQ::Constants", - "ZMQ::LibZMQ4" - ] - include: - - 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 - - name: "DateTime::Format::Duration::ISO8601" - - name: "Statistics::Regression" - version: "0.53" - - name: "ZMQ::Constants" - - name: "ZMQ::LibZMQ4" - use_dh_make_perl: "false" - version: "0.01" - deb_dependencies: "libzmq5" - name: package ${{ matrix.distrib }} ${{ matrix.name }} - container: - image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest - credentials: - username: ${{ secrets.DOCKER_REGISTRY_ID }} - password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} + # runs-on: ubuntu-22.04 + # strategy: + # fail-fast: false + # matrix: + # distrib: [bullseye, bookworm, jammy] + # name: + # [ + # "Authen::SASL::SASLprep", + # "Authen::SCRAM::Client", + # "boolean", + # "Carp::Assert", + # "Clone", + # "Clone::Choose", + # "common::sense", + # "Convert::EBCDIC", + # "Crypt::Blowfish_PP", + # "DateTime::Format::Duration::ISO8601", + # "Device::Modbus", + # "Digest::MD5::File", + # "Digest::SHA1", + # "Email::Send::SMTP::Gmail", + # "FFI::CheckLib", + # "File::SearchPath", + # "Hash::Merge", + # "Hash::Ordered", + # "HTTP::Daemon", + # "HTTP::Daemon::SSL", + # "HTTP::ProxyPAC", + # "JMX::Jmx4Perl", + # "JSON::Parse", + # "JSON::WebToken", + # "LV", + # "MIME::Types", + # "MongoDB", + # "Net::FTPSSL", + # "Net::HTTPTunnel", + # "Net::NTP", + # "Net::SMTPS", + # "Net::SMTP_auth", + # "Net::Subnet", + # "Net::TFTP", + # "PBKDF2::Tiny", + # "Schedule::Cron", + # "Statistics::Descriptive", + # "Statistics::Regression", + # "Sys::SigAction", + # "Term::Clui", + # "Term::ShellUI", + # "Unicode::Stringprep", + # "URI::Encode", + # "URI::Template", + # "URL::Encode", + # "UUID::URandom", + # "WWW::Selenium", + # "XML::Filter::BufferText", + # "XML::LibXML::Simple", + # "XML::SAX::Writer", + # "ZMQ::Constants", + # "ZMQ::LibZMQ4" + # ] + # include: + # - 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 + # - name: "DateTime::Format::Duration::ISO8601" + # - name: "Statistics::Regression" + # version: "0.53" + # - name: "ZMQ::Constants" + # - name: "ZMQ::LibZMQ4" + # use_dh_make_perl: "false" + # version: "0.01" + # deb_dependencies: "libzmq5" + # name: package ${{ matrix.distrib }} ${{ matrix.name }} + # container: + # image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest + # credentials: + # username: ${{ secrets.DOCKER_REGISTRY_ID }} + # password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + # steps: + # - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'false' }} - run: | - apt update - apt install -y cpanminus ruby libcurl4-openssl-dev libssh-dev uuid-dev libczmq-dev + # - if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'false' }} + # run: | + # apt update + # apt install -y cpanminus ruby libcurl4-openssl-dev libssh-dev uuid-dev libczmq-dev - PACKAGE_NAME=`echo ${{ matrix.name }} | sed -e 's/::/-/g' | tr '[A-Z]' '[a-z]' | sed -e 's/^/lib/g' | sed -e 's/$/-perl/g' | sed -e 's/liblib/lib/g'` - if [ -z "${{ matrix.version }}" ]; then - PACKAGE_VERSION="" - else - PACKAGE_VERSION=" -v ${{ matrix.version }}" - fi + # PACKAGE_NAME=`echo ${{ matrix.name }} | sed -e 's/::/-/g' | tr '[A-Z]' '[a-z]' | sed -e 's/^/lib/g' | sed -e 's/$/-perl/g' | sed -e 's/liblib/lib/g'` + # if [ -z "${{ matrix.version }}" ]; then + # PACKAGE_VERSION="" + # else + # PACKAGE_VERSION=" -v ${{ matrix.version }}" + # fi - 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.deb_dependencies }}" ]; then + # PACKAGE_DEPENDENCIES="" + # else + # for PACKAGE_DEPENDENCY in `echo ${{ matrix.deb_dependencies }}`; do + # PACKAGE_DEPENDENCIES="$PACKAGE_DEPENDENCIES --depends $PACKAGE_DEPENDENCY" + # done + # fi - cpanm Module::Build::Tiny - cpanm Module::Install + # cpanm Module::Build::Tiny + # cpanm Module::Install - gem install fpm - fpm -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test -n $PACKAGE_NAME$PACKAGE_DEPENDENCIES$PACKAGE_VERSION ${{ matrix.name }} - shell: bash + # gem install fpm + # fpm -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test -n $PACKAGE_NAME$PACKAGE_DEPENDENCIES$PACKAGE_VERSION ${{ matrix.name }} + # shell: bash - - if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'true' }} - run: | - apt update - apt install -y cpanminus libcurl4-openssl-dev dh-make-perl libssh-dev uuid-dev libczmq-dev libmodule-install-perl + # - if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'true' }} + # run: | + # apt update + # apt install -y cpanminus libcurl4-openssl-dev dh-make-perl libssh-dev uuid-dev libczmq-dev libmodule-install-perl - if [ -z "${{ matrix.version }}" ]; then - PACKAGE_VERSION="" - else - PACKAGE_VERSION="--version ${{ matrix.version }}-${{ matrix.distrib }}" - fi + # if [ -z "${{ matrix.version }}" ]; then + # PACKAGE_VERSION="" + # else + # PACKAGE_VERSION="--version ${{ matrix.version }}-${{ matrix.distrib }}" + # fi - DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --build $PACKAGE_VERSION --cpan ${{ matrix.name }} - shell: bash + # DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --build $PACKAGE_VERSION --cpan ${{ matrix.name }} + # shell: bash - - 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 + # - 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 - - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 - with: - name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ steps.package-name.outputs.name_with_dash}} - path: ./*.${{ matrix.package_extension }} - retention-days: 1 + # - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.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-deb-artifacts: - needs: [package-deb] + # merge-package-deb-artifacts: + # needs: [package-deb] - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - matrix: - distrib: [bullseye, bookworm, jammy] + # runs-on: ubuntu-22.04 + # strategy: + # fail-fast: false + # matrix: + # distrib: [bullseye, bookworm, jammy] - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + # steps: + # - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Merging Artifacts - uses: ./.github/actions/merge-artifacts - with: - target_name: packages-deb-${{ matrix.distrib }} - source_paths: packages-deb-${{ matrix.distrib }}/*.deb - source_name_pattern: packages-deb-${{ matrix.distrib }}- - github_token: ${{ secrets.GITHUB_TOKEN }} + # - name: Merging Artifacts + # uses: ./.github/actions/merge-artifacts + # with: + # target_name: packages-deb-${{ matrix.distrib }} + # source_paths: packages-deb-${{ matrix.distrib }}/*.deb + # source_name_pattern: packages-deb-${{ matrix.distrib }}- + # github_token: ${{ secrets.GITHUB_TOKEN }} sign-rpm: needs: [package-rpm, merge-package-rpm-artifacts] @@ -446,22 +446,22 @@ jobs: path: ./*.rpm key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} - download-and-cache-deb: - needs: [package-deb, merge-package-deb-artifacts] - runs-on: ubuntu-22.04 - strategy: - matrix: - distrib: [bullseye, bookworm, jammy] - steps: - - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 - with: - name: packages-deb-${{ matrix.distrib }} - path: ./ + # download-and-cache-deb: + # needs: [package-deb, merge-package-deb-artifacts] + # runs-on: ubuntu-22.04 + # strategy: + # matrix: + # distrib: [bullseye, bookworm, jammy] + # steps: + # - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 + # with: + # name: packages-deb-${{ matrix.distrib }} + # path: ./ - - uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 - with: - path: ./*.deb - key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} + # - uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + # with: + # path: ./*.deb + # key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} deliver-rpm: needs: [get-environment, sign-rpm] From d9826fd2b77fde707e7015032645730aaea81439 Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 09:23:50 +0100 Subject: [PATCH 09/29] focus only on rpm --- .github/workflows/perl-cpan-libraries.yml | 36 +++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index 4614e9022..e15b4426c 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -485,27 +485,27 @@ jobs: cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} stability: ${{ needs.get-environment.outputs.stability }} - deliver-deb: - needs: [get-environment, download-and-cache-deb] - if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }} - runs-on: [self-hosted, common] + # deliver-deb: + # needs: [get-environment, download-and-cache-deb] + # if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }} + # runs-on: [self-hosted, common] - strategy: - matrix: - distrib: [bullseye, bookworm, jammy] + # strategy: + # matrix: + # distrib: [bullseye, bookworm, jammy] - steps: - - name: Checkout sources - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + # steps: + # - name: Checkout sources + # uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Delivery - uses: ./.github/actions/deb-delivery - with: - module_name: perl-cpan-libraries - distrib: ${{ matrix.distrib }} - artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} - cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} - stability: ${{ needs.get-environment.outputs.stability }} + # - name: Delivery + # uses: ./.github/actions/deb-delivery + # with: + # module_name: perl-cpan-libraries + # distrib: ${{ matrix.distrib }} + # artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} + # cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} + # stability: ${{ needs.get-environment.outputs.stability }} promote: needs: [get-environment] From f6caa99a955f1028958c792c976a9addc3b9b0ed Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 09:34:46 +0100 Subject: [PATCH 10/29] focus only on rpm --- .github/actions/merge-artifacts/action.yml | 4 ++-- .github/workflows/perl-cpan-libraries.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/merge-artifacts/action.yml b/.github/actions/merge-artifacts/action.yml index 4717619fd..a213c8fa3 100644 --- a/.github/actions/merge-artifacts/action.yml +++ b/.github/actions/merge-artifacts/action.yml @@ -17,7 +17,7 @@ inputs: runs: using: 'composite' steps: - - name: Download ${{ matrix.type_of_report }} Artifacts + - name: Download Artifacts uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: pattern: ${{ inputs.source_name_pattern }}* @@ -32,7 +32,7 @@ runs: ${{ inputs.source_paths }} retention-days: 1 - - name: Delete ${{ matrix.type_of_report }} Artifacts + - name: Delete Artifacts run: | artifact_pattern="${{ inputs.source_name_pattern }}" TOKEN="${{ inputs.github_token }}" diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index e15b4426c..f5252de1b 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -231,7 +231,7 @@ jobs: uses: ./.github/actions/merge-artifacts with: target_name: packages-rpm-${{ matrix.distrib }} - source_paths: packages-rpm-${{ matrix.distrib }}/*.rpm + source_paths: packages-rpm-${{ matrix.distrib }}/ source_name_pattern: packages-rpm-${{ matrix.distrib }}- github_token: ${{ secrets.GITHUB_TOKEN }} From 4fc642ac7f27828b057668ce5797463d81ac29d9 Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 09:50:48 +0100 Subject: [PATCH 11/29] rpm and deb --- .github/workflows/perl-cpan-libraries.yml | 408 +++++++++++----------- 1 file changed, 204 insertions(+), 204 deletions(-) diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index f5252de1b..4592e1fc8 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -215,6 +215,160 @@ jobs: path: ./*.${{ matrix.package_extension }} retention-days: 1 + package-deb: + needs: [get-environment] + if: ${{ needs.get-environment.outputs.stability != 'stable' }} + + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + distrib: [bullseye, bookworm, jammy] + name: + [ + "Authen::SASL::SASLprep", + "Authen::SCRAM::Client", + "boolean", + "Carp::Assert", + "Clone", + "Clone::Choose", + "common::sense", + "Convert::EBCDIC", + "Crypt::Blowfish_PP", + "DateTime::Format::Duration::ISO8601", + "Device::Modbus", + "Digest::MD5::File", + "Digest::SHA1", + "Email::Send::SMTP::Gmail", + "FFI::CheckLib", + "File::SearchPath", + "Hash::Merge", + "Hash::Ordered", + "HTTP::Daemon", + "HTTP::Daemon::SSL", + "HTTP::ProxyPAC", + "JMX::Jmx4Perl", + "JSON::Parse", + "JSON::WebToken", + "LV", + "MIME::Types", + "MongoDB", + "Net::FTPSSL", + "Net::HTTPTunnel", + "Net::NTP", + "Net::SMTPS", + "Net::SMTP_auth", + "Net::Subnet", + "Net::TFTP", + "PBKDF2::Tiny", + "Schedule::Cron", + "Statistics::Descriptive", + "Statistics::Regression", + "Sys::SigAction", + "Term::Clui", + "Term::ShellUI", + "Unicode::Stringprep", + "URI::Encode", + "URI::Template", + "URL::Encode", + "UUID::URandom", + "WWW::Selenium", + "XML::Filter::BufferText", + "XML::LibXML::Simple", + "XML::SAX::Writer", + "ZMQ::Constants", + "ZMQ::LibZMQ4" + ] + include: + - 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 + - name: "DateTime::Format::Duration::ISO8601" + - name: "Statistics::Regression" + version: "0.53" + - name: "ZMQ::Constants" + - name: "ZMQ::LibZMQ4" + use_dh_make_perl: "false" + version: "0.01" + deb_dependencies: "libzmq5" + name: package ${{ matrix.distrib }} ${{ matrix.name }} + container: + image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest + credentials: + username: ${{ secrets.DOCKER_REGISTRY_ID }} + password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} + + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'false' }} + run: | + apt update + apt install -y cpanminus ruby libcurl4-openssl-dev libssh-dev uuid-dev libczmq-dev + + PACKAGE_NAME=`echo ${{ matrix.name }} | sed -e 's/::/-/g' | tr '[A-Z]' '[a-z]' | sed -e 's/^/lib/g' | sed -e 's/$/-perl/g' | sed -e 's/liblib/lib/g'` + if [ -z "${{ matrix.version }}" ]; then + PACKAGE_VERSION="" + else + PACKAGE_VERSION=" -v ${{ matrix.version }}" + fi + + 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 + + cpanm Module::Build::Tiny + cpanm Module::Install + + gem install fpm + fpm -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test -n $PACKAGE_NAME$PACKAGE_DEPENDENCIES$PACKAGE_VERSION ${{ matrix.name }} + shell: bash + + - if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'true' }} + run: | + apt update + apt install -y cpanminus libcurl4-openssl-dev dh-make-perl libssh-dev uuid-dev libczmq-dev libmodule-install-perl + + if [ -z "${{ matrix.version }}" ]; then + PACKAGE_VERSION="" + else + PACKAGE_VERSION="--version ${{ matrix.version }}-${{ matrix.distrib }}" + fi + + DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --build $PACKAGE_VERSION --cpan ${{ matrix.name }} + shell: bash + + - 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 + + - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.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: [package-rpm] @@ -231,183 +385,29 @@ jobs: uses: ./.github/actions/merge-artifacts with: target_name: packages-rpm-${{ matrix.distrib }} - source_paths: packages-rpm-${{ matrix.distrib }}/ + source_paths: packages-rpm-${{ matrix.distrib }}/*.rpm source_name_pattern: packages-rpm-${{ matrix.distrib }}- github_token: ${{ secrets.GITHUB_TOKEN }} - # package-deb: - # needs: [get-environment] - # if: ${{ needs.get-environment.outputs.stability != 'stable' }} + merge-package-deb-artifacts: + needs: [package-deb] - # runs-on: ubuntu-22.04 - # strategy: - # fail-fast: false - # matrix: - # distrib: [bullseye, bookworm, jammy] - # name: - # [ - # "Authen::SASL::SASLprep", - # "Authen::SCRAM::Client", - # "boolean", - # "Carp::Assert", - # "Clone", - # "Clone::Choose", - # "common::sense", - # "Convert::EBCDIC", - # "Crypt::Blowfish_PP", - # "DateTime::Format::Duration::ISO8601", - # "Device::Modbus", - # "Digest::MD5::File", - # "Digest::SHA1", - # "Email::Send::SMTP::Gmail", - # "FFI::CheckLib", - # "File::SearchPath", - # "Hash::Merge", - # "Hash::Ordered", - # "HTTP::Daemon", - # "HTTP::Daemon::SSL", - # "HTTP::ProxyPAC", - # "JMX::Jmx4Perl", - # "JSON::Parse", - # "JSON::WebToken", - # "LV", - # "MIME::Types", - # "MongoDB", - # "Net::FTPSSL", - # "Net::HTTPTunnel", - # "Net::NTP", - # "Net::SMTPS", - # "Net::SMTP_auth", - # "Net::Subnet", - # "Net::TFTP", - # "PBKDF2::Tiny", - # "Schedule::Cron", - # "Statistics::Descriptive", - # "Statistics::Regression", - # "Sys::SigAction", - # "Term::Clui", - # "Term::ShellUI", - # "Unicode::Stringprep", - # "URI::Encode", - # "URI::Template", - # "URL::Encode", - # "UUID::URandom", - # "WWW::Selenium", - # "XML::Filter::BufferText", - # "XML::LibXML::Simple", - # "XML::SAX::Writer", - # "ZMQ::Constants", - # "ZMQ::LibZMQ4" - # ] - # include: - # - 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 - # - name: "DateTime::Format::Duration::ISO8601" - # - name: "Statistics::Regression" - # version: "0.53" - # - name: "ZMQ::Constants" - # - name: "ZMQ::LibZMQ4" - # use_dh_make_perl: "false" - # version: "0.01" - # deb_dependencies: "libzmq5" - # name: package ${{ matrix.distrib }} ${{ matrix.name }} - # container: - # image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest - # credentials: - # username: ${{ secrets.DOCKER_REGISTRY_ID }} - # password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + distrib: [bullseye, bookworm, jammy] - # steps: - # - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - # - if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'false' }} - # run: | - # apt update - # apt install -y cpanminus ruby libcurl4-openssl-dev libssh-dev uuid-dev libczmq-dev - - # PACKAGE_NAME=`echo ${{ matrix.name }} | sed -e 's/::/-/g' | tr '[A-Z]' '[a-z]' | sed -e 's/^/lib/g' | sed -e 's/$/-perl/g' | sed -e 's/liblib/lib/g'` - # if [ -z "${{ matrix.version }}" ]; then - # PACKAGE_VERSION="" - # else - # PACKAGE_VERSION=" -v ${{ matrix.version }}" - # fi - - # 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 - - # cpanm Module::Build::Tiny - # cpanm Module::Install - - # gem install fpm - # fpm -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test -n $PACKAGE_NAME$PACKAGE_DEPENDENCIES$PACKAGE_VERSION ${{ matrix.name }} - # shell: bash - - # - if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'true' }} - # run: | - # apt update - # apt install -y cpanminus libcurl4-openssl-dev dh-make-perl libssh-dev uuid-dev libczmq-dev libmodule-install-perl - - # if [ -z "${{ matrix.version }}" ]; then - # PACKAGE_VERSION="" - # else - # PACKAGE_VERSION="--version ${{ matrix.version }}-${{ matrix.distrib }}" - # fi - - # DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --build $PACKAGE_VERSION --cpan ${{ matrix.name }} - # shell: bash - - # - 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 - - # - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.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-deb-artifacts: - # needs: [package-deb] - - # runs-on: ubuntu-22.04 - # strategy: - # fail-fast: false - # matrix: - # distrib: [bullseye, bookworm, jammy] - - # steps: - # - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - # - name: Merging Artifacts - # uses: ./.github/actions/merge-artifacts - # with: - # target_name: packages-deb-${{ matrix.distrib }} - # source_paths: packages-deb-${{ matrix.distrib }}/*.deb - # source_name_pattern: packages-deb-${{ matrix.distrib }}- - # github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Merging Artifacts + uses: ./.github/actions/merge-artifacts + with: + target_name: packages-deb-${{ matrix.distrib }} + source_paths: packages-deb-${{ matrix.distrib }}/*.deb + source_name_pattern: packages-deb-${{ matrix.distrib }}- + github_token: ${{ secrets.GITHUB_TOKEN }} sign-rpm: needs: [package-rpm, merge-package-rpm-artifacts] @@ -446,22 +446,22 @@ jobs: path: ./*.rpm key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} - # download-and-cache-deb: - # needs: [package-deb, merge-package-deb-artifacts] - # runs-on: ubuntu-22.04 - # strategy: - # matrix: - # distrib: [bullseye, bookworm, jammy] - # steps: - # - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 - # with: - # name: packages-deb-${{ matrix.distrib }} - # path: ./ + download-and-cache-deb: + needs: [package-deb, merge-package-deb-artifacts] + runs-on: ubuntu-22.04 + strategy: + matrix: + distrib: [bullseye, bookworm, jammy] + steps: + - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 + with: + name: packages-deb-${{ matrix.distrib }} + path: ./ - # - uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 - # with: - # path: ./*.deb - # key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} + - uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + with: + path: ./*.deb + key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} deliver-rpm: needs: [get-environment, sign-rpm] @@ -485,27 +485,27 @@ jobs: cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} stability: ${{ needs.get-environment.outputs.stability }} - # deliver-deb: - # needs: [get-environment, download-and-cache-deb] - # if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }} - # runs-on: [self-hosted, common] + deliver-deb: + needs: [get-environment, download-and-cache-deb] + if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }} + runs-on: [self-hosted, common] - # strategy: - # matrix: - # distrib: [bullseye, bookworm, jammy] + strategy: + matrix: + distrib: [bullseye, bookworm, jammy] - # steps: - # - name: Checkout sources - # uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + steps: + - name: Checkout sources + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - # - name: Delivery - # uses: ./.github/actions/deb-delivery - # with: - # module_name: perl-cpan-libraries - # distrib: ${{ matrix.distrib }} - # artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} - # cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} - # stability: ${{ needs.get-environment.outputs.stability }} + - name: Delivery + uses: ./.github/actions/deb-delivery + with: + module_name: perl-cpan-libraries + distrib: ${{ matrix.distrib }} + artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} + cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} + stability: ${{ needs.get-environment.outputs.stability }} promote: needs: [get-environment] From 0db4210d0a2eb78c9a2da577afaa63f08c7b65ba Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 10:05:42 +0100 Subject: [PATCH 12/29] remove fail-fast --- .github/workflows/perl-cpan-libraries.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index 4592e1fc8..944e71d6f 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -374,7 +374,6 @@ jobs: runs-on: ubuntu-22.04 strategy: - fail-fast: false matrix: distrib: [el8, el9] @@ -394,7 +393,6 @@ jobs: runs-on: ubuntu-22.04 strategy: - fail-fast: false matrix: distrib: [bullseye, bookworm, jammy] From cd44c7dac48d7dfeb65864f0f92bf74b7906a340 Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 10:13:55 +0100 Subject: [PATCH 13/29] wait merging deb artifacts than start rpm --- .github/workflows/perl-cpan-libraries.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index 944e71d6f..ee37b435e 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -370,7 +370,7 @@ jobs: retention-days: 1 merge-package-rpm-artifacts: - needs: [package-rpm] + needs: [package-rpm, merge-package-deb-artifacts] runs-on: ubuntu-22.04 strategy: From 2e7abd702eccacefa442dea39b9f0deeb3b94e1f Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 10:22:45 +0100 Subject: [PATCH 14/29] only rpm --- .github/workflows/perl-cpan-libraries.yml | 380 +++++++++++----------- 1 file changed, 190 insertions(+), 190 deletions(-) diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index ee37b435e..fe0d77e92 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -215,162 +215,162 @@ jobs: path: ./*.${{ matrix.package_extension }} retention-days: 1 - package-deb: - needs: [get-environment] - if: ${{ needs.get-environment.outputs.stability != 'stable' }} + # package-deb: + # needs: [get-environment] + # if: ${{ needs.get-environment.outputs.stability != 'stable' }} - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - matrix: - distrib: [bullseye, bookworm, jammy] - name: - [ - "Authen::SASL::SASLprep", - "Authen::SCRAM::Client", - "boolean", - "Carp::Assert", - "Clone", - "Clone::Choose", - "common::sense", - "Convert::EBCDIC", - "Crypt::Blowfish_PP", - "DateTime::Format::Duration::ISO8601", - "Device::Modbus", - "Digest::MD5::File", - "Digest::SHA1", - "Email::Send::SMTP::Gmail", - "FFI::CheckLib", - "File::SearchPath", - "Hash::Merge", - "Hash::Ordered", - "HTTP::Daemon", - "HTTP::Daemon::SSL", - "HTTP::ProxyPAC", - "JMX::Jmx4Perl", - "JSON::Parse", - "JSON::WebToken", - "LV", - "MIME::Types", - "MongoDB", - "Net::FTPSSL", - "Net::HTTPTunnel", - "Net::NTP", - "Net::SMTPS", - "Net::SMTP_auth", - "Net::Subnet", - "Net::TFTP", - "PBKDF2::Tiny", - "Schedule::Cron", - "Statistics::Descriptive", - "Statistics::Regression", - "Sys::SigAction", - "Term::Clui", - "Term::ShellUI", - "Unicode::Stringprep", - "URI::Encode", - "URI::Template", - "URL::Encode", - "UUID::URandom", - "WWW::Selenium", - "XML::Filter::BufferText", - "XML::LibXML::Simple", - "XML::SAX::Writer", - "ZMQ::Constants", - "ZMQ::LibZMQ4" - ] - include: - - 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 - - name: "DateTime::Format::Duration::ISO8601" - - name: "Statistics::Regression" - version: "0.53" - - name: "ZMQ::Constants" - - name: "ZMQ::LibZMQ4" - use_dh_make_perl: "false" - version: "0.01" - deb_dependencies: "libzmq5" - name: package ${{ matrix.distrib }} ${{ matrix.name }} - container: - image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest - credentials: - username: ${{ secrets.DOCKER_REGISTRY_ID }} - password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} + # runs-on: ubuntu-22.04 + # strategy: + # fail-fast: false + # matrix: + # distrib: [bullseye, bookworm, jammy] + # name: + # [ + # "Authen::SASL::SASLprep", + # "Authen::SCRAM::Client", + # "boolean", + # "Carp::Assert", + # "Clone", + # "Clone::Choose", + # "common::sense", + # "Convert::EBCDIC", + # "Crypt::Blowfish_PP", + # "DateTime::Format::Duration::ISO8601", + # "Device::Modbus", + # "Digest::MD5::File", + # "Digest::SHA1", + # "Email::Send::SMTP::Gmail", + # "FFI::CheckLib", + # "File::SearchPath", + # "Hash::Merge", + # "Hash::Ordered", + # "HTTP::Daemon", + # "HTTP::Daemon::SSL", + # "HTTP::ProxyPAC", + # "JMX::Jmx4Perl", + # "JSON::Parse", + # "JSON::WebToken", + # "LV", + # "MIME::Types", + # "MongoDB", + # "Net::FTPSSL", + # "Net::HTTPTunnel", + # "Net::NTP", + # "Net::SMTPS", + # "Net::SMTP_auth", + # "Net::Subnet", + # "Net::TFTP", + # "PBKDF2::Tiny", + # "Schedule::Cron", + # "Statistics::Descriptive", + # "Statistics::Regression", + # "Sys::SigAction", + # "Term::Clui", + # "Term::ShellUI", + # "Unicode::Stringprep", + # "URI::Encode", + # "URI::Template", + # "URL::Encode", + # "UUID::URandom", + # "WWW::Selenium", + # "XML::Filter::BufferText", + # "XML::LibXML::Simple", + # "XML::SAX::Writer", + # "ZMQ::Constants", + # "ZMQ::LibZMQ4" + # ] + # include: + # - 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 + # - name: "DateTime::Format::Duration::ISO8601" + # - name: "Statistics::Regression" + # version: "0.53" + # - name: "ZMQ::Constants" + # - name: "ZMQ::LibZMQ4" + # use_dh_make_perl: "false" + # version: "0.01" + # deb_dependencies: "libzmq5" + # name: package ${{ matrix.distrib }} ${{ matrix.name }} + # container: + # image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest + # credentials: + # username: ${{ secrets.DOCKER_REGISTRY_ID }} + # password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + # steps: + # - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'false' }} - run: | - apt update - apt install -y cpanminus ruby libcurl4-openssl-dev libssh-dev uuid-dev libczmq-dev + # - if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'false' }} + # run: | + # apt update + # apt install -y cpanminus ruby libcurl4-openssl-dev libssh-dev uuid-dev libczmq-dev - PACKAGE_NAME=`echo ${{ matrix.name }} | sed -e 's/::/-/g' | tr '[A-Z]' '[a-z]' | sed -e 's/^/lib/g' | sed -e 's/$/-perl/g' | sed -e 's/liblib/lib/g'` - if [ -z "${{ matrix.version }}" ]; then - PACKAGE_VERSION="" - else - PACKAGE_VERSION=" -v ${{ matrix.version }}" - fi + # PACKAGE_NAME=`echo ${{ matrix.name }} | sed -e 's/::/-/g' | tr '[A-Z]' '[a-z]' | sed -e 's/^/lib/g' | sed -e 's/$/-perl/g' | sed -e 's/liblib/lib/g'` + # if [ -z "${{ matrix.version }}" ]; then + # PACKAGE_VERSION="" + # else + # PACKAGE_VERSION=" -v ${{ matrix.version }}" + # fi - 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.deb_dependencies }}" ]; then + # PACKAGE_DEPENDENCIES="" + # else + # for PACKAGE_DEPENDENCY in `echo ${{ matrix.deb_dependencies }}`; do + # PACKAGE_DEPENDENCIES="$PACKAGE_DEPENDENCIES --depends $PACKAGE_DEPENDENCY" + # done + # fi - cpanm Module::Build::Tiny - cpanm Module::Install + # cpanm Module::Build::Tiny + # cpanm Module::Install - gem install fpm - fpm -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test -n $PACKAGE_NAME$PACKAGE_DEPENDENCIES$PACKAGE_VERSION ${{ matrix.name }} - shell: bash + # gem install fpm + # fpm -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test -n $PACKAGE_NAME$PACKAGE_DEPENDENCIES$PACKAGE_VERSION ${{ matrix.name }} + # shell: bash - - if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'true' }} - run: | - apt update - apt install -y cpanminus libcurl4-openssl-dev dh-make-perl libssh-dev uuid-dev libczmq-dev libmodule-install-perl + # - if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'true' }} + # run: | + # apt update + # apt install -y cpanminus libcurl4-openssl-dev dh-make-perl libssh-dev uuid-dev libczmq-dev libmodule-install-perl - if [ -z "${{ matrix.version }}" ]; then - PACKAGE_VERSION="" - else - PACKAGE_VERSION="--version ${{ matrix.version }}-${{ matrix.distrib }}" - fi + # if [ -z "${{ matrix.version }}" ]; then + # PACKAGE_VERSION="" + # else + # PACKAGE_VERSION="--version ${{ matrix.version }}-${{ matrix.distrib }}" + # fi - DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --build $PACKAGE_VERSION --cpan ${{ matrix.name }} - shell: bash + # DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --build $PACKAGE_VERSION --cpan ${{ matrix.name }} + # shell: bash - - 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 + # - 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 - - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 - with: - name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ steps.package-name.outputs.name_with_dash}} - path: ./*.${{ matrix.package_extension }} - retention-days: 1 + # - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.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: [package-rpm, merge-package-deb-artifacts] + needs: [package-rpm] runs-on: ubuntu-22.04 strategy: @@ -388,24 +388,24 @@ jobs: source_name_pattern: packages-rpm-${{ matrix.distrib }}- github_token: ${{ secrets.GITHUB_TOKEN }} - merge-package-deb-artifacts: - needs: [package-deb] + # merge-package-deb-artifacts: + # needs: [package-deb] - runs-on: ubuntu-22.04 - strategy: - matrix: - distrib: [bullseye, bookworm, jammy] + # runs-on: ubuntu-22.04 + # strategy: + # matrix: + # distrib: [bullseye, bookworm, jammy] - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + # steps: + # - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Merging Artifacts - uses: ./.github/actions/merge-artifacts - with: - target_name: packages-deb-${{ matrix.distrib }} - source_paths: packages-deb-${{ matrix.distrib }}/*.deb - source_name_pattern: packages-deb-${{ matrix.distrib }}- - github_token: ${{ secrets.GITHUB_TOKEN }} + # - name: Merging Artifacts + # uses: ./.github/actions/merge-artifacts + # with: + # target_name: packages-deb-${{ matrix.distrib }} + # source_paths: packages-deb-${{ matrix.distrib }}/*.deb + # source_name_pattern: packages-deb-${{ matrix.distrib }}- + # github_token: ${{ secrets.GITHUB_TOKEN }} sign-rpm: needs: [package-rpm, merge-package-rpm-artifacts] @@ -444,22 +444,22 @@ jobs: path: ./*.rpm key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} - download-and-cache-deb: - needs: [package-deb, merge-package-deb-artifacts] - runs-on: ubuntu-22.04 - strategy: - matrix: - distrib: [bullseye, bookworm, jammy] - steps: - - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 - with: - name: packages-deb-${{ matrix.distrib }} - path: ./ + # download-and-cache-deb: + # needs: [package-deb, merge-package-deb-artifacts] + # runs-on: ubuntu-22.04 + # strategy: + # matrix: + # distrib: [bullseye, bookworm, jammy] + # steps: + # - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 + # with: + # name: packages-deb-${{ matrix.distrib }} + # path: ./ - - uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 - with: - path: ./*.deb - key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} + # - uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + # with: + # path: ./*.deb + # key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} deliver-rpm: needs: [get-environment, sign-rpm] @@ -483,27 +483,27 @@ jobs: cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} stability: ${{ needs.get-environment.outputs.stability }} - deliver-deb: - needs: [get-environment, download-and-cache-deb] - if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }} - runs-on: [self-hosted, common] + # deliver-deb: + # needs: [get-environment, download-and-cache-deb] + # if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }} + # runs-on: [self-hosted, common] - strategy: - matrix: - distrib: [bullseye, bookworm, jammy] + # strategy: + # matrix: + # distrib: [bullseye, bookworm, jammy] - steps: - - name: Checkout sources - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + # steps: + # - name: Checkout sources + # uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Delivery - uses: ./.github/actions/deb-delivery - with: - module_name: perl-cpan-libraries - distrib: ${{ matrix.distrib }} - artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} - cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} - stability: ${{ needs.get-environment.outputs.stability }} + # - name: Delivery + # uses: ./.github/actions/deb-delivery + # with: + # module_name: perl-cpan-libraries + # distrib: ${{ matrix.distrib }} + # artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} + # cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} + # stability: ${{ needs.get-environment.outputs.stability }} promote: needs: [get-environment] From 1fdf8e8c2a7dc4bdaa6f5d859eb9ba9d07e400a2 Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 10:50:49 +0100 Subject: [PATCH 15/29] double the download to check --- .github/actions/merge-artifacts/action.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/actions/merge-artifacts/action.yml b/.github/actions/merge-artifacts/action.yml index a213c8fa3..4fc73c99d 100644 --- a/.github/actions/merge-artifacts/action.yml +++ b/.github/actions/merge-artifacts/action.yml @@ -24,6 +24,13 @@ runs: path: ${{ inputs.target_name }} merge-multiple: true + - name: Download Artifacts + uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 + with: + pattern: ${{ inputs.source_name_pattern }}* + path: ${{ inputs.target_name }} + merge-multiple: true + - name: Upload the Regrouped Artifact uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 with: From 6431b44cb353bcf500fb3fd53f48b3767b9f7f1f Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 10:56:20 +0100 Subject: [PATCH 16/29] fix yaml --- .github/actions/merge-artifacts/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/merge-artifacts/action.yml b/.github/actions/merge-artifacts/action.yml index 4fc73c99d..70b42c42f 100644 --- a/.github/actions/merge-artifacts/action.yml +++ b/.github/actions/merge-artifacts/action.yml @@ -24,7 +24,7 @@ runs: path: ${{ inputs.target_name }} merge-multiple: true - - name: Download Artifacts + - name: Download Artifacts uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 with: pattern: ${{ inputs.source_name_pattern }}* From e7df92f4586e29b30c21a2c3dc9c410482d21a63 Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 11:19:10 +0100 Subject: [PATCH 17/29] test: change the pattern --- .github/actions/merge-artifacts/action.yml | 7 ------- .github/workflows/perl-cpan-libraries.yml | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/actions/merge-artifacts/action.yml b/.github/actions/merge-artifacts/action.yml index 70b42c42f..a213c8fa3 100644 --- a/.github/actions/merge-artifacts/action.yml +++ b/.github/actions/merge-artifacts/action.yml @@ -24,13 +24,6 @@ runs: path: ${{ inputs.target_name }} merge-multiple: true - - name: Download Artifacts - uses: actions/download-artifact@f44cd7b40bfd40b6aa1cc1b9b5b7bf03d3c67110 # v4.1.0 - with: - pattern: ${{ inputs.source_name_pattern }}* - path: ${{ inputs.target_name }} - merge-multiple: true - - name: Upload the Regrouped Artifact uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0 with: diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index fe0d77e92..00d8439ec 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -385,7 +385,7 @@ jobs: with: target_name: packages-rpm-${{ matrix.distrib }} source_paths: packages-rpm-${{ matrix.distrib }}/*.rpm - source_name_pattern: packages-rpm-${{ matrix.distrib }}- + source_name_pattern: packages-rpm- github_token: ${{ secrets.GITHUB_TOKEN }} # merge-package-deb-artifacts: From 00ae6d7fb67f77934a1b7abc3ec210c287fc2c48 Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 11:25:06 +0100 Subject: [PATCH 18/29] upgrade upload-artifact action --- .github/workflows/perl-cpan-libraries.yml | 382 +++++++++++----------- 1 file changed, 191 insertions(+), 191 deletions(-) diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index 00d8439ec..bfc544787 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -209,165 +209,165 @@ jobs: echo "name_with_dash=$name_with_dash" >> $GITHUB_OUTPUT shell: bash - - uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 + - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ steps.package-name.outputs.name_with_dash }} path: ./*.${{ matrix.package_extension }} retention-days: 1 - # package-deb: - # needs: [get-environment] - # if: ${{ needs.get-environment.outputs.stability != 'stable' }} + package-deb: + needs: [get-environment] + if: ${{ needs.get-environment.outputs.stability != 'stable' }} - # runs-on: ubuntu-22.04 - # strategy: - # fail-fast: false - # matrix: - # distrib: [bullseye, bookworm, jammy] - # name: - # [ - # "Authen::SASL::SASLprep", - # "Authen::SCRAM::Client", - # "boolean", - # "Carp::Assert", - # "Clone", - # "Clone::Choose", - # "common::sense", - # "Convert::EBCDIC", - # "Crypt::Blowfish_PP", - # "DateTime::Format::Duration::ISO8601", - # "Device::Modbus", - # "Digest::MD5::File", - # "Digest::SHA1", - # "Email::Send::SMTP::Gmail", - # "FFI::CheckLib", - # "File::SearchPath", - # "Hash::Merge", - # "Hash::Ordered", - # "HTTP::Daemon", - # "HTTP::Daemon::SSL", - # "HTTP::ProxyPAC", - # "JMX::Jmx4Perl", - # "JSON::Parse", - # "JSON::WebToken", - # "LV", - # "MIME::Types", - # "MongoDB", - # "Net::FTPSSL", - # "Net::HTTPTunnel", - # "Net::NTP", - # "Net::SMTPS", - # "Net::SMTP_auth", - # "Net::Subnet", - # "Net::TFTP", - # "PBKDF2::Tiny", - # "Schedule::Cron", - # "Statistics::Descriptive", - # "Statistics::Regression", - # "Sys::SigAction", - # "Term::Clui", - # "Term::ShellUI", - # "Unicode::Stringprep", - # "URI::Encode", - # "URI::Template", - # "URL::Encode", - # "UUID::URandom", - # "WWW::Selenium", - # "XML::Filter::BufferText", - # "XML::LibXML::Simple", - # "XML::SAX::Writer", - # "ZMQ::Constants", - # "ZMQ::LibZMQ4" - # ] - # include: - # - 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 - # - name: "DateTime::Format::Duration::ISO8601" - # - name: "Statistics::Regression" - # version: "0.53" - # - name: "ZMQ::Constants" - # - name: "ZMQ::LibZMQ4" - # use_dh_make_perl: "false" - # version: "0.01" - # deb_dependencies: "libzmq5" - # name: package ${{ matrix.distrib }} ${{ matrix.name }} - # container: - # image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest - # credentials: - # username: ${{ secrets.DOCKER_REGISTRY_ID }} - # password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + distrib: [bullseye, bookworm, jammy] + name: + [ + "Authen::SASL::SASLprep", + "Authen::SCRAM::Client", + "boolean", + "Carp::Assert", + "Clone", + "Clone::Choose", + "common::sense", + "Convert::EBCDIC", + "Crypt::Blowfish_PP", + "DateTime::Format::Duration::ISO8601", + "Device::Modbus", + "Digest::MD5::File", + "Digest::SHA1", + "Email::Send::SMTP::Gmail", + "FFI::CheckLib", + "File::SearchPath", + "Hash::Merge", + "Hash::Ordered", + "HTTP::Daemon", + "HTTP::Daemon::SSL", + "HTTP::ProxyPAC", + "JMX::Jmx4Perl", + "JSON::Parse", + "JSON::WebToken", + "LV", + "MIME::Types", + "MongoDB", + "Net::FTPSSL", + "Net::HTTPTunnel", + "Net::NTP", + "Net::SMTPS", + "Net::SMTP_auth", + "Net::Subnet", + "Net::TFTP", + "PBKDF2::Tiny", + "Schedule::Cron", + "Statistics::Descriptive", + "Statistics::Regression", + "Sys::SigAction", + "Term::Clui", + "Term::ShellUI", + "Unicode::Stringprep", + "URI::Encode", + "URI::Template", + "URL::Encode", + "UUID::URandom", + "WWW::Selenium", + "XML::Filter::BufferText", + "XML::LibXML::Simple", + "XML::SAX::Writer", + "ZMQ::Constants", + "ZMQ::LibZMQ4" + ] + include: + - 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 + - name: "DateTime::Format::Duration::ISO8601" + - name: "Statistics::Regression" + version: "0.53" + - name: "ZMQ::Constants" + - name: "ZMQ::LibZMQ4" + use_dh_make_perl: "false" + version: "0.01" + deb_dependencies: "libzmq5" + name: package ${{ matrix.distrib }} ${{ matrix.name }} + container: + image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest + credentials: + username: ${{ secrets.DOCKER_REGISTRY_ID }} + password: ${{ secrets.DOCKER_REGISTRY_PASSWD }} - # steps: - # - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - # - if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'false' }} - # run: | - # apt update - # apt install -y cpanminus ruby libcurl4-openssl-dev libssh-dev uuid-dev libczmq-dev + - if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'false' }} + run: | + apt update + apt install -y cpanminus ruby libcurl4-openssl-dev libssh-dev uuid-dev libczmq-dev - # PACKAGE_NAME=`echo ${{ matrix.name }} | sed -e 's/::/-/g' | tr '[A-Z]' '[a-z]' | sed -e 's/^/lib/g' | sed -e 's/$/-perl/g' | sed -e 's/liblib/lib/g'` - # if [ -z "${{ matrix.version }}" ]; then - # PACKAGE_VERSION="" - # else - # PACKAGE_VERSION=" -v ${{ matrix.version }}" - # fi + PACKAGE_NAME=`echo ${{ matrix.name }} | sed -e 's/::/-/g' | tr '[A-Z]' '[a-z]' | sed -e 's/^/lib/g' | sed -e 's/$/-perl/g' | sed -e 's/liblib/lib/g'` + if [ -z "${{ matrix.version }}" ]; then + PACKAGE_VERSION="" + else + PACKAGE_VERSION=" -v ${{ matrix.version }}" + fi - # 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.deb_dependencies }}" ]; then + PACKAGE_DEPENDENCIES="" + else + for PACKAGE_DEPENDENCY in `echo ${{ matrix.deb_dependencies }}`; do + PACKAGE_DEPENDENCIES="$PACKAGE_DEPENDENCIES --depends $PACKAGE_DEPENDENCY" + done + fi - # cpanm Module::Build::Tiny - # cpanm Module::Install + cpanm Module::Build::Tiny + cpanm Module::Install - # gem install fpm - # fpm -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test -n $PACKAGE_NAME$PACKAGE_DEPENDENCIES$PACKAGE_VERSION ${{ matrix.name }} - # shell: bash + gem install fpm + fpm -s cpan -t ${{ matrix.package_extension }} --deb-dist ${{ matrix.distrib }} --verbose --cpan-verbose --no-cpan-test -n $PACKAGE_NAME$PACKAGE_DEPENDENCIES$PACKAGE_VERSION ${{ matrix.name }} + shell: bash - # - if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'true' }} - # run: | - # apt update - # apt install -y cpanminus libcurl4-openssl-dev dh-make-perl libssh-dev uuid-dev libczmq-dev libmodule-install-perl + - if: ${{ contains(matrix.build_distribs, matrix.distrib) && matrix.use_dh_make_perl == 'true' }} + run: | + apt update + apt install -y cpanminus libcurl4-openssl-dev dh-make-perl libssh-dev uuid-dev libczmq-dev libmodule-install-perl - # if [ -z "${{ matrix.version }}" ]; then - # PACKAGE_VERSION="" - # else - # PACKAGE_VERSION="--version ${{ matrix.version }}-${{ matrix.distrib }}" - # fi + if [ -z "${{ matrix.version }}" ]; then + PACKAGE_VERSION="" + else + PACKAGE_VERSION="--version ${{ matrix.version }}-${{ matrix.distrib }}" + fi - # DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --build $PACKAGE_VERSION --cpan ${{ matrix.name }} - # shell: bash + DEB_BUILD_OPTIONS="nocheck nodocs notest" dh-make-perl make --build $PACKAGE_VERSION --cpan ${{ matrix.name }} + shell: bash - # - 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 + - 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 - # - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 - # with: - # name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ steps.package-name.outputs.name_with_dash}} - # path: ./*.${{ matrix.package_extension }} - # retention-days: 1 + - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.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: [package-rpm] @@ -385,27 +385,27 @@ jobs: with: target_name: packages-rpm-${{ matrix.distrib }} source_paths: packages-rpm-${{ matrix.distrib }}/*.rpm - source_name_pattern: packages-rpm- + source_name_pattern: packages-rpm-${{ matrix.distrib }}- github_token: ${{ secrets.GITHUB_TOKEN }} - # merge-package-deb-artifacts: - # needs: [package-deb] + merge-package-deb-artifacts: + needs: [package-deb] - # runs-on: ubuntu-22.04 - # strategy: - # matrix: - # distrib: [bullseye, bookworm, jammy] + runs-on: ubuntu-22.04 + strategy: + matrix: + distrib: [bullseye, bookworm, jammy] - # steps: - # - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + steps: + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - # - name: Merging Artifacts - # uses: ./.github/actions/merge-artifacts - # with: - # target_name: packages-deb-${{ matrix.distrib }} - # source_paths: packages-deb-${{ matrix.distrib }}/*.deb - # source_name_pattern: packages-deb-${{ matrix.distrib }}- - # github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Merging Artifacts + uses: ./.github/actions/merge-artifacts + with: + target_name: packages-deb-${{ matrix.distrib }} + source_paths: packages-deb-${{ matrix.distrib }}/*.deb + source_name_pattern: packages-deb-${{ matrix.distrib }}- + github_token: ${{ secrets.GITHUB_TOKEN }} sign-rpm: needs: [package-rpm, merge-package-rpm-artifacts] @@ -444,22 +444,22 @@ jobs: path: ./*.rpm key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} - # download-and-cache-deb: - # needs: [package-deb, merge-package-deb-artifacts] - # runs-on: ubuntu-22.04 - # strategy: - # matrix: - # distrib: [bullseye, bookworm, jammy] - # steps: - # - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 - # with: - # name: packages-deb-${{ matrix.distrib }} - # path: ./ + download-and-cache-deb: + needs: [package-deb, merge-package-deb-artifacts] + runs-on: ubuntu-22.04 + strategy: + matrix: + distrib: [bullseye, bookworm, jammy] + steps: + - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 + with: + name: packages-deb-${{ matrix.distrib }} + path: ./ - # - uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 - # with: - # path: ./*.deb - # key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} + - uses: actions/cache/save@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 + with: + path: ./*.deb + key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} deliver-rpm: needs: [get-environment, sign-rpm] @@ -483,27 +483,27 @@ jobs: cache_key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} stability: ${{ needs.get-environment.outputs.stability }} - # deliver-deb: - # needs: [get-environment, download-and-cache-deb] - # if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }} - # runs-on: [self-hosted, common] + deliver-deb: + needs: [get-environment, download-and-cache-deb] + if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }} + runs-on: [self-hosted, common] - # strategy: - # matrix: - # distrib: [bullseye, bookworm, jammy] + strategy: + matrix: + distrib: [bullseye, bookworm, jammy] - # steps: - # - name: Checkout sources - # uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + steps: + - name: Checkout sources + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - # - name: Delivery - # uses: ./.github/actions/deb-delivery - # with: - # module_name: perl-cpan-libraries - # distrib: ${{ matrix.distrib }} - # artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} - # cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} - # stability: ${{ needs.get-environment.outputs.stability }} + - name: Delivery + uses: ./.github/actions/deb-delivery + with: + module_name: perl-cpan-libraries + distrib: ${{ matrix.distrib }} + artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} + cache_key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }} + stability: ${{ needs.get-environment.outputs.stability }} promote: needs: [get-environment] From 7bea35c2e62d0565b4e42bed567359edcfbfe0eb Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 11:48:34 +0100 Subject: [PATCH 19/29] always merge the artifacts --- .github/workflows/perl-cpan-libraries.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index bfc544787..8731e6008 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -371,7 +371,7 @@ jobs: merge-package-rpm-artifacts: needs: [package-rpm] - + if: always() runs-on: ubuntu-22.04 strategy: matrix: @@ -390,7 +390,7 @@ jobs: merge-package-deb-artifacts: needs: [package-deb] - + if: always() runs-on: ubuntu-22.04 strategy: matrix: From f12ab1fa494592a0e062a09102ee24f3107c408f Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 17:24:48 +0100 Subject: [PATCH 20/29] test: perl-crypt-argon2 --- .github/workflows/perl-crypt-argon2.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perl-crypt-argon2.yml b/.github/workflows/perl-crypt-argon2.yml index ae7c02b5e..96d9aceeb 100644 --- a/.github/workflows/perl-crypt-argon2.yml +++ b/.github/workflows/perl-crypt-argon2.yml @@ -128,7 +128,7 @@ jobs: stability: ${{ needs.get-environment.outputs.stability }} # set condition to true if artifacts are needed - - if: ${{ false }} + - if: ${{ true }} name: Upload package artifacts uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: From 7554c11c089195b8a94a7bc9417393237dc8887b Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 17:29:35 +0100 Subject: [PATCH 21/29] test: perl-json-path --- .github/workflows/perl-crypt-argon2.yml | 2 +- .github/workflows/perl-json-path.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/perl-crypt-argon2.yml b/.github/workflows/perl-crypt-argon2.yml index 96d9aceeb..ae7c02b5e 100644 --- a/.github/workflows/perl-crypt-argon2.yml +++ b/.github/workflows/perl-crypt-argon2.yml @@ -128,7 +128,7 @@ jobs: stability: ${{ needs.get-environment.outputs.stability }} # set condition to true if artifacts are needed - - if: ${{ true }} + - if: ${{ false }} name: Upload package artifacts uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: diff --git a/.github/workflows/perl-json-path.yml b/.github/workflows/perl-json-path.yml index 0bb26794d..009cbc204 100644 --- a/.github/workflows/perl-json-path.yml +++ b/.github/workflows/perl-json-path.yml @@ -114,7 +114,7 @@ jobs: stability: ${{ needs.get-environment.outputs.stability }} # set condition to true if artifacts are needed - - if: ${{ false }} + - if: ${{ true }} name: Upload package artifacts uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: From 37fba5078c2952523407cb392394d3bd5251255d Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 17:34:35 +0100 Subject: [PATCH 22/29] test: perl-libssh-session --- .github/workflows/perl-json-path.yml | 2 +- .github/workflows/perl-libssh-session.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/perl-json-path.yml b/.github/workflows/perl-json-path.yml index 009cbc204..0bb26794d 100644 --- a/.github/workflows/perl-json-path.yml +++ b/.github/workflows/perl-json-path.yml @@ -114,7 +114,7 @@ jobs: stability: ${{ needs.get-environment.outputs.stability }} # set condition to true if artifacts are needed - - if: ${{ true }} + - if: ${{ false }} name: Upload package artifacts uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: diff --git a/.github/workflows/perl-libssh-session.yml b/.github/workflows/perl-libssh-session.yml index 63cc505ef..8cc697f4f 100644 --- a/.github/workflows/perl-libssh-session.yml +++ b/.github/workflows/perl-libssh-session.yml @@ -126,7 +126,7 @@ jobs: stability: ${{ needs.get-environment.outputs.stability }} # set condition to true if artifacts are needed - - if: ${{ false }} + - if: ${{ true }} name: Upload package artifacts uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: From 1785372ab4f2807c737fa41a2b2b8d681576350b Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 17:35:57 +0100 Subject: [PATCH 23/29] test: perl-net-curl --- .github/workflows/perl-libssh-session.yml | 2 +- .github/workflows/perl-net-curl.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/perl-libssh-session.yml b/.github/workflows/perl-libssh-session.yml index 8cc697f4f..63cc505ef 100644 --- a/.github/workflows/perl-libssh-session.yml +++ b/.github/workflows/perl-libssh-session.yml @@ -126,7 +126,7 @@ jobs: stability: ${{ needs.get-environment.outputs.stability }} # set condition to true if artifacts are needed - - if: ${{ true }} + - if: ${{ false }} name: Upload package artifacts uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: diff --git a/.github/workflows/perl-net-curl.yml b/.github/workflows/perl-net-curl.yml index 3bf2fc9d7..3379e6a8a 100644 --- a/.github/workflows/perl-net-curl.yml +++ b/.github/workflows/perl-net-curl.yml @@ -126,7 +126,7 @@ jobs: stability: ${{ needs.get-environment.outputs.stability }} # set condition to true if artifacts are needed - - if: ${{ false }} + - if: ${{ true }} name: Upload package artifacts uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: From d9212a81bfc6a53a305e9cb4c85a7ad340117bee Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 17:38:04 +0100 Subject: [PATCH 24/29] test: perl-net-openwsman --- .github/workflows/perl-net-curl.yml | 2 +- .github/workflows/perl-openwsman.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/perl-net-curl.yml b/.github/workflows/perl-net-curl.yml index 3379e6a8a..3bf2fc9d7 100644 --- a/.github/workflows/perl-net-curl.yml +++ b/.github/workflows/perl-net-curl.yml @@ -126,7 +126,7 @@ jobs: stability: ${{ needs.get-environment.outputs.stability }} # set condition to true if artifacts are needed - - if: ${{ true }} + - if: ${{ false }} name: Upload package artifacts uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: diff --git a/.github/workflows/perl-openwsman.yml b/.github/workflows/perl-openwsman.yml index c64601535..93985bcf9 100644 --- a/.github/workflows/perl-openwsman.yml +++ b/.github/workflows/perl-openwsman.yml @@ -197,7 +197,7 @@ jobs: stability: ${{ needs.get-environment.outputs.stability }} # set condition to true if artifacts are needed - - if: ${{ false }} + - if: ${{ true }} name: Upload package artifacts uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: From 84cc9e0065ec9a8eaf0a0418d02b912a1216f432 Mon Sep 17 00:00:00 2001 From: a-eljazouly Date: Tue, 6 Feb 2024 17:39:31 +0100 Subject: [PATCH 25/29] revert --- .github/workflows/perl-openwsman.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perl-openwsman.yml b/.github/workflows/perl-openwsman.yml index 93985bcf9..c64601535 100644 --- a/.github/workflows/perl-openwsman.yml +++ b/.github/workflows/perl-openwsman.yml @@ -197,7 +197,7 @@ jobs: stability: ${{ needs.get-environment.outputs.stability }} # set condition to true if artifacts are needed - - if: ${{ true }} + - if: ${{ false }} name: Upload package artifacts uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: From ef2482e76f10f1d3f7c68d4c784a520180ffa6f8 Mon Sep 17 00:00:00 2001 From: EL JAZOULY Anass <144116191+a-eljazouly@users.noreply.github.com> Date: Thu, 8 Feb 2024 09:42:49 +0100 Subject: [PATCH 26/29] Update .github/workflows/perl-cpan-libraries.yml Co-authored-by: Kevin Duret --- .github/workflows/perl-cpan-libraries.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index 8731e6008..7ab25d8d9 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -371,7 +371,6 @@ jobs: merge-package-rpm-artifacts: needs: [package-rpm] - if: always() runs-on: ubuntu-22.04 strategy: matrix: From 29dd82768f3e9e7b3d8f93e68fcc3bc8124901f7 Mon Sep 17 00:00:00 2001 From: EL JAZOULY Anass <144116191+a-eljazouly@users.noreply.github.com> Date: Thu, 8 Feb 2024 09:42:55 +0100 Subject: [PATCH 27/29] Update .github/workflows/perl-cpan-libraries.yml Co-authored-by: Kevin Duret --- .github/workflows/perl-cpan-libraries.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index 7ab25d8d9..02d0df810 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -389,7 +389,6 @@ jobs: merge-package-deb-artifacts: needs: [package-deb] - if: always() runs-on: ubuntu-22.04 strategy: matrix: From 38b44650a967e08ce9075c6d14c7d7512baf1d6f Mon Sep 17 00:00:00 2001 From: EL JAZOULY Anass <144116191+a-eljazouly@users.noreply.github.com> Date: Thu, 8 Feb 2024 09:43:03 +0100 Subject: [PATCH 28/29] Update .github/workflows/perl-cpan-libraries.yml Co-authored-by: Kevin Duret --- .github/workflows/perl-cpan-libraries.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index 02d0df810..56226b80d 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -443,7 +443,7 @@ jobs: key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }} download-and-cache-deb: - needs: [package-deb, merge-package-deb-artifacts] + needs: [merge-package-deb-artifacts] runs-on: ubuntu-22.04 strategy: matrix: From 0efae61508e54cfa4f34d966a63eb6c4d578b3b5 Mon Sep 17 00:00:00 2001 From: EL JAZOULY Anass <144116191+a-eljazouly@users.noreply.github.com> Date: Thu, 8 Feb 2024 09:43:09 +0100 Subject: [PATCH 29/29] Update .github/workflows/perl-cpan-libraries.yml Co-authored-by: Kevin Duret --- .github/workflows/perl-cpan-libraries.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/perl-cpan-libraries.yml b/.github/workflows/perl-cpan-libraries.yml index 56226b80d..75a4f142e 100644 --- a/.github/workflows/perl-cpan-libraries.yml +++ b/.github/workflows/perl-cpan-libraries.yml @@ -406,7 +406,7 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} sign-rpm: - needs: [package-rpm, merge-package-rpm-artifacts] + needs: [merge-package-rpm-artifacts] runs-on: ubuntu-22.04 strategy: