-
Notifications
You must be signed in to change notification settings - Fork 471
gmanal - test change #9277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
gmanal - test change #9277
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,157 @@ | ||
| # nvcr.io public-image pull smoke test | ||
| # | ||
| # Goal: confirm the NVIDIA/cccl self-hosted runner pool can pull a | ||
| # canonical public NVIDIA image from nvcr.io. Validates the runner → | ||
| # nvcr.io network path and matches the dominant pattern used across | ||
| # NVIDIA OSS GHA workflows (TensorRT-LLM, apex, NeMo, NVFlare, etc.): | ||
| # anonymous pull from the public nvcr.io/nvidia/* namespace. | ||
| # | ||
| # No registry credentials are required. No secrets are referenced. | ||
| # This test is deliberately scoped to the public nvcr.io/nvidia/* | ||
| # namespace — private-namespace authentication is out of scope and | ||
| # tracked separately. | ||
| # | ||
| # LOG DISCIPLINE | ||
| # PASS/FAIL gates only. No hostnames, no kernel strings, no docker | ||
| # info dumps, no resolved IPs — Actions logs on a public repo are | ||
| # world-readable. | ||
| # | ||
| # TRIGGER | ||
| # - Open a PR against NVIDIA/cccl from a fork. copy-pr-bot (already | ||
| # configured for cccl) mirrors the PR head to a `pull-request/N` | ||
| # branch on the upstream repo, and the workflow runs there on | ||
| # `linux-amd64-cpu4` (self-hosted) with upstream context. Same | ||
| # trust model as `secret-scan.yml`. | ||
| # - "Run workflow" button on the Actions tab (workflow_dispatch). | ||
|
|
||
| name: Test nvcr.io Image Pull (public) | ||
|
|
||
| run-name: nvcr public-pull test — ${{ github.ref_name }} | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| # copy-pr-bot mirror branches — same trigger model as | ||
| # secret-scan.yml and ci-workflow-pull-request.yml. | ||
| - "pull-request/[0-9]+" | ||
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-on-${{ github.event_name }}-from-${{ github.ref_name }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| pull-nvcr-image: | ||
| name: docker pull nvcr.io public image | ||
| # NV self-hosted CPU runner on NVIDIA/cccl; GitHub-hosted fallback | ||
| # so the workflow does not error out on contributor forks where | ||
| # nv-gha-runners labels do not resolve. Mirrors `secret-scan.yml`. | ||
| runs-on: ${{ github.repository == 'NVIDIA/cccl' && 'linux-amd64-cpu4' || 'ubuntu-latest' }} | ||
| env: | ||
| # Canonical public NVIDIA round-trip test image. Public namespace | ||
| # (nvcr.io/nvidia/*); no auth required. Small (~80 MB) for a fast | ||
| # smoke test. Same image NGC docs recommend for verifying nvcr.io | ||
| # connectivity end-to-end. | ||
| NVCR_IMAGE: nvcr.io/nvidia/cuda:12.4.0-base-ubuntu22.04 | ||
|
|
||
| steps: | ||
| - name: Preflight — docker available | ||
| run: | | ||
| set -euo pipefail | ||
| if ! command -v docker >/dev/null 2>&1; then | ||
| echo "::error::docker CLI not found on this runner." | ||
| exit 1 | ||
| fi | ||
| if ! docker version --format '{{.Server.Version}}' >/dev/null 2>&1; then | ||
| echo "::error::docker daemon not reachable from this runner." | ||
| exit 1 | ||
| fi | ||
| echo "docker: OK" | ||
|
|
||
| - name: Network reachability — nvcr.io (PASS/FAIL only) | ||
| run: | | ||
| set -euo pipefail | ||
| if curl --silent --show-error --fail --max-time 15 \ | ||
| --output /dev/null --head https://nvcr.io/v2/; then | ||
| echo "nvcr.io reachability (HTTPS HEAD /v2/): PASS" | ||
| else | ||
| rc=$? | ||
| echo "::error::nvcr.io unreachable (curl exit ${rc})." | ||
| exit "${rc}" | ||
| fi | ||
|
|
||
| - name: Anonymous manifest probe (HTTP 200 expected) | ||
| # Hits the OCI/Docker manifest endpoint with NO auth. For an | ||
| # image in the public nvcr.io/nvidia/* namespace this MUST | ||
| # return 200; anything else is a real signal and fails the | ||
| # test. Cheaper than a full layer pull as a pre-check. | ||
| run: | | ||
| set -euo pipefail | ||
| img="${NVCR_IMAGE#nvcr.io/}" | ||
| if [[ "${img}" == *@* ]]; then | ||
| img_path="${img%@*}"; img_ref="${img##*@}" | ||
| elif [[ "${img}" == *:* ]]; then | ||
| img_path="${img%:*}"; img_ref="${img##*:}" | ||
| else | ||
| img_path="${img}"; img_ref="latest" | ||
| fi | ||
| code="$(curl --silent --show-error --max-time 15 \ | ||
| --output /dev/null --write-out '%{http_code}' \ | ||
| --header 'Accept: application/vnd.oci.image.manifest.v1+json,application/vnd.docker.distribution.manifest.v2+json,application/vnd.oci.image.index.v1+json,application/vnd.docker.distribution.manifest.list.v2+json' \ | ||
| "https://nvcr.io/v2/${img_path}/manifests/${img_ref}" 2>/dev/null || echo '000')" | ||
| case "${code}" in | ||
| 200) echo "anonymous manifest fetch: PASS (HTTP 200)" ;; | ||
| *) echo "::error::anonymous manifest fetch: HTTP ${code} (expected 200 for public namespace)" | ||
| exit 1 ;; | ||
| esac | ||
|
|
||
| - name: docker pull (anonymous) | ||
| run: | | ||
| set -euo pipefail | ||
| if docker pull "${NVCR_IMAGE}" >/dev/null 2>&1; then | ||
| echo "docker pull: PASS" | ||
| else | ||
| rc=$? | ||
| echo "::error::docker pull failed (exit ${rc})." | ||
| exit "${rc}" | ||
| fi | ||
|
|
||
| - name: Sanity — image present locally | ||
| run: | | ||
| set -euo pipefail | ||
| if docker image inspect "${NVCR_IMAGE}" \ | ||
| --format '{{.Architecture}}/{{.Os}} size={{.Size}}' \ | ||
| > /tmp/img_meta 2>/dev/null; then | ||
| echo "image present: PASS ($(cat /tmp/img_meta))" | ||
| else | ||
| echo "::error::image not present locally after pull." | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Cleanup | ||
| if: always() | ||
| run: | | ||
| if [[ -n "${NVCR_IMAGE:-}" ]]; then | ||
| docker rmi "${NVCR_IMAGE}" >/dev/null 2>&1 || true | ||
| fi | ||
|
|
||
| - name: Summary (no runner identity) | ||
| if: always() | ||
| run: | | ||
| { | ||
| echo "### nvcr.io public-image pull smoke test" | ||
| echo | ||
| echo "| Field | Value |" | ||
| echo "|---|---|" | ||
| echo "| Repository | \`${GITHUB_REPOSITORY}\` |" | ||
| echo "| Branch | \`${GITHUB_REF_NAME}\` |" | ||
| echo "| Runner class | \`${RUNNER_OS}/${RUNNER_ARCH}\` |" | ||
| echo "| Image | \`${NVCR_IMAGE}\` |" | ||
| echo "| Job outcome | \`${{ job.status }}\` |" | ||
| echo | ||
| echo "_Step logs contain per-gate PASS/FAIL. Runner hostname,_" | ||
| echo "_kernel, daemon config, and resolved IPs are deliberately not echoed._" | ||
| } >> "${GITHUB_STEP_SUMMARY}" | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.