Skip to content

[local-preview] show DOMAIN in the output #11341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions install/preview/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

set -e

# Set Domain to `127-0-0-1.nip.io` if not set
if [ -z "${DOMAIN}" ]; then
export DOMAIN="127-0-0-1.nip.io"
fi

if [ "$1" != "logging" ]; then
$0 logging 2>&1 | /prettylog
exit
Expand All @@ -26,11 +31,6 @@ if [ "${total_cores}" -lt "${REQUIRED_CORES}" ]; then
exit 1
fi

# Set Domain to `127-0-0-1.nip.io` if not set
if [ -z "${DOMAIN}" ]; then
DOMAIN="127-0-0-1.nip.io"
fi

echo "Gitpod Domain: $DOMAIN"

if [ -f /sys/fs/cgroup/cgroup.controllers ]; then
Expand Down
3 changes: 2 additions & 1 deletion install/preview/prettylog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package main
import (
"bufio"
"errors"
"fmt"
"io"
"os"
"strings"
Expand All @@ -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() {
Expand Down