forked from gbrah/gitpod-android-studio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitpod.yml
32 lines (30 loc) · 1.03 KB
/
.gitpod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
image:
file: .gitpod.Dockerfile
tasks:
# Add this workspace to your tailscale.com account for tunneling the Android device
- name: tailscaled
command: |
if [ -n "${TS_STATE_TAILSCALE_EXAMPLE}" ]; then
# restore the tailscale state from gitpod user's env vars
sudo mkdir -p /var/lib/tailscale
echo "${TS_STATE_TAILSCALE_EXAMPLE}" | sudo tee /var/lib/tailscale/tailscaled.state > /dev/null
fi
sudo tailscaled
- name: androidstudio
command: |
$HOME/android-studio/bin/studio.sh
- name: tailscale
command: |
if [ -n "${TS_STATE_TAILSCALE_EXAMPLE}" ]; then
sudo -E tailscale up
else
sudo -E tailscale up --hostname "gitpod-${GITPOD_GIT_USER_NAME// /-}-$(echo ${GITPOD_WORKSPACE_CONTEXT} | jq -r .repository.name)"
# store the tailscale state into gitpod user
gp env TS_STATE_TAILSCALE_EXAMPLE="$(sudo cat /var/lib/tailscale/tailscaled.state)"
fi
ports:
- port: 5900
onOpen: ignore
# vnc
- port: 6080
onOpen: open-preview