Skip to content

Commit 003ee05

Browse files
committed
ci(e2e): run the e2e gateway from Quay images
Core releases now publish to quay.io/ai-openshell, and ghcr.io/nvidia/openshell is frozen. Wait for the gateway manifest on Quay, point the deployment files of tags cut before core switched them at Quay, and name the Quay image in bump PRs. Refs ai-openshell/openshell#4554 Signed-off-by: Simon Scatton <sscatton@nvidia.com>
1 parent 575d68e commit 003ee05

2 files changed

Lines changed: 13 additions & 6 deletions

File tree

‎scripts/core-sync/open-bump-pr.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ set -euo pipefail
2525

2626
core_repo=${CORE_REPO:-NVIDIA/OpenShell}
2727
sdk_repo=${SDK_REPO:-ai-openshell/sdk-python}
28-
image=ghcr.io/nvidia/openshell/gateway
28+
image=quay.io/ai-openshell/gateway
2929
diff_cap=400
3030

3131
tag=

‎scripts/e2e/start-gateway.sh‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
set -euo pipefail
2525

2626
core_repo=${CORE_REPO:-NVIDIA/OpenShell}
27-
registry=ghcr.io/nvidia/openshell
27+
registry=quay.io/ai-openshell
2828
name=e2e
2929
port=8080
3030
health_port=8081
@@ -50,11 +50,9 @@ echo "$tag" >"$state/core-version"
5050

5151
# Core pushes images after tagging; a proposal can be faster than that.
5252
manifest_exists() {
53-
local token
54-
token=$(curl -fsS "https://ghcr.io/token?scope=repository:nvidia/openshell/gateway:pull" | jq -r .token) || return 1
55-
curl -fsS -o /dev/null -H "Authorization: Bearer $token" \
53+
curl -fsS -o /dev/null \
5654
-H 'Accept: application/vnd.oci.image.index.v1+json,application/vnd.docker.distribution.manifest.list.v2+json,application/vnd.oci.image.manifest.v1+json' \
57-
"https://ghcr.io/v2/nvidia/openshell/gateway/manifests/$semver"
55+
"https://${registry%%/*}/v2/${registry#*/}/gateway/manifests/$semver"
5856
}
5957
for i in $(seq 1 15); do
6058
manifest_exists && break
@@ -70,6 +68,15 @@ done
7068
base="https://raw.githubusercontent.com/$core_repo/$tag/deploy/docker"
7169
curl -fsSL "$base/docker-compose.yml" -o "$state/docker-compose.yml"
7270
curl -fsSL "$base/gateway.toml" -o "$state/gateway.toml"
71+
# Tags cut before core's deployment files moved to Quay still name the frozen
72+
# GHCR registry.
73+
for f in docker-compose.yml gateway.toml; do
74+
sed -i.bak "s#ghcr\.io/nvidia/openshell/#$registry/#g" "$state/$f" && rm -f "$state/$f.bak"
75+
done
76+
grep -q "$registry/gateway:" "$state/docker-compose.yml" || {
77+
echo "ERROR: core's docker-compose.yml at $tag does not use $registry/gateway" >&2
78+
exit 1
79+
}
7380
sed -i.bak \
7481
-e "s#\"$registry/supervisor:latest\"#\"$registry/supervisor:$semver\"#" \
7582
-e "s#\"$registry/sandbox:latest\"#\"$registry/sandbox:$semver\"#" \

0 commit comments

Comments
 (0)