Skip to content

Commit 5bad08f

Browse files
authored
e2e ci should use built image in e2e tests (#138)
* e2e ci should use built image in e2e tests currently it pulls it from the registry's :latest. Signed-off-by: clux <[email protected]> * ah that needs a name Signed-off-by: clux <[email protected]> * syntax + k3d image import Signed-off-by: clux <[email protected]> * do it from tarball to be sure Signed-off-by: clux <[email protected]> * specific test tag Signed-off-by: clux <[email protected]> * not ends with main Signed-off-by: clux <[email protected]> * ping hooks - 2025-02-08 Signed-off-by: clux <[email protected]> * ugh Signed-off-by: clux <[email protected]> --------- Signed-off-by: clux <[email protected]>
1 parent 8b56cb0 commit 5bad08f

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
type=pep440,pattern={{version}}
3232
type=raw,value=latest,enable={{is_default_branch}}
3333
type=ref,event=pr
34+
type=raw,value=test,enable=${{ !endsWith(github.ref, '/main')}}
3435
3536
- name: Docker login on main origin
3637
uses: docker/login-action@v3
@@ -151,9 +152,9 @@ jobs:
151152
- uses: actions/checkout@v4
152153
- uses: nolar/setup-k3d-k3s@v1
153154
with:
154-
version: v1.27
155+
version: v1.31
155156
k3d-name: kube
156-
k3d-args: "--no-lb --no-rollback --k3s-arg --disable=traefik,servicelb,metrics-server@server:*"
157+
k3d-args: "--no-lb --no-rollback --registry-create reg --k3s-arg --disable=traefik,servicelb,metrics-server@server:*"
157158
- run: kubectl apply -f yaml/crd.yaml
158159
- name: Set up Docker Buildx
159160
uses: docker/setup-buildx-action@v3
@@ -162,13 +163,15 @@ jobs:
162163
with:
163164
name: controller-image
164165
path: /tmp
165-
- name: Load docker image from tarball
166-
run: docker load --input /tmp/image.tar
166+
# - name: Load docker image from tarball
167+
# run: docker load --input /tmp/image.tar
168+
- name: Load image into k3d registry
169+
run: k3d image import /tmp/image.tar --cluster kube --verbose
167170
- name: helm template | kubctl apply
168171
run: |
169172
apiserver="$(kubectl get endpoints kubernetes -ojson | jq '.subsets[0].addresses[0].ip' -r)"
170173
helm template charts/doc-controller \
171-
--set version=latest \
174+
--set version=test \
172175
--set networkPolicy.enabled=true \
173176
--set networkPolicy.apiserver.0=${apiserver}/32 \
174177
| kubectl apply -f -

0 commit comments

Comments
 (0)