From 9f07a90f7ed2998e4b05e4b9270ec8d25fa177a0 Mon Sep 17 00:00:00 2001 From: Carl Thomas Date: Wed, 12 Aug 2026 23:33:17 +0000 Subject: [PATCH] Configure Ona devcontainer tasks Co-authored-by: Codex --- .devcontainer/devcontainer.json | 74 +++++++++++++++++++++++++++++++-- .ona/config.yaml | 73 ++++++++++++++++++++++++++++++++ 2 files changed, 143 insertions(+), 4 deletions(-) create mode 100644 .ona/config.yaml diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 554d3279f52a0f..629c03d380c3b5 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,16 +5,82 @@ "dockerfile": "./Dockerfile" }, "features": { - "ghcr.io/devcontainers/features/docker-in-docker:2": { - "version": "28" - } + "ghcr.io/devcontainers/features/docker-in-docker": {} }, "workspaceFolder": "/workspace/gitpod", "workspaceMount": "source=${localWorkspaceFolder},target=/workspace/gitpod,type=bind", "mounts": [ "source=/usr/local/gitpod/config/,target=/usr/local/gitpod/config/,type=bind" ], - "onCreateCommand": "bash /workspace/gitpod/dev/setup-github-auth.sh", + "forwardPorts": [ + 1337, + 3000, + 3001, + 3306, + 4000, + 5900, + 6080, + 7777, + 9229, + 9999, + 13001, + 13444, + 8022 + ], + "portsAttributes": { + "1337": { + "label": "Preview", + "onAutoForward": "openPreview" + }, + "3000": { + "label": "Application", + "onAutoForward": "ignore" + }, + "3001": { + "label": "Application", + "onAutoForward": "ignore" + }, + "3306": { + "label": "MySQL", + "onAutoForward": "ignore" + }, + "4000": { + "label": "Application", + "onAutoForward": "ignore" + }, + "5900": { + "label": "VNC", + "onAutoForward": "ignore" + }, + "6080": { + "label": "noVNC", + "onAutoForward": "ignore" + }, + "7777": { + "label": "Werft", + "onAutoForward": "ignore" + }, + "9229": { + "label": "Node Inspector", + "onAutoForward": "ignore" + }, + "9999": { + "label": "Go Proxy", + "onAutoForward": "ignore" + }, + "13001": { + "label": "Application", + "onAutoForward": "ignore" + }, + "13444": { + "label": "Dev Theia", + "onAutoForward": "notify" + }, + "8022": { + "label": "Preview SSH", + "onAutoForward": "ignore" + } + }, "remoteEnv": { "GIT_EDITOR": "code --wait", "KUBE_EDITOR": "code --wait" diff --git a/.ona/config.yaml b/.ona/config.yaml new file mode 100644 index 00000000000000..f59f7dd11aa771 --- /dev/null +++ b/.ona/config.yaml @@ -0,0 +1,73 @@ +tasks: + installDependencies: + name: Install dependencies + description: Install repository dependencies and local development hooks. + command: | + yarn --network-timeout 100000 + (cd install/installer && make deps) + pre-commit install --install-hooks + triggeredBy: + - manual + - postDevcontainerStart + - prebuild + + setupGithubAuth: + name: Setup GitHub CLI auth + description: Configure shell profiles to source the repository GitHub token helper. + command: | + github_token_helper="$PWD/dev/github-token.sh" + for profile in "$HOME/.bashrc" "$HOME/.zshrc"; do + touch "$profile" + if ! grep -qF "source \"$github_token_helper\"" "$profile"; then + { + echo + echo "# GitHub token helper" + echo "source \"$github_token_helper\"" + } >> "$profile" + fi + done + source "$github_token_helper" + triggeredBy: + - manual + - postDevcontainerStart + + installLocalAppCli: + name: Install gitpod CLI + description: Build and install the local gitpod CLI and shell completion. + command: | + leeway run components/local-app:install-cli + leeway run components/local-app:cli-completion + triggeredBy: + - manual + - postDevcontainerStart + + initGo: + name: Go init + description: Generate Go configuration types and verify Go modules. + command: | + ./components/gitpod-protocol/go/scripts/generate-config.sh + leeway exec --filter-type go -v -- go mod verify + triggeredBy: + - manual + - postDevcontainerStart + + buildTypescript: + name: TypeScript build + description: Build TypeScript packages. + command: | + yarn build + dependsOn: + - installDependencies + triggeredBy: + - manual + + buildJava: + name: Java build + description: Build Java libraries and JetBrains plugins with Gradle. + command: | + leeway exec --package components/supervisor-api/java:lib --package components/gitpod-protocol/java:lib -- ./gradlew build + leeway exec --package components/ide/jetbrains/backend-plugin:plugin-latest --package components/ide/jetbrains/gateway-plugin:publish-latest --parallel -- ./gradlew buildPlugin + dependsOn: + - installDependencies + triggeredBy: + - manual