Skip to content

Commit 748e1f7

Browse files
authored
Add Claude Code for Gitpod and Gitpod Classic (#20892)
* Add CLAUDE.md file * Install claude code for Gitpod * Install Claude Code for Gitpod Classic * Bump dev image * Use image with claude code cli * Fix devcontainer build maven 3.9.9 is no longer available Bump java to have parity with workspace-images
1 parent b831dff commit 748e1f7

File tree

16 files changed

+76
-22
lines changed

16 files changed

+76
-22
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,15 +293,15 @@ RUN mkdir -p ~/.terraform \
293293
&& printf "terraform -install-autocomplete 2> /dev/null\n" >>~/.bashrc
294294

295295
## Java
296-
ENV JAVA_VERSION=11.0.23.fx-zulu
296+
ENV JAVA_VERSION=11.0.27.fx-zulu
297297
RUN curl -fsSL "https://get.sdkman.io" | bash \
298298
&& bash -c ". /root/.sdkman/bin/sdkman-init.sh \
299299
&& sed -i 's/sdkman_selfupdate_enable=true/sdkman_selfupdate_enable=false/g' /root/.sdkman/etc/config \
300300
&& sed -i 's/sdkman_selfupdate_feature=true/sdkman_selfupdate_feature=false/g' /root/.sdkman/etc/config \
301301
&& sdk install java ${JAVA_VERSION} \
302302
&& sdk default java ${JAVA_VERSION} \
303303
&& sdk install gradle \
304-
&& sdk install maven \
304+
&& sdk install maven 3.9.10 \
305305
&& sdk flush archives \
306306
&& sdk flush temp \
307307
&& mkdir /root/.m2 \
@@ -320,7 +320,7 @@ RUN curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh |
320320
&& bash -c ". $HOME/.nvm/nvm.sh \
321321
&& nvm install v${NODE_VERSION} \
322322
&& nvm alias default v${NODE_VERSION} \
323-
&& npm install -g typescript yarn pnpm node-gyp"
323+
&& npm install -g typescript yarn pnpm node-gyp @anthropic-ai/claude-code"
324324

325325
ENV PATH=$PATH:/root/.aws-iam:/root/.terraform:/workspace/bin
326326

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
1+
FROM eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
22

33
COPY entrypoint.sh /entrypoint.sh
44
ENTRYPOINT ["/entrypoint.sh"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
1+
FROM eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
22

33
COPY entrypoint.sh /entrypoint.sh
44
ENTRYPOINT ["/entrypoint.sh"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
1+
FROM eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
22

33
COPY entrypoint.sh /entrypoint.sh
44
ENTRYPOINT ["/entrypoint.sh"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
1+
FROM eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
22

33
COPY entrypoint.sh /entrypoint.sh
44
ENTRYPOINT ["/entrypoint.sh"]

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ jobs:
118118
cancel-in-progress: ${{ needs.configuration.outputs.is_main_branch == 'false' }}
119119
runs-on: ${{ needs.create-runner.outputs.label }}
120120
container:
121-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
121+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
122122
steps:
123123
- uses: actions/checkout@v4
124124
- name: Setup Environment
@@ -188,7 +188,7 @@ jobs:
188188
ports:
189189
- 6379:6379
190190
container:
191-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
191+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
192192
env:
193193
DB_HOST: "mysql"
194194
DB_PORT: "23306"
@@ -521,7 +521,7 @@ jobs:
521521
- create-runner
522522
runs-on: ${{ needs.create-runner.outputs.label }}
523523
container:
524-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
524+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
525525
if: needs.configuration.outputs.with_integration_tests != '' && needs.configuration.outputs.is_scheduled_run != 'true'
526526
concurrency:
527527
group: ${{ needs.configuration.outputs.preview_name }}-integration-test

.github/workflows/code-nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ${{ needs.create-runner.outputs.label }}
1919
needs: [create-runner]
2020
container:
21-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
21+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
2222
steps:
2323
- uses: actions/checkout@v4
2424
- uses: ./.github/actions/setup-environment

.github/workflows/ide-integration-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
runs-on: ${{ needs.create-runner.outputs.label }}
4444
needs: [create-runner]
4545
container:
46-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
46+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
4747
outputs:
4848
name: ${{ steps.configuration.outputs.name }}
4949
version: ${{ steps.configuration.outputs.version }}
@@ -131,7 +131,7 @@ jobs:
131131
needs: [configuration, infrastructure, create-runner]
132132
runs-on: ${{ needs.create-runner.outputs.label }}
133133
container:
134-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
134+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
135135
volumes:
136136
- /var/tmp:/var/tmp
137137
- /tmp:/tmp

.github/workflows/jetbrains-auto-update-template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
update-jetbrains:
2424
runs-on: ${{ needs.create-runner.outputs.label }}
2525
container:
26-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
26+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
2727
needs: [ create-runner ]
2828
steps:
2929
- uses: actions/checkout@v2

.github/workflows/jetbrains-integration-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
gcp_credentials: ${{ secrets.SELF_HOSTED_GITHUB_RUNNER_GCP_CREDENTIALS }}
4040
jetbrains-smoke-test-linux:
4141
container:
42-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
42+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
4343
runs-on: ${{ needs.create-runner.outputs.label }}
4444
needs: [create-runner]
4545
steps:

.github/workflows/preview-env-check-regressions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
if: ${{ needs.configuration.outputs.skip == 'false' }}
100100
runs-on: ${{ needs.create-runner.outputs.label }}
101101
container:
102-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
102+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
103103
volumes:
104104
- /var/tmp:/var/tmp
105105
- /tmp:/tmp

.github/workflows/preview-env-gc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ${{ needs.create-runner.outputs.label }}
1919
needs: [create-runner]
2020
container:
21-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
21+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
2222
outputs:
2323
names: ${{ steps.set-matrix.outputs.names }}
2424
count: ${{ steps.set-matrix.outputs.count }}

.github/workflows/workspace-integration-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
runs-on: ${{ needs.create-runner.outputs.label }}
6262
needs: [create-runner]
6363
container:
64-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
64+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
6565
outputs:
6666
name: ${{ steps.configuration.outputs.name }}
6767
version: ${{ steps.configuration.outputs.version }}
@@ -166,7 +166,7 @@ jobs:
166166
needs: [configuration, infrastructure, create-runner]
167167
runs-on: ${{ needs.create-runner.outputs.label }}
168168
container:
169-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
169+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
170170
steps:
171171
- uses: actions/checkout@v4
172172
- name: Integration Test

.gitpod.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
image: eu.gcr.io/gitpod-core-dev/dev/dev-environment:main-gha.32852
1+
image: eu.gcr.io/gitpod-dev-artifact/dev/dev-environment:kylos101-add-claude-code-gha.33073
22
workspaceLocation: gitpod/gitpod-ws.code-workspace
33
checkoutLocation: gitpod
44
ports:
@@ -80,6 +80,13 @@ tasks:
8080
init: |
8181
./components/gitpod-protocol/go/scripts/generate-config.sh
8282
leeway exec --filter-type go -v -- go mod verify
83+
- name: claude code
84+
command: |
85+
if [[ -z "${CLAUDE_JSON}" ]]; then
86+
echo "Skipping setup for Claude Code. Setup a CLAUDE_JSON variable to reuse Claude Code in workspaces."
87+
else
88+
echo $CLAUDE_JSON > ~/.claude.json
89+
fi
8390
vscode:
8491
extensions:
8592
- EditorConfig.EditorConfig

CLAUDE.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Claude Context for Gitpod
2+
3+
This file provides essential context for AI assistants working on the Gitpod codebase.
4+
5+
## Project Overview
6+
7+
Gitpod is a cloud development environment platform that provides automated, ready-to-code development environments for any Git repository. The platform consists of multiple interconnected services and components that work together to deliver seamless developer experiences.
8+
9+
## Memory Bank Structure
10+
11+
This repository maintains comprehensive documentation in the `memory-bank/` directory:
12+
13+
### Core Documentation
14+
- **[Project Brief](memory-bank/projectbrief.md)** - Foundation document defining core requirements and goals
15+
- **[Product Context](memory-bank/productContext.md)** - Why this project exists and problems it solves
16+
- **[System Patterns](memory-bank/systemPatterns.md)** - System architecture and key technical decisions
17+
- **[Tech Context](memory-bank/techContext.md)** - Technologies used and development setup
18+
- **[Active Context](memory-bank/activeContext.md)** - Current work focus and recent changes
19+
- **[Progress](memory-bank/progress.md)** - What works, what's left to build, and current status
20+
21+
### Component Documentation
22+
The `memory-bank/components/` directory contains detailed documentation for each service and component in the Gitpod platform. Start with **[components.md](memory-bank/components.md)** for an overview.
23+
24+
## Working with This Codebase
25+
26+
1. **Start by reading the memory bank** - Always begin by reviewing the core documentation files above to understand the current state and context
27+
2. **Component-specific work** - Refer to the relevant component documentation in `memory-bank/components/`
28+
3. **Architecture decisions** - Check `memory-bank/systemPatterns.md` for established patterns and conventions
29+
4. **Current focus** - Review `memory-bank/activeContext.md` for ongoing work and priorities
30+
31+
## Key Characteristics
32+
33+
- **Multi-service architecture** - Gitpod consists of dozens of interconnected services
34+
- **Kubernetes-native** - Designed to run on Kubernetes with cloud-native patterns
35+
- **Developer experience focus** - Every decision prioritizes developer productivity and experience
36+
- **Workspace lifecycle management** - Complex orchestration of development environments
37+
- **Security and isolation** - Strong emphasis on secure, isolated development environments
38+
39+
## Important Notes
40+
41+
- This is a production system serving thousands of developers
42+
- Changes should be thoroughly tested and follow established patterns
43+
- Security considerations are paramount given the multi-tenant nature
44+
- Performance and scalability are critical concerns
45+
- The codebase spans multiple languages (Go, TypeScript, Java) and technologies
46+
47+
Always refer to the memory bank documentation for the most current and detailed information about any aspect of the system.

dev/image/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
FROM gitpod/workspace-gitpod-dev:latest
66

7-
ENV TRIGGER_REBUILD 42
7+
ENV TRIGGER_REBUILD 43
88

99
USER root
1010

@@ -127,7 +127,7 @@ USER gitpod
127127
ARG GITPOD_NODE_VERSION=22.15.1
128128
RUN bash -c ". .nvm/nvm.sh \
129129
&& nvm install $GITPOD_NODE_VERSION \
130-
&& npm install -g typescript yarn"
130+
&& npm install -g typescript yarn @anthropic-ai/claude-code"
131131
ENV PATH=/home/gitpod/.nvm/versions/node/v${GITPOD_NODE_VERSION}/bin:$PATH
132132

133133
## Register leeway autocompletion in bashrc

0 commit comments

Comments
 (0)