Skip to content

Commit

Permalink
Fix: Mount path for Windows containers
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlesne committed Apr 27, 2023
1 parent 9123233 commit a2a9b00
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion example/helm/container-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ annotations:
container.apparmor.security.beta.kubernetes.io/azp-agent: unconfined

extraVolumeMounts:
- mountPath: /home/root/.local/share/buildkit
- mountPath: /app-root/.local/share/buildkit
name: buildkitd

extraVolumes:
Expand Down
12 changes: 10 additions & 2 deletions src/helm/azure-pipelines-agent/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,15 @@ containers:
{{- toYaml .Values.resources | nindent 6 | required "A value for .Values.resources is required" }}
volumeMounts:
- name: azp-work
mountPath: /home/root/azp-work
{{- if .Values.image.isWindows }}
mountPath: C:\\app-root\\azp-work
{{- else }}
mountPath: /app-root/azp-work
{{- end }}
{{- if not .Values.image.isWindows }}
- name: local-tmp
mountPath: /home/root/.local/tmp
mountPath: /app-root/.local/tmp
{{- end }}
{{- with .Values.extraVolumeMounts }}
{{- toYaml . | nindent 6 }}
{{- end }}
Expand All @@ -163,6 +169,7 @@ volumes:
resources:
requests:
storage: {{ .Values.pipelines.cacheSize | required "A value for .Values.pipelines.cacheSize is required" }}
{{- if not .Values.image.isWindows }}
- name: local-tmp
ephemeral:
volumeClaimTemplate:
Expand All @@ -172,6 +179,7 @@ volumes:
resources:
requests:
storage: {{ .Values.pipelines.tmpdirSize | required "A value for .Values.pipelines.tmpdirSize is required" }}
{{- end }}
{{- with .Values.extraVolumes }}
{{- toYaml . | nindent 2 }}
{{- end }}
Expand Down

0 comments on commit a2a9b00

Please sign in to comment.