generated from bpmct/coder-project-template
-
Notifications
You must be signed in to change notification settings - Fork 3
/
coder.yaml
47 lines (46 loc) · 1.64 KB
/
coder.yaml
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
46
47
# Use our docs for reference:
# https://coder.com/docs/workspaces/workspaces-as-code/templates
version: 0.2
workspace:
type: "kubernetes"
specs:
kubernetes:
cpu:
value: 6
image:
value: bencdr/team-env:latest
container-based-vm:
value: true
memory:
value: 8
disk:
value: 20
configure:
start:
value:
- name: "Clone the git repository, if it doesn't exist"
env:
GIT_REMOTE: [email protected]:bpmct/team-env.git
CLONE_TO: /home/coder/team-env
command: |
# Check if the project directory already exists
if [ ! -d $CLONE_TO ]; then
# 1. ensure we have GitHub's host key added to known_hosts
touch ~/.ssh/known_hosts
if ! grep github.com ~/.ssh/known_hosts > /dev/null; then
ssh-keyscan github.com >> ~/.ssh/known_hosts 2> /dev/null
fi
2. Clone the project
echo "$CLONE_TO is empty... Cloning"
git clone $GIT_REMOTE $CLONE_TO
else
echo "$CLONE_TO exists ✅"
fi
- name: "Set default folder"
command: curl https://gist.githubusercontent.com/bpmct/b48b99007284444eea94fe9e96d4a329/raw/set_first_dir.sh | sh
env:
PROJECT_FOLDER: /home/coder/team-env
- name: "Install extensions"
command: |
/var/tmp/coder/code-server/bin/code-server --install-extension nickytonline.vscode-gatsby-snippets
/var/tmp/coder/code-server/bin/code-server --install-extension esbenp.prettier-vscode