From 160c3cde47b0a1d3e34b0aaed3af38df46720db5 Mon Sep 17 00:00:00 2001 From: Thomas Gruber Date: Fri, 20 Dec 2024 20:30:04 +0100 Subject: [PATCH 1/7] Develop to main (#127) * Remove go-toolkit as build requirement for RPM builds if run in CI * Remove condition around BuildRequires and use go-toolkit for RPM builds * use go-toolkit for RPM builds * Install go-toolkit to fulfill build requirements for RPM * Add golang-race for UBI9 and Alma9 * Fix wrongly named packages --- .github/workflows/Release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 4d65cb6..f2436e5 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -233,7 +233,7 @@ jobs: # Use dnf to install development packages - name: Install development packages - run: dnf --assumeyes --disableplugin=subscription-manager install rpm-build go-srpm-macros gcc make python39 git wget openssl-devel diffutils delve go-toolkit + run: dnf --assumeyes --disableplugin=subscription-manager install rpm-build go-srpm-macros gcc make python39 git wget openssl-devel diffutils delve # Checkout git repository and submodules # fetch-depth must be 0 to use git describe From 1b61b5dae4e3eb8c1f8d66e33b49d0dfea628a25 Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Fri, 20 Dec 2024 20:38:59 +0100 Subject: [PATCH 2/7] Overwrite files created by previous tag --- .github/workflows/Release.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index f2436e5..a1e97e5 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -82,11 +82,13 @@ jobs: with: name: cc-metric-collector RPM for AlmaLinux 8 path: ${{ steps.rpmrename.outputs.RPM }} + overwrite: true - name: Save SRPM as artifact uses: actions/upload-artifact@v4 with: name: cc-metric-collector SRPM for AlmaLinux 8 path: ${{ steps.rpmrename.outputs.SRPM }} + overwrite: true # # Build on AlmaLinux 9 using go-toolset @@ -159,11 +161,13 @@ jobs: with: name: cc-metric-collector RPM for AlmaLinux 9 path: ${{ steps.rpmrename.outputs.RPM }} + overwrite: true - name: Save SRPM as artifact uses: actions/upload-artifact@v4 with: name: cc-metric-collector SRPM for AlmaLinux 9 path: ${{ steps.rpmrename.outputs.SRPM }} + overwrite: true # # Build on UBI 8 using go-toolset @@ -215,11 +219,13 @@ jobs: with: name: cc-metric-collector RPM for UBI 8 path: ${{ steps.rpmbuild.outputs.RPM }} + overwrite: true - name: Save SRPM as artifact uses: actions/upload-artifact@v4 with: name: cc-metric-collector SRPM for UBI 8 path: ${{ steps.rpmbuild.outputs.SRPM }} + overwrite: true # # Build on UBI 9 using go-toolset @@ -270,11 +276,13 @@ jobs: with: name: cc-metric-collector RPM for UBI 8 path: ${{ steps.rpmbuild.outputs.RPM }} + overwrite: true - name: Save SRPM as artifact uses: actions/upload-artifact@v4 with: name: cc-metric-collector SRPM for UBI 8 path: ${{ steps.rpmbuild.outputs.SRPM }} + overwrite: true # # Build on Ubuntu 22.04 using official go package @@ -324,6 +332,7 @@ jobs: with: name: cc-metric-collector DEB for Ubuntu 22.04 path: ${{ steps.debrename.outputs.DEB }} + overwrite: true # # Build on Ubuntu 24.04 using official go package @@ -373,6 +382,7 @@ jobs: with: name: cc-metric-collector DEB for Ubuntu 24.04 path: ${{ steps.debrename.outputs.DEB }} + overwrite: true # From 32e93b362e5708cf2ed22f1fc05465ddb2d00371 Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Fri, 20 Dec 2024 20:41:59 +0100 Subject: [PATCH 3/7] Remove go installation through apt for Ubuntu 24.04 --- .github/workflows/Release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index a1e97e5..78cb38c 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -349,7 +349,7 @@ jobs: - name: Install development packages run: | apt update && apt --assume-yes upgrade - apt --assume-yes install build-essential sed git wget bash go + apt --assume-yes install build-essential sed git wget bash # Checkout git repository and submodules # fetch-depth must be 0 to use git describe # See: https://github.com/marketplace/actions/checkout From 0ff8c8616e78ca4a0f24b583f19042a479e364fc Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Fri, 20 Dec 2024 20:45:29 +0100 Subject: [PATCH 4/7] Fix UBI9 RPM name --- .github/workflows/Release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 78cb38c..c7698f6 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -274,13 +274,13 @@ jobs: - name: Save RPM as artifact uses: actions/upload-artifact@v4 with: - name: cc-metric-collector RPM for UBI 8 + name: cc-metric-collector RPM for UBI 9 path: ${{ steps.rpmbuild.outputs.RPM }} overwrite: true - name: Save SRPM as artifact uses: actions/upload-artifact@v4 with: - name: cc-metric-collector SRPM for UBI 8 + name: cc-metric-collector SRPM for UBI 9 path: ${{ steps.rpmbuild.outputs.SRPM }} overwrite: true From f859fe178d4e451a6372dfaffab46743bb2d348e Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Fri, 20 Dec 2024 20:56:22 +0100 Subject: [PATCH 5/7] Fix Release part --- .github/workflows/Release.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index c7698f6..cb02a1a 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -73,21 +73,21 @@ jobs: NEW_SRPM=${OLD_SRPM/el8/alma8} mv "${OLD_RPM}" "${NEW_RPM}" mv "${OLD_SRPM}" "${NEW_SRPM}" - echo "SRPM=${NEW_SRPM}" >> $GITHUB_OUTPUT - echo "RPM=${NEW_RPM}" >> $GITHUB_OUTPUT + echo "EL8_SRPM=${NEW_SRPM}" >> $GITHUB_OUTPUT + echo "EL8_RPM=${NEW_RPM}" >> $GITHUB_OUTPUT # See: https://github.com/actions/upload-artifact - name: Save RPM as artifact uses: actions/upload-artifact@v4 with: name: cc-metric-collector RPM for AlmaLinux 8 - path: ${{ steps.rpmrename.outputs.RPM }} + path: ${{ steps.rpmrename.outputs.EL8_RPM }} overwrite: true - name: Save SRPM as artifact uses: actions/upload-artifact@v4 with: name: cc-metric-collector SRPM for AlmaLinux 8 - path: ${{ steps.rpmrename.outputs.SRPM }} + path: ${{ steps.rpmrename.outputs.EL8_SRPM }} overwrite: true # @@ -152,21 +152,21 @@ jobs: NEW_SRPM=${OLD_SRPM/el9/alma9} mv "${OLD_RPM}" "${NEW_RPM}" mv "${OLD_SRPM}" "${NEW_SRPM}" - echo "SRPM=${NEW_SRPM}" >> $GITHUB_OUTPUT - echo "RPM=${NEW_RPM}" >> $GITHUB_OUTPUT + echo "EL9_SRPM=${NEW_SRPM}" >> $GITHUB_OUTPUT + echo "EL9_RPM=${NEW_RPM}" >> $GITHUB_OUTPUT # See: https://github.com/actions/upload-artifact - name: Save RPM as artifact uses: actions/upload-artifact@v4 with: name: cc-metric-collector RPM for AlmaLinux 9 - path: ${{ steps.rpmrename.outputs.RPM }} + path: ${{ steps.rpmrename.outputs.EL9_RPM }} overwrite: true - name: Save SRPM as artifact uses: actions/upload-artifact@v4 with: name: cc-metric-collector SRPM for AlmaLinux 9 - path: ${{ steps.rpmrename.outputs.SRPM }} + path: ${{ steps.rpmrename.outputs.EL9_SRPM }} overwrite: true # @@ -456,8 +456,10 @@ jobs: ALMA_9_SRPM=$(basename "${{ needs.AlmaLinux9-RPM-build.outputs.srpm}}") UBI_8_RPM=$(basename "${{ needs.UBI-8-RPM-build.outputs.rpm}}") UBI_8_SRPM=$(basename "${{ needs.UBI-8-RPM-build.outputs.srpm}}") + UBI_9_RPM=$(basename "${{ needs.UBI-9-RPM-build.outputs.rpm}}") + UBI_9_SRPM=$(basename "${{ needs.UBI-9-RPM-build.outputs.srpm}}") U_2204_DEB=$(basename "${{ needs.Ubuntu-jammy-build.outputs.deb}}") - U_2404_DEB=$(basename "${{ needs.Ubuntu-jammy-build.outputs.deb}}") + U_2404_DEB=$(basename "${{ needs.Ubuntu-noblenumbat-build.outputs.deb}}") echo "ALMA_8_RPM::${ALMA_8_RPM}" echo "ALMA_8_SRPM::${ALMA_8_SRPM}" echo "ALMA_9_RPM::${ALMA_9_RPM}" @@ -470,6 +472,8 @@ jobs: echo "U_2404_DEB::${U_2404_DEB}" echo "ALMA_8_RPM=${ALMA_8_RPM}" >> $GITHUB_OUTPUT echo "ALMA_8_SRPM=${ALMA_8_SRPM}" >> $GITHUB_OUTPUT + echo "ALMA_9_RPM=${ALMA_9_RPM}" >> $GITHUB_OUTPUT + echo "ALMA_9_SRPM=${ALMA_9_SRPM}" >> $GITHUB_OUTPUT echo "UBI_8_RPM=${UBI_8_RPM}" >> $GITHUB_OUTPUT echo "UBI_8_SRPM=${UBI_8_SRPM}" >> $GITHUB_OUTPUT echo "UBI_9_RPM=${UBI_9_RPM}" >> $GITHUB_OUTPUT From 94c80307e8009c32caf4423895159289b14fca12 Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Fri, 20 Dec 2024 21:03:03 +0100 Subject: [PATCH 6/7] Fix Release part --- .github/workflows/Release.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index cb02a1a..8709786 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -73,8 +73,8 @@ jobs: NEW_SRPM=${OLD_SRPM/el8/alma8} mv "${OLD_RPM}" "${NEW_RPM}" mv "${OLD_SRPM}" "${NEW_SRPM}" - echo "EL8_SRPM=${NEW_SRPM}" >> $GITHUB_OUTPUT - echo "EL8_RPM=${NEW_RPM}" >> $GITHUB_OUTPUT + echo "SRPM=${NEW_SRPM}" >> $GITHUB_OUTPUT + echo "RPM=${NEW_RPM}" >> $GITHUB_OUTPUT # See: https://github.com/actions/upload-artifact - name: Save RPM as artifact @@ -152,8 +152,8 @@ jobs: NEW_SRPM=${OLD_SRPM/el9/alma9} mv "${OLD_RPM}" "${NEW_RPM}" mv "${OLD_SRPM}" "${NEW_SRPM}" - echo "EL9_SRPM=${NEW_SRPM}" >> $GITHUB_OUTPUT - echo "EL9_RPM=${NEW_RPM}" >> $GITHUB_OUTPUT + echo "SRPM=${NEW_SRPM}" >> $GITHUB_OUTPUT + echo "RPM=${NEW_RPM}" >> $GITHUB_OUTPUT # See: https://github.com/actions/upload-artifact - name: Save RPM as artifact @@ -235,6 +235,10 @@ jobs: # See: https://catalog.redhat.com/software/containers/ubi8/ubi/5c359854d70cc534b3a3784e?container-tabs=gti container: redhat/ubi9 # The job outputs link to the outputs of the 'rpmbuild' step + # The job outputs link to the outputs of the 'rpmbuild' step + outputs: + rpm : ${{steps.rpmbuild.outputs.RPM}} + srpm : ${{steps.rpmbuild.outputs.SRPM}} steps: # Use dnf to install development packages From ee4e1baf5bab9a3db8ca0b1eada15223b38b5948 Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Fri, 20 Dec 2024 21:07:33 +0100 Subject: [PATCH 7/7] Fix Release part --- .github/workflows/Release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 8709786..a2dfff4 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -81,13 +81,13 @@ jobs: uses: actions/upload-artifact@v4 with: name: cc-metric-collector RPM for AlmaLinux 8 - path: ${{ steps.rpmrename.outputs.EL8_RPM }} + path: ${{ steps.rpmrename.outputs.RPM }} overwrite: true - name: Save SRPM as artifact uses: actions/upload-artifact@v4 with: name: cc-metric-collector SRPM for AlmaLinux 8 - path: ${{ steps.rpmrename.outputs.EL8_SRPM }} + path: ${{ steps.rpmrename.outputs.SRPM }} overwrite: true # @@ -160,13 +160,13 @@ jobs: uses: actions/upload-artifact@v4 with: name: cc-metric-collector RPM for AlmaLinux 9 - path: ${{ steps.rpmrename.outputs.EL9_RPM }} + path: ${{ steps.rpmrename.outputs.RPM }} overwrite: true - name: Save SRPM as artifact uses: actions/upload-artifact@v4 with: name: cc-metric-collector SRPM for AlmaLinux 9 - path: ${{ steps.rpmrename.outputs.EL9_SRPM }} + path: ${{ steps.rpmrename.outputs.SRPM }} overwrite: true #