Skip to content

Commit

Permalink
add CLEAR_API_DATA env to dwp
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybellwood committed Nov 21, 2023
1 parent 939f6ad commit fbefeaf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ SKIP_ALL_DEPS =
DISABLE_CORE_HARBOR =
# Set to `true` to enable the elements of lagoon-core that talk to OpenSearch installs
OPENSEARCH_INTEGRATION_ENABLED = false
# Ordinarily we shouldn't need to clear the API data as it's usually a first run. Set this
# variable on a test run to clear (what's clearable) first
CLEAR_API_DATA = false

TIMEOUT = 30m
HELM = helm
Expand All @@ -56,7 +59,7 @@ fill-test-ci-values:
&& export token="$$($(KUBECTL) -n lagoon create token lagoon-build-deploy --duration 3h)" \
&& export $$([ $(IMAGE_TAG) ] && echo imageTag='$(IMAGE_TAG)' || echo imageTag='latest') \
&& export webhookHandler="lagoon-core-webhook-handler" \
&& export tests='$(TESTS)' imageRegistry='$(IMAGE_REGISTRY)' \
&& export tests='$(TESTS)' imageRegistry='$(IMAGE_REGISTRY)' clearApiData='$(CLEAR_API_DATA)' \
&& valueTemplate=charts/lagoon-test/ci/linter-values.yaml \
&& envsubst < $$valueTemplate.tpl > $$valueTemplate \
&& cat $$valueTemplate
Expand Down
2 changes: 2 additions & 0 deletions charts/lagoon-test/ci/linter-values.yaml.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ localGit:
localAPIDataWatcherPusher:
image:
repository: ${imageRegistry}/local-api-data-watcher-pusher
additonalEnvs:
CLEAR_API_DATA: ${clearApiData}

tests:
image:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ spec:
value: {{ .Values.minioPass | quote }}
- name: TOKEN
value: {{ required "A valid .Values.token required!" .Values.token | quote }}
{{- range $key, $val := .Values.localAPIDataWatcherPusher.additionalEnvs }}
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
resources:
{{- toYaml .Values.localAPIDataWatcherPusher.resources | nindent 10 }}
{{- with .Values.localAPIDataWatcherPusher.nodeSelector }}
Expand Down
3 changes: 3 additions & 0 deletions charts/lagoon-test/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,9 @@ localAPIDataWatcherPusher:
# Overrides the image tag whose default is the chart appVersion.
tag: ""

additionalEnvs:
# CLEAR_API_DATA: true

podSecurityContext: {}

securityContext: {}
Expand Down

0 comments on commit fbefeaf

Please sign in to comment.