-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevfile.yaml
More file actions
135 lines (127 loc) · 4.17 KB
/
devfile.yaml
File metadata and controls
135 lines (127 loc) · 4.17 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
schemaVersion: 2.2.0
metadata:
name: workspace-dev
displayName: Che Image and Workspace Development
description: >-
Universal Developer Image provides various programming languages tools and
runtimes for instant coding
icon: >-
https://raw.githubusercontent.com/devfile/devfile-web/main/apps/landing-page/public/pwa-192x192.png
tags:
- Java
- Maven
- Scala
- PHP
- .NET
- Node.js
- Go
- Python
- Pip
- ubi10
projectType: universal
language: Polyglot
version: 1.0.0
projects:
- name: che-devworkspaces
git:
remotes:
origin: https://github.com/ethosengine/che-devworkspaces.git
components:
- name: tools
container:
image: harbor.ethosengine.com/devspaces/udi-plus:latest
memoryLimit: 6G
memoryRequest: 512Mi
cpuRequest: 1000m
cpuLimit: 4000m
mountSources: true
volumeMounts:
- name: buildkit-socket
path: /run/buildkit
env:
- name: CLAUDE_CONFIG_DIR
value: /projects/.claude-config
- name: XDG_CONFIG_HOME
value: /projects/.config
- name: XDG_CACHE_HOME
value: /projects/.cache
- name: JENKINS_URL
value: "https://jenkins.ethosengine.com"
- name: CHROME_BIN
value: /usr/local/bin/chrome
- name: CHROME_PATH
value: /opt/chrome-linux64/chrome
- name: BUILDKIT_HOST
value: unix:///run/buildkit/buildkitd.sock
# SonarQube MCP configuration (SONARQUBE_TOKEN comes from K8s secret)
- name: STORAGE_PATH
value: /projects/.sonarqube-mcp
- name: SONARQUBE_URL
value: "https://sonarqube.ethosengine.com"
- name: buildkitd
attributes:
controller.devfile.io/container-overrides: |
securityContext:
privileged: true
runAsUser: 0
runAsNonRoot: false
container:
image: moby/buildkit:v0.12.5
memoryLimit: 2G
memoryRequest: 512Mi
command: ['buildkitd']
args:
- '--addr'
- 'unix:///run/buildkit/buildkitd.sock'
- '--oci-worker=true'
- '--containerd-worker=false'
volumeMounts:
- name: buildkit-socket
path: /run/buildkit
- name: buildkit-socket
volume:
ephemeral: true
commands:
- id: setup-vscode-cli
exec:
component: tools
commandLine: |
# Create VS Code CLI symlink (code-oss -> code)
# checode only ships ubi8/ubi9 binaries, use ubi9 (forward compatible with ubi10)
mkdir -p /home/user/.local/bin
if [ -f /checode/checode-linux-libc/ubi9/bin/remote-cli/code-oss ]; then
ln -sf /checode/checode-linux-libc/ubi9/bin/remote-cli/code-oss /home/user/.local/bin/code
fi
# === Claude Code Setup ===
# Link ~/.claude to persistent config dir for VS Code extension IDE detection
# The extension uses ~/.claude/ide for IPC sockets, must match CLAUDE_CONFIG_DIR
mkdir -p "$CLAUDE_CONFIG_DIR"
rm -rf /home/user/.claude 2>/dev/null || true
ln -sf "$CLAUDE_CONFIG_DIR" /home/user/.claude
mkdir -p /home/user/.claude/ide
- id: setup-claude-mcp
exec:
component: tools
workingDir: /projects/che-devworkspaces
commandLine: |
# Create persistent storage directory for SonarQube MCP
mkdir -p "$STORAGE_PATH"
# Configure SonarQube MCP (env vars from devfile, SONARQUBE_TOKEN from K8s secret)
claude mcp remove sonarqube 2>/dev/null || true
claude mcp add sonarqube \
--env STORAGE_PATH="$STORAGE_PATH" \
--env SONARQUBE_TOKEN="$SONARQUBE_TOKEN" \
--env SONARQUBE_URL="$SONARQUBE_URL" \
-- java -jar /opt/mcp/sonarqube-mcp.jar
# Configure Jenkins MCP (requires mcp-server plugin and allowTokenAccessWithoutOicSession)
claude mcp remove jenkins 2>/dev/null || true
if [ -n "$JENKINS_USERNAME" ] && [ -n "$JENKINS_TOKEN" ]; then
JENKINS_AUTH=$(echo -n "$JENKINS_USERNAME:$JENKINS_TOKEN" | base64)
claude mcp add jenkins "$JENKINS_URL/mcp-server/mcp" \
--transport http \
--header "Authorization: Basic $JENKINS_AUTH"
fi
events:
postStart:
- setup-vscode-cli
# - setup-claude-mcp