diff --git a/.github/workflows/test-e2e-oncluster.yaml b/.github/workflows/test-e2e-oncluster.yaml index e88a8df94..d19cee724 100644 --- a/.github/workflows/test-e2e-oncluster.yaml +++ b/.github/workflows/test-e2e-oncluster.yaml @@ -30,6 +30,7 @@ jobs: - name: E2E On Cluster Test env: E2E_RUNTIMES: "" + E2E_REGISTRY_URL: registry.default.svc.cluster.local:5000 FUNC_REPO_REF: ${{ github.event.pull_request.head.repo.full_name }} FUNC_REPO_BRANCH_REF: ${{ github.head_ref }} run: make test-e2e-on-cluster diff --git a/pkg/docker/pusher.go b/pkg/docker/pusher.go index bdc7b3fbb..2f85e0c30 100644 --- a/pkg/docker/pusher.go +++ b/pkg/docker/pusher.go @@ -201,7 +201,8 @@ func (n *Pusher) pushImage(ctx context.Context, f fn.Function, credentials Crede if err == nil { return digest, nil } - if strings.Contains(err.Error(), "no such host") { + errStr := err.Error() + if strings.Contains(errStr, "no such host") || strings.Contains(errStr, "failure in name resolution") { // push with custom transport to be able to push into cluster private registries return n.push(ctx, f, credentials, output) } diff --git a/pkg/pipelines/tekton/gitlab_test.go b/pkg/pipelines/tekton/gitlab_test.go index f53a1dc59..5da692903 100644 --- a/pkg/pipelines/tekton/gitlab_test.go +++ b/pkg/pipelines/tekton/gitlab_test.go @@ -67,7 +67,7 @@ func TestGitlab(t *testing.T) { ns := usingNamespace(t) t.Logf("testing in namespace: %q", ns) - funcImg := fmt.Sprintf("ttl.sh/func/fn-%s:5m", uuid.NewUUID()) + funcImg := fmt.Sprintf("registry.default.svc.cluster.local:5000/fn-%s", uuid.NewUUID()) f := fn.Function{ Root: projDir,