From aeaecaf565dd0285934c4751702fd86a901aa9a2 Mon Sep 17 00:00:00 2001 From: Tarun Pothulapati Date: Wed, 13 Jul 2022 09:54:45 +0000 Subject: [PATCH] [local-preview] show `DOMAIN` in the output This PR updates the `local-preview` to printout the Domain of the Gitpod Instance for users to access. Signed-off-by: Tarun Pothulapati --- install/preview/entrypoint.sh | 3 ++- install/preview/prettylog/main.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/install/preview/entrypoint.sh b/install/preview/entrypoint.sh index 75440f6c65bad6..0b6501a5699f29 100755 --- a/install/preview/entrypoint.sh +++ b/install/preview/entrypoint.sh @@ -28,8 +28,9 @@ fi # Set Domain to `127-0-0-1.nip.io` if not set if [ -z "${DOMAIN}" ]; then - DOMAIN="127-0-0-1.nip.io" + export DOMAIN="127-0-0-1.nip.io" fi +export DOMAIN echo "Gitpod Domain: $DOMAIN" diff --git a/install/preview/prettylog/main.go b/install/preview/prettylog/main.go index 26f31e7f81fb1d..cfecf8a6f3c8e4 100644 --- a/install/preview/prettylog/main.go +++ b/install/preview/prettylog/main.go @@ -6,6 +6,7 @@ package main import ( "bufio" "errors" + "fmt" "io" "os" "strings" @@ -24,7 +25,7 @@ var msgs = []struct { {Msg: "downloading images", Success: "--output-split-files"}, {Msg: "preparing Gitpod preview installation", Success: "rm -rf /var/lib/rancher/k3s/server/manifests/gitpod"}, {Msg: "starting Gitpod", Success: "gitpod-telemetry-init"}, - {Msg: "Gitpod is running"}, + {Msg: fmt.Sprintf("Gitpod is running. Visit https://%s to access the dashboard", os.Getenv("DOMAIN"))}, } func main() {