Skip to content

Commit 3145c9d

Browse files
geroplona-agent
andauthored
[dev] Improve devcontainer, add automations (#20966)
* [dev] Improve devcontainer, add automations Co-authored-by: Ona <[email protected]> * Review comments Co-authored-by: Ona <[email protected]> --------- Co-authored-by: Ona <[email protected]>
1 parent 2623563 commit 3145c9d

File tree

4 files changed

+88
-45
lines changed

4 files changed

+88
-45
lines changed

.devcontainer/devcontainer.json

Lines changed: 35 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,38 @@
11
{
2-
"name": "gitpod",
3-
"build": {
4-
"context": "..",
5-
"dockerfile": "./Dockerfile"
6-
},
7-
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace/gitpod,type=bind",
8-
"workspaceFolder": "/workspace/gitpod/",
9-
"postCreateCommand": "dev/install-dependencies.sh",
10-
"mounts": [
11-
"source=/usr/local/gitpod/config/,target=/usr/local/gitpod/config/,type=bind"
12-
],
13-
"remoteEnv": {
14-
"GIT_EDITOR": "code --wait",
15-
"KUBE_EDITOR": "code --wait"
16-
},
17-
"features": {
18-
"ghcr.io/devcontainers/features/docker-in-docker:2": {
19-
"installDockerComposeSwitch": false
20-
}
21-
},
22-
"customizations": {
23-
"vscode": {
24-
"extensions": [
25-
"EditorConfig.EditorConfig",
26-
"golang.go",
27-
"hashicorp.terraform",
28-
"ms-azuretools.vscode-docker",
29-
"ms-kubernetes-tools.vscode-kubernetes-tools",
30-
"stkb.rewrap",
31-
"zxh404.vscode-proto3",
32-
"matthewpi.caddyfile-support",
33-
"timonwong.shellcheck",
34-
"fwcd.kotlin",
35-
"dbaeumer.vscode-eslint",
36-
"esbenp.prettier-vscode",
37-
"hbenl.vscode-mocha-test-adapter"
38-
]
39-
}
2+
"name": "gitpod",
3+
"build": {
4+
"context": "..",
5+
"dockerfile": "./Dockerfile"
6+
},
7+
"features": {
8+
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
9+
},
10+
"workspaceFolder": "/workspace/gitpod",
11+
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace/gitpod,type=bind",
12+
"mounts": [
13+
"source=/usr/local/gitpod/config/,target=/usr/local/gitpod/config/,type=bind"
14+
],
15+
"remoteEnv": {
16+
"GIT_EDITOR": "code --wait",
17+
"KUBE_EDITOR": "code --wait"
18+
},
19+
"customizations": {
20+
"vscode": {
21+
"extensions": [
22+
"EditorConfig.EditorConfig",
23+
"golang.go",
24+
"hashicorp.terraform",
25+
"ms-azuretools.vscode-docker",
26+
"ms-kubernetes-tools.vscode-kubernetes-tools",
27+
"stkb.rewrap",
28+
"zxh404.vscode-proto3",
29+
"matthewpi.caddyfile-support",
30+
"timonwong.shellcheck",
31+
"fwcd.kotlin",
32+
"dbaeumer.vscode-eslint",
33+
"esbenp.prettier-vscode",
34+
"hbenl.vscode-mocha-test-adapter"
35+
]
4036
}
37+
}
4138
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,6 @@ dump.rdb
6464

6565
# Claude settings
6666
.claude/settings.local.json
67+
68+
# Gitpod mcp-config.json
69+
.gitpod/mcp-config.json

.gitpod/automations.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
tasks:
2+
installLocalAppCli:
3+
command: |
4+
leeway run components/local-app:install-cli
5+
leeway run components/local-app:cli-completion
6+
exit 0
7+
name: 'Install `gitpod` CLI'
8+
triggeredBy:
9+
- postDevcontainerStart
10+
configurePreview:
11+
command: INSTALL_CONTEXT=true leeway run dev/preview:configure-workspace
12+
dependsOn:
13+
- installPreviewctl
14+
name: 'Preview environment configuration'
15+
triggeredBy:
16+
- postDevcontainerStart
17+
buildJava:
18+
command: |
19+
leeway exec --package components/supervisor-api/java:lib --package components/gitpod-protocol/java:lib -- ./gradlew build
20+
leeway exec --package components/ide/jetbrains/backend-plugin:plugin-latest --package components/ide/jetbrains/gateway-plugin:publish-latest --parallel -- ./gradlew buildPlugin
21+
name: 'Java: build with Gradle'
22+
installPreviewctl:
23+
command: leeway run dev/preview/previewctl:install
24+
name: 'Preview environment configuration: init'
25+
installInstallerDependencies:
26+
command: |
27+
(cd install/installer && make deps)
28+
exit 0
29+
name: 'Installer dependencies'
30+
triggeredBy:
31+
- postDevcontainerStart
32+
buildTypescript:
33+
command: yarn --network-timeout 100000 && yarn build
34+
name: 'TypeScript: install and build'
35+
triggeredBy:
36+
- postDevcontainerStart
37+
setupPreCommit:
38+
command: |
39+
pre-commit install --install-hooks
40+
exit 0
41+
name: 'Install pre-commit hooks'
42+
triggeredBy:
43+
- postDevcontainerStart
44+
initGo:
45+
command: |
46+
./components/gitpod-protocol/go/scripts/generate-config.sh
47+
leeway exec --filter-type go -v -- go mod verify
48+
name: 'Go: init'
49+
triggeredBy:
50+
- postDevcontainerStart

dev/install-dependencies.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)