Skip to content

Commit

Permalink
[local-preview] Update status messages to depend on echo'sh
Browse files Browse the repository at this point in the history
With the removal of `-x` option in bash, We can't rely on the
commands anymore and instead have to start using `echo` messages
to match statuses in `prettylog`.

This PR updates the remaining statuses on the
same.

Signed-off-by: Tarun Pothulapati <[email protected]>
  • Loading branch information
Pothulapati authored and roboquat committed Nov 3, 2022
1 parent d686ea9 commit f245a47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions install/preview/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ done

ctr images pull "docker.io/gitpod/workspace-full:latest" >/dev/null &

echo "images pulled"
/gitpod-installer render --use-experimental-config --config config.yaml --output-split-files /var/lib/rancher/k3s/server/manifests/gitpod

# store files in `gitpod.debug` for debugging purposes
Expand Down Expand Up @@ -235,6 +236,7 @@ mv -f /app/manifests/coredns.yaml /var/lib/rancher/k3s/server/manifests/custom-c
for f in /var/lib/rancher/k3s/server/manifests/gitpod/*.yaml; do (cat "$f"; echo) >> /var/lib/rancher/k3s/server/manifests/gitpod.yaml; done
rm -rf /var/lib/rancher/k3s/server/manifests/gitpod

echo "manifests generated"
# waits for gitpod pods to be ready, and manually runs the `gitpod-telemetry` cronjob
run_telemetry(){
# wait for the k3s cluster to be ready and Gitpod workloads are added
Expand Down
4 changes: 2 additions & 2 deletions install/preview/prettylog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ var (
}{
{Msg: "checking prerequisites", Fail: "requires a system with at least", Success: "Gitpod Domain:", Status: "checking prerequisites"},
{Msg: "preparing system", Success: "extracting images to download ahead"},
{Msg: "downloading images", Success: "--output-split-files"},
{Msg: "preparing Gitpod preview installation", Success: "rm -rf /var/lib/rancher/k3s/server/manifests/gitpod"},
{Msg: "downloading images", Success: "images pulled"},
{Msg: "preparing Gitpod preview installation", Success: "manifests generated"},
{Msg: "starting Gitpod", Success: "Gitpod pods are ready", Status: "starting gitpod"},
{Msg: fmt.Sprintf("Gitpod is running. Visit https://%s to access the dashboard", os.Getenv("DOMAIN")), Status: "gitpod ready"},
}
Expand Down

0 comments on commit f245a47

Please sign in to comment.