Skip to content

Commit 42ede24

Browse files
committed
Add force use dev latest images leeway script
1 parent 463d5c8 commit 42ede24

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
scripts:
2+
- name: jb-use-dev-latest
3+
script: |
4+
ide_list=("intellij" "goland" "pycharm" "phpstorm" "rubymine" "webstorm" "rider" "clion" "rustrover")
5+
prop_list=("latestImage")
6+
7+
cf_patch=$(kubectl get cm ide-config -o=json | jq '.data."config.json"' |jq -r)
8+
for ide in "${ide_list[@]}"; do
9+
for prop in "${prop_list[@]}"; do
10+
cf_patch=$(echo "$cf_patch" | jq ".ideOptions.options.$ide.$prop = \"eu.gcr.io/gitpod-dev-artifact/build/ide/$ide:latest\"")
11+
done
12+
done
13+
cf_patch=$(echo "$cf_patch" |jq tostring)
14+
cf_patch="{\"data\": {\"config.json\": $cf_patch}}"
15+
# echo "$cf_patch"
16+
17+
kubectl patch cm ide-config --type=merge -p "$cf_patch"
18+
kubectl rollout restart deployment ide-service
19+
kubectl rollout restart deployment server

0 commit comments

Comments
 (0)