From f7650fcba77f901072d09d110f220506ac52be6d Mon Sep 17 00:00:00 2001 From: shiva kumar Date: Fri, 22 Nov 2024 19:59:52 +0530 Subject: [PATCH] ubuntu24.04 ci pipeline fix Signed-off-by: shiva kumar --- .github/workflows/precompiled.yaml | 41 +++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/.github/workflows/precompiled.yaml b/.github/workflows/precompiled.yaml index de57f7f6..43f1f3fb 100644 --- a/.github/workflows/precompiled.yaml +++ b/.github/workflows/precompiled.yaml @@ -142,7 +142,7 @@ jobs: PRIVATE_REGISTRY: "ghcr.io" run: | source kernel_version.txt - cp kernel_version.txt kernel-version-${{ matrix.driver_branch }}-${KERNEL_VERSION}-${DIST}.txt + tar -cvf kernel-version-${{ matrix.driver_branch }}-${KERNEL_VERSION}-${DIST}.tar kernel_version.txt docker save "${PRIVATE_REGISTRY}/nvidia/driver:${{ matrix.driver_branch }}-${KERNEL_VERSION}-${DIST}" \ -o ./driver-images-${{ matrix.driver_branch }}-${KERNEL_VERSION}-${DIST}.tar # set env for artifacts upload @@ -160,7 +160,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: kernel-version-${{ matrix.driver_branch }}-${{ env.KERNEL_VERSION }}-${{ env.DIST }} - path: ./kernel-version-${{ matrix.driver_branch }}-${{ env.KERNEL_VERSION }}-${{ env.DIST }}.txt + path: ./kernel-version-${{ matrix.driver_branch }}-${{ env.KERNEL_VERSION }}-${{ env.DIST }}.tar retention-days: 1 determine-e2e-test-matrix: @@ -263,8 +263,32 @@ jobs: echo "SHIVA" DRIVER_BRANCH="550" - prefix="kernel-version-550" + prefix="kernel-version-550-6.8" suffix="generic-ubuntu24.04" + artifacts=$(gh api -X GET /repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/artifacts --jq '.artifacts[].name') + # Use a loop or a pattern to find the matching artifact dynamically + for artifact in $artifacts; do + if [[ $artifact == $prefix*-$suffix ]]; then + echo "Found matching artifact: $artifact" + + # Download the artifact + gh run download --name "$artifact" --dir ./ + ls + tar -xvf $artifact.tar + ls + cat $artifact.txt + + # Exit loop once downloaded + break + fi + done + + + + + + + # Get the artifact ID dynamically for the matching artifact artifact_id=$(gh api -X GET /repos/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/artifacts --jq \ @@ -289,6 +313,17 @@ jobs: # Define variables for artifact pattern PREFIX="kernel-version-${DRIVER_BRANCH}-${LTS_KERNEL}" SUFFIX="${kernel_flavor}-${DIST}" + artifacts_name= + + + + + + + + + + # Fetch all artifacts and filter based on name pattern last_artifact=$(gh api -X GET /repos/${{ github.repository }}/actions/artifacts --jq \