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 2fc669a6..faa40fc9 100644 --- a/knotserver/internal.go +++ b/knotserver/internal.go @@ -421,6 +421,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) }