-
Notifications
You must be signed in to change notification settings - Fork 11
/
.gitpod.yml
45 lines (42 loc) · 1.98 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
33
34
35
36
37
38
39
40
41
42
43
44
45
# This configuration file was automatically generated by Gitpod.
# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml)
# and commit this file to your remote git repository to share the goodness with others.
# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart
tasks:
- before: |
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/focal.gpg | sudo apt-key add - \
&& curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/focal.list | sudo tee /etc/apt/sources.list.d/tailscale.list \
&& sudo apt-get update -q \
&& sudo apt-get install -yq tailscale jq \
&& sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-nft
- command: |
gp sync-await docker
make test
- command: |
cd tests
docker-compose -f docker-compose.yaml -f docker-compose-modbus.yaml up -d
sleep 5
gp sync-done docker
- command: |
go install github.com/onsi/ginkgo/v2/ginkgo@v2.19.0
- name: tailscaled
command: |
if [ -n "${TAILSCALE_STATE_MYPROJECT}" ]; then
# restore the tailscale state from gitpod user's env vars
sudo mkdir -p /var/lib/tailscale
echo "${TAILSCALE_STATE_MYPROJECT}" | sudo tee /var/lib/tailscale/tailscaled.state > /dev/null
fi
sudo tailscaled
- name: tailscale
command: |
if [ -n "${TAILSCALE_STATE_MYPROJECT}" ]; then
sudo -E tailscale up --accept-routes --hostname "gitpod-${GITPOD_GIT_USER_NAME// /-}-$(echo ${GITPOD_WORKSPACE_CONTEXT} | jq -r .repository.name)"
else
sudo -E tailscale up --accept-routes --hostname "gitpod-${GITPOD_GIT_USER_NAME// /-}-$(echo ${GITPOD_WORKSPACE_CONTEXT} | jq -r .repository.name)"
# store the tailscale state into gitpod user
gp env TAILSCALE_STATE_MYPROJECT="$(sudo cat /var/lib/tailscale/tailscaled.state)"
fi
jetbrains:
plugins:
- golang.go
- com.github.intellij.ginkgo