Remove usage of ttl.sh (#2653)

* Remove usage of ttl.sh

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Fix detection of host resolution failure

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
This commit is contained in:
Matej Vašek 2025-01-21 07:32:09 +01:00 committed by GitHub
parent 6c5b7613a1
commit d2aa94d30a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 2 deletions

View File

@ -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

View File

@ -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)
}

View File

@ -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,