From 315a312aad9e52f2531a31a468e1cca827f26bbe Mon Sep 17 00:00:00 2001 From: El Arbi Belfarsi Date: Tue, 2 Jul 2024 09:47:22 -0400 Subject: [PATCH] HPCC-32177 Add Package Manifest File as a Job --- .github/workflows/build-assets.yml | 61 ++++--------------------- .github/workflows/package-manifests.yml | 47 +++++++++++++++++++ 2 files changed, 56 insertions(+), 52 deletions(-) create mode 100644 .github/workflows/package-manifests.yml diff --git a/.github/workflows/build-assets.yml b/.github/workflows/build-assets.yml index ca1ac3e0f88..a2aecbfec0d 100644 --- a/.github/workflows/build-assets.yml +++ b/.github/workflows/build-assets.yml @@ -76,16 +76,7 @@ jobs: generateReleaseNotes: false prerelease: ${{ contains(github.ref, '-rc') }} - - name: Release LN - uses: ncipollo/release-action@v1.14.0 - with: - allowUpdates: true - generateReleaseNotes: false - prerelease: ${{ contains(github.ref, '-rc') }} - owner: ${{ secrets.LNB_ACTOR }} - repo: LN - token: ${{ secrets.LNB_TOKEN }} - tag: ${{ steps.vars.outputs.internal_tag }} + build-docker: name: Build Docker @@ -95,48 +86,7 @@ jobs: matrix: include: - os: ubuntu-22.04 - - os: ubuntu-22.04 - name: k8s - container: true - - os: ubuntu-22.04 - name: docs - documentation: true - - os: ubuntu-20.04 - - os: centos-8 - - os: centos-7 - cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic" - - os: amazonlinux - cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-amazonlinux-dynamic" - - os: rockylinux-8 - - os: ubuntu-22.04 - name: LN k8s - ln: true - container: true - - os: ubuntu-22.04 - name: LN - ln: true - - os: ubuntu-22.04 - name: Enterprise - ee: true - - os: ubuntu-20.04 - name: LN - ln: true - - os: centos-8 - name: LN - cmake_options_extra: "" - ln: true - - os: centos-7 - name: LN - cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic" - ln: true - - os: rockylinux-8 - name: LN - cmake_options_extra: "" - ln: true - - os: centos-7-rh-python38 - name: LN Python 3.8 - cmake_options_extra: "-DVCPKG_TARGET_TRIPLET=x64-centos-7-dynamic -DCUSTOM_LABEL=_rh_python38" - ln: true + fail-fast: false steps: @@ -753,3 +703,10 @@ jobs: with: name: windows-2022-logs path: ./ECLIDE/build/**/*.log + + run-package-manifest: + needs: [ preamble, build-docker, build-bare-metal, build-bare-metal-eclide ] + uses: ./.github/workflows/package-manifests.yml + with: + tag: ${{ needs.preamble.outputs.community_tag }} + secrets: inherit diff --git a/.github/workflows/package-manifests.yml b/.github/workflows/package-manifests.yml new file mode 100644 index 00000000000..f6dd9e9ba0e --- /dev/null +++ b/.github/workflows/package-manifests.yml @@ -0,0 +1,47 @@ +name: Generate Package Manifest + +on: + workflow_call: + inputs: + tag: + description: 'The tag to use' + required: true + type: string + secrets: + DOCKER_USERNAME: + required: true + DOCKER_PASSWORD: + required: true + LNB_TOKEN: + required: true + +jobs: + run-package-manifest: + runs-on: ubuntu-22.04 + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Pull Docker Image + run: docker pull ${{ secrets.DOCKER_USERNAME }}/package-manifest:latest + + - name: Run Docker Container + run: docker run --name package-container -e REPO_OWNER=${{ github.repository_owner }} -e REPO_NAME=HPCC-Platform -e TAG=${{ inputs.tag }} -e GIT_TKN=${{ secrets.LNB_TOKEN }} ebelfarsi/package-manifest:latest + + - name: Fetch Output from Container + run: docker cp package-container:/app/output.json ${{ github.workspace }}/output.json + + - name: Upload output.json to GitHub Release + uses: ncipollo/release-action@v1.14.0 + with: + allowUpdates: true + generateReleaseNotes: false + prerelease: ${{ contains(github.ref, '-rc') }} + artifacts: ${{ github.workspace }}/output.json + token: ${{ secrets.LNB_TOKEN }}