From df97bd79e76872a18224958dde08439ed84386fe Mon Sep 17 00:00:00 2001 From: Matej Vasek Date: Thu, 14 Sep 2023 17:42:42 +0200 Subject: [PATCH] chore: use current func image in tests (#1974) Use a different approach to pass current func image to the tests, this approach does not require modification of task yaml nor access to outer internet (ttl.sh). Signed-off-by: Matej Vasek --- .github/workflows/ci.yaml | 4 ++-- .github/workflows/test-e2e-oncluster-runtime.yaml | 4 ++-- .github/workflows/test-e2e-oncluster.yaml | 4 ++-- .github/workflows/test-integration.yaml | 4 ++-- hack/allocate.sh | 2 ++ hack/create-testing-func-image.sh | 9 ++------- 6 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1f7ee374..ebc8c9d6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -102,10 +102,10 @@ jobs: - uses: imjasonh/setup-ko@v0.6 - name: Install Binaries run: ./hack/binaries.sh - - name: Setup testing func image - run: ./hack/create-testing-func-image.sh - name: Allocate Cluster run: ./hack/allocate.sh + - name: Setup testing func image + run: ./hack/create-testing-func-image.sh - name: Deploy Tekton run: ./hack/tekton.sh - name: Deploy Test Git Server diff --git a/.github/workflows/test-e2e-oncluster-runtime.yaml b/.github/workflows/test-e2e-oncluster-runtime.yaml index fd09f34e..db0c221e 100644 --- a/.github/workflows/test-e2e-oncluster-runtime.yaml +++ b/.github/workflows/test-e2e-oncluster-runtime.yaml @@ -18,10 +18,10 @@ jobs: - uses: imjasonh/setup-ko@v0.6 - name: Install Binaries run: ./hack/binaries.sh - - name: Setup testing func image - run: ./hack/create-testing-func-image.sh - name: Allocate Cluster run: ./hack/allocate.sh + - name: Setup testing func image + run: ./hack/create-testing-func-image.sh - name: Deploy Tekton run: ./hack/tekton.sh - name: Deploy Test Git Server diff --git a/.github/workflows/test-e2e-oncluster.yaml b/.github/workflows/test-e2e-oncluster.yaml index 69b9f895..db4a0436 100644 --- a/.github/workflows/test-e2e-oncluster.yaml +++ b/.github/workflows/test-e2e-oncluster.yaml @@ -18,10 +18,10 @@ jobs: - uses: imjasonh/setup-ko@v0.6 - name: Install Binaries run: ./hack/binaries.sh - - name: Setup testing func image - run: ./hack/create-testing-func-image.sh - name: Allocate Cluster run: ./hack/allocate.sh + - name: Setup testing func image + run: ./hack/create-testing-func-image.sh - name: Deploy Tekton run: ./hack/tekton.sh - name: Deploy Test Git Server diff --git a/.github/workflows/test-integration.yaml b/.github/workflows/test-integration.yaml index fe5dda8c..59e6b544 100644 --- a/.github/workflows/test-integration.yaml +++ b/.github/workflows/test-integration.yaml @@ -18,12 +18,12 @@ jobs: - uses: imjasonh/setup-ko@v0.6 - name: Install Binaries run: ./hack/binaries.sh - - name: Setup testing func image - run: ./hack/create-testing-func-image.sh - name: Local Registry run: ./hack/registry.sh - name: Allocate Cluster run: ./hack/allocate.sh + - name: Setup testing func image + run: ./hack/create-testing-func-image.sh - name: Patch S2I Task run: ./hack/patch-s2i-task.sh - name: Install Tekton diff --git a/hack/allocate.sh b/hack/allocate.sh index 5eabb0e6..8664f1a2 100755 --- a/hack/allocate.sh +++ b/hack/allocate.sh @@ -76,6 +76,8 @@ containerdConfigPatches: endpoint = ["http://func-registry:5000"] [plugins."io.containerd.grpc.v1.cri".registry.mirrors."registry.default.svc.cluster.local:5000"] endpoint = ["http://func-registry:5000"] + [plugins."io.containerd.grpc.v1.cri".registry.mirrors."ghcr.io"] + endpoint = ["http://func-registry:5000"] EOF sleep 10 kubectl wait pod --for=condition=Ready -l '!job-name' -n kube-system --timeout=5m diff --git a/hack/create-testing-func-image.sh b/hack/create-testing-func-image.sh index 90a70603..9433dd02 100755 --- a/hack/create-testing-func-image.sh +++ b/hack/create-testing-func-image.sh @@ -4,12 +4,7 @@ set -o errexit set -o nounset set -o pipefail -KO_DOCKER_REPO="ttl.sh/$(head -c 128