Skip to content

Commit 267953e

Browse files
PothulapatiSimon Emms
authored and
Simon Emms
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 6332ec4 commit 267953e

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

install/preview/entrypoint.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
set -e
66

7+
# Set Domain to `127-0-0-1.nip.io` if not set
8+
if [ -z "${DOMAIN}" ]; then
9+
export DOMAIN="127-0-0-1.nip.io"
10+
fi
11+
712
if [ "$1" != "logging" ]; then
813
$0 logging 2>&1 | /prettylog
914
exit
@@ -26,11 +31,6 @@ if [ "${total_cores}" -lt "${REQUIRED_CORES}" ]; then
2631
exit 1
2732
fi
2833

29-
# Set Domain to `127-0-0-1.nip.io` if not set
30-
if [ -z "${DOMAIN}" ]; then
31-
DOMAIN="127-0-0-1.nip.io"
32-
fi
33-
3434
echo "Gitpod Domain: $DOMAIN"
3535

3636
if [ -f /sys/fs/cgroup/cgroup.controllers ]; then

install/preview/prettylog/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package main
66
import (
77
"bufio"
88
"errors"
9+
"fmt"
910
"io"
1011
"os"
1112
"strings"
@@ -24,7 +25,7 @@ var msgs = []struct {
2425
{Msg: "downloading images", Success: "--output-split-files"},
2526
{Msg: "preparing Gitpod preview installation", Success: "rm -rf /var/lib/rancher/k3s/server/manifests/gitpod"},
2627
{Msg: "starting Gitpod", Success: "gitpod-telemetry-init"},
27-
{Msg: "Gitpod is running"},
28+
{Msg: fmt.Sprintf("Gitpod is running. Visit https://%s to access the dashboard", os.Getenv("DOMAIN"))},
2829
}
2930

3031
func main() {

0 commit comments

Comments
 (0)