Skip to content

Commit f2f01a9

Browse files
Shiva Kumarshivakunv
authored andcommitted
Tag git commit sha with bundle image
Signed-off-by: Shiva Kumar (SW-CLOUD) <[email protected]>
1 parent 99b035c commit f2f01a9

File tree

2 files changed

+109
-107
lines changed

2 files changed

+109
-107
lines changed

.github/workflows/ci.yaml

Lines changed: 102 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -292,115 +292,116 @@ jobs:
292292
docker manifest push ${OPERATOR_MULTIARCH_IMAGE}
293293
294294
### e2e tests ###
295-
e2e-tests-containerd:
296-
needs: [build-multi-arch-images]
297-
runs-on: linux-amd64-cpu4
298-
permissions:
299-
contents: read
300-
id-token: write
301-
steps:
302-
- uses: actions/checkout@v5
303-
name: Check out code
304-
- name: Set up Holodeck
305-
uses: NVIDIA/[email protected]
306-
with:
307-
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
308-
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
309-
aws_ssh_key: ${{ secrets.AWS_SSH_KEY }}
310-
holodeck_config: "tests/holodeck.yaml"
311-
- name: Get public dns name
312-
id: get_public_dns_name
313-
uses: mikefarah/yq@master
314-
with:
315-
cmd: yq '.status.properties[] | select(.name == "public-dns-name") | .value' /github/workspace/.cache/holodeck.yaml
316-
- name: Calculate test vars
317-
id: vars
318-
run: |
319-
COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}
320-
echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
321-
LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')
322-
echo "LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')" >> $GITHUB_ENV
295+
# e2e-tests-containerd:
296+
# needs: [build-multi-arch-images]
297+
# runs-on: linux-amd64-cpu4
298+
# permissions:
299+
# contents: read
300+
# id-token: write
301+
# steps:
302+
# - uses: actions/checkout@v5
303+
# name: Check out code
304+
# - name: Set up Holodeck
305+
# uses: NVIDIA/[email protected]
306+
# with:
307+
# aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
308+
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
309+
# aws_ssh_key: ${{ secrets.AWS_SSH_KEY }}
310+
# holodeck_config: "tests/holodeck.yaml"
311+
# - name: Get public dns name
312+
# id: get_public_dns_name
313+
# uses: mikefarah/yq@master
314+
# with:
315+
# cmd: yq '.status.properties[] | select(.name == "public-dns-name") | .value' /github/workspace/.cache/holodeck.yaml
316+
# - name: Calculate test vars
317+
# id: vars
318+
# run: |
319+
# COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}
320+
# echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
321+
# LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')
322+
# echo "LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')" >> $GITHUB_ENV
323323

324-
echo "OPERATOR_VERSION=${COMMIT_SHORT_SHA}" >> $GITHUB_ENV
325-
echo "OPERATOR_IMAGE=ghcr.io/${LOWERCASE_REPO_OWNER}/gpu-operator" >> $GITHUB_ENV
324+
# echo "OPERATOR_VERSION=${COMMIT_SHORT_SHA}" >> $GITHUB_ENV
325+
# echo "OPERATOR_IMAGE=ghcr.io/${LOWERCASE_REPO_OWNER}/gpu-operator" >> $GITHUB_ENV
326326

