- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.3k
 
[dev] Improve devcontainer, add automations #20966
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Changes from 1 commit
      Commits
    
    
            Show all changes
          
          
            2 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      
    File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,41 +1,121 @@ | ||
| { | ||
| "name": "gitpod", | ||
| "build": { | ||
| "context": "..", | ||
| "dockerfile": "./Dockerfile" | ||
| }, | ||
| "workspaceMount": "source=${localWorkspaceFolder},target=/workspace/gitpod,type=bind", | ||
| "workspaceFolder": "/workspace/gitpod/", | ||
| "postCreateCommand": "dev/install-dependencies.sh", | ||
| "mounts": [ | ||
| "source=/usr/local/gitpod/config/,target=/usr/local/gitpod/config/,type=bind" | ||
| ], | ||
| "remoteEnv": { | ||
| "GIT_EDITOR": "code --wait", | ||
| "KUBE_EDITOR": "code --wait" | ||
| }, | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/docker-in-docker:2": { | ||
| "installDockerComposeSwitch": false | ||
| } | ||
| }, | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "EditorConfig.EditorConfig", | ||
| "golang.go", | ||
| "hashicorp.terraform", | ||
| "ms-azuretools.vscode-docker", | ||
| "ms-kubernetes-tools.vscode-kubernetes-tools", | ||
| "stkb.rewrap", | ||
| "zxh404.vscode-proto3", | ||
| "matthewpi.caddyfile-support", | ||
| "timonwong.shellcheck", | ||
| "fwcd.kotlin", | ||
| "dbaeumer.vscode-eslint", | ||
| "esbenp.prettier-vscode", | ||
| "hbenl.vscode-mocha-test-adapter" | ||
| ] | ||
| } | ||
| "name": "gitpod", | ||
| "build": { | ||
| "context": "..", | ||
| "dockerfile": "./Dockerfile" | ||
| }, | ||
| "features": { | ||
| "ghcr.io/devcontainers/features/docker-in-docker:2": {} | ||
| }, | ||
| "workspaceFolder": "/workspace/gitpod", | ||
| "workspaceMount": "source=${localWorkspaceFolder},target=/workspace/gitpod,type=bind", | ||
| "mounts": [ | ||
| "source=/usr/local/gitpod/config/,target=/usr/local/gitpod/config/,type=bind" | ||
| ], | ||
| "remoteEnv": { | ||
| "GIT_EDITOR": "code --wait", | ||
| "KUBE_EDITOR": "code --wait" | ||
| }, | ||
| "forwardPorts": [ | ||
| 1337, | ||
| 3000, | ||
| 3001, | ||
| 3306, | ||
| 4000, | ||
| 5900, | ||
| 6080, | ||
| 7777, | ||
| 9229, | ||
| 9999, | ||
| 13001, | ||
| 13444, | ||
| 8022 | ||
| ], | ||
| "portsAttributes": { | ||
| "13001": { | ||
| "label": "Port 13001", | ||
| "onAutoForward": "ignore", | ||
| "elevateIfNeeded": true | ||
| }, | ||
| "1337": { | ||
| "label": "Port 1337", | ||
| "onAutoForward": "openPreview", | ||
| "elevateIfNeeded": true | ||
| }, | ||
| "13444": { | ||
| "label": "Port 13444", | ||
| "elevateIfNeeded": true | ||
| }, | ||
| "3000": { | ||
| "label": "Port 3000", | ||
| "onAutoForward": "ignore", | ||
| "elevateIfNeeded": true | ||
| }, | ||
| "3001": { | ||
| "label": "Port 3001", | ||
| "onAutoForward": "ignore", | ||
| "elevateIfNeeded": true | ||
| }, | ||
| "3306": { | ||
| "label": "Port 3306", | ||
| "onAutoForward": "ignore", | ||
| "elevateIfNeeded": true | ||
| }, | ||
| "4000": { | ||
| "label": "Port 4000", | ||
| "onAutoForward": "ignore", | ||
| "elevateIfNeeded": true | ||
| }, | ||
| "5900": { | ||
| "label": "Port 5900", | ||
| "onAutoForward": "ignore", | ||
| "elevateIfNeeded": true | ||
| }, | ||
| "6080": { | ||
| "label": "Port 6080", | ||
| "onAutoForward": "ignore", | ||
| "elevateIfNeeded": true | ||
| }, | ||
| "7777": { | ||
| "label": "Port 7777", | ||
| "onAutoForward": "ignore", | ||
| "elevateIfNeeded": true | ||
| }, | ||
| "8022": { | ||
| "label": "Port 8022", | ||
| "onAutoForward": "ignore", | ||
| "elevateIfNeeded": true | ||
| }, | ||
| "9229": { | ||
| "label": "Port 9229", | ||
| "onAutoForward": "ignore", | ||
| "elevateIfNeeded": true | ||
| }, | ||
| "9999": { | ||
| "label": "Port 9999", | ||
| "onAutoForward": "ignore", | ||
| "elevateIfNeeded": true | ||
| } | ||
| }, | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "EditorConfig.EditorConfig", | ||
| "golang.go", | ||
| "hashicorp.terraform", | ||
| "ms-azuretools.vscode-docker", | ||
| "ms-kubernetes-tools.vscode-kubernetes-tools", | ||
| "stkb.rewrap", | ||
| "zxh404.vscode-proto3", | ||
| "matthewpi.caddyfile-support", | ||
| "heptio.jsonnet", | ||
| "timonwong.shellcheck", | ||
| "fwcd.kotlin", | ||
| "dbaeumer.vscode-eslint", | ||
| "esbenp.prettier-vscode", | ||
| "akosyakov.gitpod-monitor", | ||
| "hbenl.vscode-mocha-test-adapter" | ||
| ] | ||
| } | ||
| } | ||
| } | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -64,3 +64,6 @@ dump.rdb | |
| 
     | 
