Skip to content

Update debug script #8606

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
Mar 4, 2022
Merged
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
13 changes: 8 additions & 5 deletions components/ws-daemon/debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
#
# BEWARE: the properly built version of ws-daemon may behave differently.

set -Eeuo pipefail

docker ps &> /dev/null || (echo "You need a working Docker daemon. Maybe set DOCKER_HOST?"; exit 1)
gcloud auth list | grep typefox &>/dev/null || (echo "Login using 'gcloud auth login' for the docker push to work"; exit 1)

leeway build .:docker -Dversion=dev
devImage=eu.gcr.io/gitpod-dev/ws-daemon:dev
version=dev-0
leeway build .:docker -Dversion="$version" -DimageRepoBase=eu.gcr.io/gitpod-core-dev/dev
devImage=eu.gcr.io/gitpod-core-dev/dev/ws-daemon:"$version"

kubectl patch daemonset ws-daemon --patch '{"spec": {"template": {"spec": {"containers": [{"name": "ws-daemon","image": "'$devImage'"}]}}}}'
kubectl get pods --no-headers -o=custom-columns=:metadata.name | grep ws-daemon | xargs kubectl delete pod
kubectl set image daemonset ws-daemon ws-daemon="$devImage"
kubectl annotate daemonset ws-daemon kubernetes.io/change-cause="$version"
kubectl rollout restart daemonset ws-daemon