327-
echo "instance_hostname=ubuntu@${{ steps.get_public_dns_name.outputs.result }}" >> $GITHUB_ENV
328-
echo "private_key=${{ github.workspace }}/key.pem" >> $GITHUB_ENV
329-
- name: Run e2e tests
330-
env:
331-
GPU_PRODUCT_NAME: "Tesla-T4"
332-
SKIP_LAUNCH: "true"
333-
CONTAINER_RUNTIME: "containerd"
334-
TEST_CASE: "./tests/cases/defaults.sh"
335-
run: |
336-
echo "${{ secrets.AWS_SSH_KEY }}" > ${private_key} && chmod 400 ${private_key}
337-
./tests/ci-run-e2e.sh ${OPERATOR_IMAGE} ${OPERATOR_VERSION} ${GPU_PRODUCT_NAME} ${TEST_CASE} || rc=$?
338-
./tests/scripts/pull.sh /tmp/logs logs
339-
exit $rc
340-
- name: Archive test logs
341-
if: ${{ failure() }}
342-
uses: actions/upload-artifact@v5
343-
with:
344-
name: containerd-e2e-test-logs
345-
path: ./logs/
346-
retention-days: 15
327+
# echo "instance_hostname=ubuntu@${{ steps.get_public_dns_name.outputs.result }}" >> $GITHUB_ENV
328+
# echo "private_key=${{ github.workspace }}/key.pem" >> $GITHUB_ENV
329+
# - name: Run e2e tests
330+
# env:
331+
# GPU_PRODUCT_NAME: "Tesla-T4"
332+
# SKIP_LAUNCH: "true"
333+
# CONTAINER_RUNTIME: "containerd"
334+
# TEST_CASE: "./tests/cases/defaults.sh"
335+
# run: |
336+
# echo "${{ secrets.AWS_SSH_KEY }}" > ${private_key} && chmod 400 ${private_key}
337+
# ./tests/ci-run-e2e.sh ${OPERATOR_IMAGE} ${OPERATOR_VERSION} ${GPU_PRODUCT_NAME} ${TEST_CASE} || rc=$?
338+
# ./tests/scripts/pull.sh /tmp/logs logs
339+
# exit $rc
340+
# - name: Archive test logs
341+
# if: ${{ failure() }}
342+
# uses: actions/upload-artifact@v5
343+
# with:
344+
# name: containerd-e2e-test-logs
345+
# path: ./logs/
346+
# retention-days: 15
347347

348-
e2e-tests-nvidiadriver:
349-
needs: [build-multi-arch-images]
350-
runs-on: linux-amd64-cpu4
351-
permissions:
352-
contents: read
353-
id-token: write
354-
steps:
355-
- uses: actions/checkout@v5
356-
name: Check out code
357-
- name: Set up Holodeck
358-
uses: NVIDIA/[email protected]
359-
with:
360-
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
361-
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
362-
aws_ssh_key: ${{ secrets.AWS_SSH_KEY }}
363-
holodeck_config: "tests/holodeck.yaml"
364-
- name: Get public dns name
365-
id: get_public_dns_name
366-
uses: mikefarah/yq@master
367-
with:
368-
cmd: yq '.status.properties[] | select(.name == "public-dns-name") | .value' /github/workspace/.cache/holodeck.yaml
369-
- name: Calculate test vars
370-
id: vars
371-
run: |
372-
COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}
373-
echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
374-
LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')
375-
echo "LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')" >> $GITHUB_ENV
348+
# e2e-tests-nvidiadriver:
349+
# needs: [build-multi-arch-images]
350+
# runs-on: linux-amd64-cpu4
351+
# permissions:
352+
# contents: read
353+
# id-token: write
354+
# steps:
355+
# - uses: actions/checkout@v5
356+
# name: Check out code
357+
# - name: Set up Holodeck
358+
# uses: NVIDIA/[email protected]
359+
# with:
360+
# aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
361+
# aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
362+
# aws_ssh_key: ${{ secrets.AWS_SSH_KEY }}
363+
# holodeck_config: "tests/holodeck.yaml"
364+
# - name: Get public dns name
365+
# id: get_public_dns_name
366+
# uses: mikefarah/yq@master
367+
# with:
368+
# cmd: yq '.status.properties[] | select(.name == "public-dns-name") | .value' /github/workspace/.cache/holodeck.yaml
369+
# - name: Calculate test vars
370+
# id: vars
371+
# run: |
372+
# COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}
373+
# echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
374+
# LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')
375+
# echo "LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')" >> $GITHUB_ENV
376376

377-
echo "OPERATOR_VERSION=${COMMIT_SHORT_SHA}" >> $GITHUB_ENV
378-
echo "OPERATOR_IMAGE=ghcr.io/${LOWERCASE_REPO_OWNER}/gpu-operator" >> $GITHUB_ENV
377+
# echo "OPERATOR_VERSION=${COMMIT_SHORT_SHA}" >> $GITHUB_ENV
378+
# echo "OPERATOR_IMAGE=ghcr.io/${LOWERCASE_REPO_OWNER}/gpu-operator" >> $GITHUB_ENV
379379