||
| # Claude settings | ||
| .claude/settings.local.json | ||
| 
     | 
||
| # Gitpod mcp-config.json | ||
| .gitpod/mcp-config.json | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| tasks: | ||
| removeADCFile: | ||
| command: | | ||
| if [[ -n "${GCP_ADC_FILE}" ]]; then | ||
                
      
                  geropl marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| echo "$GCP_ADC_FILE" > "/home/gitpod/.config/gcloud/application_default_credentials.json" | ||
| yes | gcloud auth application-default revoke | ||
| gp env -u GCP_ADC_FILE | ||
| fi | ||
| exit 0 | ||
| name: 'Remove GCP_ADC_FILE' | ||
| triggeredBy: | ||
| - postDevcontainerStart | ||
| installLocalAppCli: | ||
| command: | | ||
| leeway run components/local-app:install-cli | ||
| leeway run components/local-app:cli-completion | ||
| exit 0 | ||
| name: 'Install `gitpod` CLI' | ||
| triggeredBy: | ||
| - postDevcontainerStart | ||
| configurePreview: | ||
| command: INSTALL_CONTEXT=true leeway run dev/preview:configure-workspace | ||
| dependsOn: | ||
| - installPreviewctl | ||
| name: 'Preview environment configuration' | ||
| triggeredBy: | ||
| - postDevcontainerStart | ||
| buildJava: | ||
| command: | | ||
| if [ -z "$RUN_GRADLE_TASK" ]; then | ||
| read -r -p "Press enter to continue Java gradle task" | ||
| fi | ||
                
      
                  geropl marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| 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 | ||
| name: 'Java: build with Gradle' | ||
| setupClaudeCode: | ||
| command: | | ||
| if [[ -z "${CLAUDE_JSON}" ]]; then | ||
| echo "Skipping setup for Claude Code. Setup a CLAUDE_JSON variable to reuse Claude Code in workspaces." | ||
| else | ||
| echo $CLAUDE_JSON > ~/.claude.json | ||
| fi | ||
| name: 'claude code' | ||
| triggeredBy: | ||
| - postDevcontainerStart | ||
                
      
                  geropl marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| installPreviewctl: | ||
| command: leeway run dev/preview/previewctl:install | ||
| name: 'Preview environment configuration: init' | ||
| installInstallerDependencies: | ||
| command: | | ||
| (cd install/installer && make deps) | ||
| exit 0 | ||
| name: 'Installer dependencies' | ||
| triggeredBy: | ||
| - postDevcontainerStart | ||
| buildTypescript: | ||
| command: yarn --network-timeout 100000 && yarn build | ||
| name: 'TypeScript: install and build' | ||
| triggeredBy: | ||
| - postDevcontainerStart | ||
| setupPreCommit: | ||
| command: | | ||
| pre-commit install --install-hooks | ||
| exit 0 | ||
| name: 'Install pre-commit hooks' | ||
| triggeredBy: | ||
| - postDevcontainerStart | ||
| initGo: | ||
| command: | | ||
| ./components/gitpod-protocol/go/scripts/generate-config.sh | ||
| leeway exec --filter-type go -v -- go mod verify | ||
| name: 'Go: init' | ||
| triggeredBy: | ||
| - postDevcontainerStart | ||
This file was deleted.
      
      Oops, something went wrong.
      
    
  
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.