From be3052eef6e1d5b7a1ac14c001b83091548e1591 Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Fri, 22 May 2026 11:46:24 +0100 Subject: [PATCH] knotserver: emit ssh command to browse CI logs Signed-off-by: oppiliappan --- knotserver/config/config.go | 1 + knotserver/internal.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/knotserver/config/config.go b/knotserver/config/config.go index a276f714..05b9d709 100644 --- a/knotserver/config/config.go +++ b/knotserver/config/config.go @@ -44,6 +44,7 @@ type Config struct { Server Server `env:",prefix=KNOT_SERVER_"` Git Git `env:",prefix=KNOT_GIT_"` AppViewEndpoint string `env:"APPVIEW_ENDPOINT, default=https://tangled.org"` + LogsHostname string `env:"LOGS_HOSTNAME, default=logs.tangled.org"` KnotMirrors []string `env:"KNOT_MIRRORS, default=https://mirror.tangled.network"` } diff --git a/knotserver/internal.go b/knotserver/internal.go index 6b687197..dcc365e0 100644 --- a/knotserver/internal.go +++ b/knotserver/internal.go @@ -422,6 +422,11 @@ func (h *InternalHandle) triggerPipeline( EventJson: string(eventJson), } + if h.c.LogsHostname != "" { + *clientMsgs = append(*clientMsgs, "→ Browse CI logs in your terminal:") + *clientMsgs = append(*clientMsgs, fmt.Sprintf(" ssh -t %s at://did:web:%s/sh.tangled.pipeline/%s", h.c.LogsHostname, h.c.Server.Hostname, event.Rkey)) + } + return h.db.InsertEvent(event, h.n) } -- 2.51.2