Skip to content

Commit cc9ef92

Browse files
committed
[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 <[email protected]>
1 parent 61b3df2 commit cc9ef92

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

install/preview/entrypoint.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ fi
3030
if [ -z "${DOMAIN}" ]; then
3131
DOMAIN="127-0-0-1.nip.io"
3232
fi
33+
export DOMAIN
3334

3435
echo "Gitpod Domain: $DOMAIN"
3536

install/preview/prettylog/main.go

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,29 @@ package main
66
import (
77
"bufio"
88
"errors"
9+
"fmt"
910
"io"
1011
"os"
1112
"strings"
1213

1314
"github.com/pterm/pterm"
1415
)
1516

16-
var msgs = []struct {
17-
Fail string
18-
Success string
17+
func main() {
18+
msgs := []struct {
19+
Fail string
20+
Success string
1921

20-
Msg string
21-
}{
22-
{Msg: "checking prerequisites", Fail: "requires a system with at least", Success: "Gitpod Domain:"},
23-
{Msg: "preparing system", Success: "extracting images to download ahead"},
24-
{Msg: "downloading images", Success: "--output-split-files"},
25-
{Msg: "preparing Gitpod preview installation", Success: "rm -rf /var/lib/rancher/k3s/server/manifests/gitpod"},
26-
{Msg: "starting Gitpod", Success: "gitpod-telemetry-init"},
27-
{Msg: "Gitpod is running"},
28-
}
22+
Msg string
23+
}{
24+
{Msg: "checking prerequisites", Fail: "requires a system with at least", Success: "Gitpod Domain:"},
25+
{Msg: "preparing system", Success: "extracting images to download ahead"},
26+
{Msg: "downloading images", Success: "--output-split-files"},
27+
{Msg: "preparing Gitpod preview installation", Success: "rm -rf /var/lib/rancher/k3s/server/manifests/gitpod"},
28+
{Msg: "starting Gitpod", Success: "gitpod-telemetry-init"},
29+
{Msg: fmt.Sprintf("Gitpod is running. Visit https://%s to access the dashboard", os.Getenv("DOMAIN"))},
30+
}
2931

30-
func main() {
3132
dmp, err := os.OpenFile("logs.txt", os.O_WRONLY|os.O_TRUNC|os.O_CREATE, 0644)
3233
if err != nil {
3334
panic(err)

0 commit comments

Comments
 (0)