Skip to content

Commit e7ceb9c

Browse files
committed
wip
1 parent 9106a0e commit e7ceb9c

6 files changed

Lines changed: 937 additions & 1407 deletions

File tree

.github/workflows/branch-e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ jobs:
2929
needs: [build-gateway, build-cluster]
3030
uses: ./.github/workflows/e2e-test.yml
3131
with:
32-
image-tag: ${{ github.sha }}
32+
image_tag: ${{ github.sha }}
3333
runner: build-arm64

.github/workflows/docker-build.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,16 @@ on:
3232
required: false
3333
type: string
3434
default: ""
35+
checkout_ref:
36+
description: "Git ref to check out before building"
37+
required: false
38+
type: string
39+
default: ""
40+
image_tag:
41+
description: "Image tag to publish"
42+
required: false
43+
type: string
44+
default: ""
3545

3646
env:
3747
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -55,13 +65,14 @@ jobs:
5565
volumes:
5666
- /var/run/docker.sock:/var/run/docker.sock
5767
env:
58-
IMAGE_TAG: ${{ github.sha }}
68+
IMAGE_TAG: ${{ inputs.image_tag != '' && inputs.image_tag || github.sha }}
5969
IMAGE_REGISTRY: ghcr.io/nvidia/openshell
6070
DOCKER_PUSH: ${{ inputs.push && '1' || '0' }}
6171
DOCKER_PLATFORM: ${{ inputs.platform }}
6272
steps:
6373
- uses: actions/checkout@v4
6474
with:
75+
ref: ${{ inputs.checkout_ref != '' && inputs.checkout_ref || github.ref }}
6576
fetch-depth: 0
6677

6778
- name: Mark workspace safe for git

.github/workflows/e2e-test.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: E2E Test
33
on:
44
workflow_call:
55
inputs:
6-
image-tag:
6+
image_tag:
77
description: "Image tag to test (typically the commit SHA)"
88
required: true
99
type: string
@@ -12,6 +12,11 @@ on:
1212
required: false
1313
type: string
1414
default: "build-amd64"
15+
checkout_ref:
16+
description: "Git ref to check out for the test run"
17+
required: false
18+
type: string
19+
default: ""
1520

1621
permissions:
1722
contents: read
@@ -48,7 +53,7 @@ jobs:
4853
- /var/run/docker.sock:/var/run/docker.sock
4954
env:
5055
MISE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51-
IMAGE_TAG: ${{ inputs.image-tag }}
56+
IMAGE_TAG: ${{ inputs.image_tag }}
5257
OPENSHELL_REGISTRY: ghcr.io/nvidia/openshell
5358
OPENSHELL_REGISTRY_HOST: ghcr.io
5459
OPENSHELL_REGISTRY_NAMESPACE: nvidia/openshell
@@ -57,12 +62,14 @@ jobs:
5762
OPENSHELL_GATEWAY: ${{ matrix.cluster }}
5863
steps:
5964
- uses: actions/checkout@v4
65+
with:
66+
ref: ${{ inputs.checkout_ref != '' && inputs.checkout_ref || github.ref }}
6067

6168
- name: Log in to GHCR
6269
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
6370

6471
- name: Pull cluster image
65-
run: docker pull ghcr.io/nvidia/openshell/cluster:${{ inputs.image-tag }}
72+
run: docker pull ghcr.io/nvidia/openshell/cluster:${{ inputs.image_tag }}
6673

6774
- name: Install Python dependencies and generate protobuf stubs
6875
if: matrix.suite == 'python'
@@ -83,7 +90,7 @@ jobs:
8390
CLUSTER_NAME: ${{ matrix.cluster }}
8491
SKIP_IMAGE_PUSH: "1"
8592
SKIP_CLUSTER_IMAGE_BUILD: "1"
86-
OPENSHELL_CLUSTER_IMAGE: ghcr.io/nvidia/openshell/cluster:${{ inputs.image-tag }}
93+
OPENSHELL_CLUSTER_IMAGE: ghcr.io/nvidia/openshell/cluster:${{ inputs.image_tag }}
8794
run: mise run --no-prepare --skip-deps cluster
8895

8996
- name: Run tests

0 commit comments

Comments
 (0)