380-
echo "instance_hostname=ubuntu@${{ steps.get_public_dns_name.outputs.result }}" >> $GITHUB_ENV
381-
echo "private_key=${{ github.workspace }}/key.pem" >> $GITHUB_ENV
382-
- name: Run e2e tests
383-
env:
384-
GPU_PRODUCT_NAME: "Tesla-T4"
385-
SKIP_LAUNCH: "true"
386-
CONTAINER_RUNTIME: "containerd"
387-
TEST_CASE: "./tests/cases/nvidia-driver.sh"
388-
run: |
389-
echo "${{ secrets.AWS_SSH_KEY }}" > ${private_key} && chmod 400 ${private_key}
390-
./tests/ci-run-e2e.sh ${OPERATOR_IMAGE} ${OPERATOR_VERSION} ${GPU_PRODUCT_NAME} ${TEST_CASE} || rc=$?
391-
./tests/scripts/pull.sh /tmp/logs logs
392-
exit $rc
393-
- name: Archive test logs
394-
if: ${{ failure() }}
395-
uses: actions/upload-artifact@v5
396-
with:
397-
name: nvidiadriver-e2e-test-logs
398-
path: ./logs/
399-
retention-days: 15
380+
# echo "instance_hostname=ubuntu@${{ steps.get_public_dns_name.outputs.result }}" >> $GITHUB_ENV
381+
# echo "private_key=${{ github.workspace }}/key.pem" >> $GITHUB_ENV
382+
# - name: Run e2e tests
383+
# env:
384+
# GPU_PRODUCT_NAME: "Tesla-T4"
385+
# SKIP_LAUNCH: "true"
386+
# CONTAINER_RUNTIME: "containerd"
387+
# TEST_CASE: "./tests/cases/nvidia-driver.sh"
388+
# run: |
389+
# echo "${{ secrets.AWS_SSH_KEY }}" > ${private_key} && chmod 400 ${private_key}
390+
# ./tests/ci-run-e2e.sh ${OPERATOR_IMAGE} ${OPERATOR_VERSION} ${GPU_PRODUCT_NAME} ${TEST_CASE} || rc=$?
391+
# ./tests/scripts/pull.sh /tmp/logs logs
392+
# exit $rc
393+
# - name: Archive test logs
394+
# if: ${{ failure() }}
395+
# uses: actions/upload-artifact@v5
396+
# with:
397+
# name: nvidiadriver-e2e-test-logs
398+
# path: ./logs/
399+
# retention-days: 15
400400

401401
release-latest-gpu-operator-image:
402402
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/bundlecommitsha' }} # Runs only if the event is a push to the main branch
403-
needs: [e2e-tests-containerd, e2e-tests-nvidiadriver]
403+
# needs: [e2e-tests-containerd, e2e-tests-nvidiadriver]
404+
needs: [build-multi-arch-images]
404405
runs-on: linux-amd64-cpu4
405406
steps:
406407
- uses: actions/checkout@v5

Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,18 @@ bundle: manifests install-tools
133133
update-bundle-csv:
134134
@echo "Updating GPU operator image in $(BUNDLE_CSV_FILE) to $(OPERATOR_IMAGE_TAG)"
135135
@sed -i -e 's|gpu-operator:[^ " ]*|$(OPERATOR_IMAGE_TAG)|g' $(BUNDLE_CSV_FILE)
136+
@echo "Check if $(BUNDLE_CSV_FILE) is updated"
136137
@cat $(BUNDLE_CSV_FILE)
137138
@echo "Bundle CSV updated successfully"
138139

139140
# Build the bundle image.
140141
build-bundle-image: update-bundle-csv
141-
@echo "Check if $(BUNDLE_CSV_FILE) is updated"
142-
@git diff --exit-code -- $(BUNDLE_CSV_FILE)
143-
@if [ $$? -ne 0 ]; then \
144-
echo "Bundle CSV is not updated"; \
145-
exit 1; \
146-
fi
142+
@git diff --exit-code -- $(BUNDLE_CSV_FILE)
143+
@if [ $$? -ne 0 ]; then \
144+
echo "Bundle CSV is not updated"; \
145+
exit 1; \
146+
fi
147+
@echo "Bundle CSV is updated"
147148
$(DOCKER) build \
148149
--build-arg DEFAULT_CHANNEL=$(DEFAULT_CHANNEL) \
149150
--build-arg GIT_COMMIT=$(GIT_COMMIT) \

0 commit comments

Comments
 (0)