Skip to content

Commit

Permalink
ubuntu24.04 ci pipeline fix
Browse files Browse the repository at this point in the history
Signed-off-by: shiva kumar <[email protected]>
  • Loading branch information
shivakunv committed Nov 22, 2024
1 parent d6934e0 commit f7650fc
Showing 1 changed file with 38 additions and 3 deletions.
41 changes: 38 additions & 3 deletions .github/workflows/precompiled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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 \
Expand All @@ -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 \
Expand Down

0 comments on commit f7650fc

Please sign in to comment.