fix: ensure Claude Code updates on rebuild and allow GITHUB_REPO from secret
Two fixes: - Move Claude Code npm install below TOOLS_CACHEBUST ARG so it actually gets refreshed when the cache-bust value changes - Make GITHUB_REPO env conditional so an empty Helm value no longer overrides the value provided via the Kubernetes secret (envFrom) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+5
-2
@@ -61,13 +61,16 @@ RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - && \
|
||||
apt-get install -y nodejs && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install Happy Coder and Claude Code globally via npm
|
||||
RUN npm install -g happy-coder @anthropic-ai/claude-code
|
||||
# Install Happy Coder globally via npm (stable, rarely changes)
|
||||
RUN npm install -g happy-coder
|
||||
|
||||
# Cache-bust: tools below fetch "latest" at build time — a changing ARG
|
||||
# forces Docker to re-run these layers instead of serving stale cache.
|
||||
ARG TOOLS_CACHEBUST=0
|
||||
|
||||
# Install Claude Code globally via npm
|
||||
RUN npm install -g @anthropic-ai/claude-code
|
||||
|
||||
# Install OpenCode AI coding agent
|
||||
RUN OPENCODE_VERSION=$(curl -sL https://api.github.com/repos/opencode-ai/opencode/releases/latest | jq -r '.tag_name') && \
|
||||
curl -fsSL "https://github.com/opencode-ai/opencode/releases/download/${OPENCODE_VERSION}/opencode-linux-x86_64.tar.gz" | \
|
||||
|
||||
@@ -88,8 +88,10 @@ spec:
|
||||
value: {{ .Values.happy.serverUrl | quote }}
|
||||
- name: HAPPY_WEBAPP_URL
|
||||
value: {{ .Values.happy.webappUrl | quote }}
|
||||
{{- if .Values.githubRepo }}
|
||||
- name: GITHUB_REPO
|
||||
value: {{ .Values.githubRepo | quote }}
|
||||
{{- end }}
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: {{ include "devcontainer.envSecretName" . }}
|
||||
|
||||
Reference in New Issue
Block a user