Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlesne committed Sep 28, 2024
2 parents 116a3e2 + 5ec6b50 commit ed7bb8b
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions src/helm/blue-agent/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -141,31 +141,38 @@ containers:
{{- toYaml (mustMergeOverwrite (include "blue-agent.defaultSecurityContext" . | fromYaml) .Values.securityContext) | nindent 6 }}
image: "{{ .Values.image.repository | required "A value for .Values.image.repository is required" }}:{{ .Values.image.flavor | required "A value for .Values.image.flavor is required" }}-{{ default .Chart.Version .Values.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.image.isWindows }}
{{- if not .Values.pipelines.cache.volumeEnabled }}
lifecycle:
preStop:
exec:
command:
{{- if .Values.image.isWindows }}
{{- if not .Values.pipelines.cache.volumeEnabled }}
- powershell
- -Command
- |
# For security reasons, force clean the pipeline workspace at restart -- Sharing data bewteen pipelines is a security risk
Remove-Item -Recurse -Force $Env:AZP_WORK;
{{- end }}
{{- else if or (not .Values.pipelines.cache.volumeEnabled) (not .Values.pipelines.tmpdir.volumeEnabled)}}
{{- end }}
{{- else if or (not .Values.pipelines.cache.volumeEnabled) (not .Values.pipelines.tmpdir.volumeEnabled)}}
lifecycle:
preStop:
exec:
command:
{{- if not .Values.pipelines.cache.volumeEnabled }}
- bash
- -c
- |
{{- if not .Values.pipelines.cache.volumeEnabled }}
# For security reasons, force clean the pipeline workspace at restart -- Sharing data bewteen pipelines is a security risk
rm -rf ${AZP_WORK};
{{- end }}
{{- if not .Values.pipelines.tmpdir.volumeEnabled }}
{{- end }}
{{- if not .Values.pipelines.tmpdir.volumeEnabled }}
- bash
- -c
- |
# For security reasons, force clean the tmpdir at restart -- Sharing data bewteen pipelines is a security risk
rm -rf ${TMPDIR};
{{- end }}
{{- end }}
{{- end }}
env:
- name: AGENT_DIAGLOGPATH
{{- if .Values.image.isWindows }}
Expand Down

0 comments on commit ed7bb8b

Please sign in to comment.