Skip to content

Commit

Permalink
Merge branch 'main' into bump-dockerx
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcollom authored Nov 14, 2023
2 parents b8882d3 + 142c990 commit b7fb5e9
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
7 changes: 6 additions & 1 deletion deploy/charts/version-checker/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if or .Values.acr.refreshToken .Values.acr.username .Values.acr.password .Values.docker.token .Values.ecr.accessKeyID .Values.ecr.secretAccessKey .Values.ecr.sessionToken .Values.docker.username .Values.docker.password .Values.gcr.token .Values.quay.token (not (eq (len .Values.selfhosted) 0)) }}
{{- if or .Values.acr.refreshToken .Values.acr.username .Values.acr.password .Values.docker.token .Values.ecr.accessKeyID .Values.ecr.secretAccessKey .Values.ecr.sessionToken .Values.docker.username .Values.docker.password .Values.gcr.token .Values.ghcr.token .Values.quay.token (not (eq (len .Values.selfhosted) 0)) }}
apiVersion: v1
data:
# ACR
Expand Down Expand Up @@ -39,6 +39,11 @@ data:
gcr.token: {{ .Values.gcr.token | b64enc }}
{{- end}}

# GHCR
{{- if .Values.ghcr.token }}
ghcr.token: {{ .Values.ghcr.token | b64enc }}
{{- end}}

# Quay
{{- if .Values.quay.token }}
quay.token: {{ .Values.quay.token | b64enc }}
Expand Down
39 changes: 39 additions & 0 deletions deploy/charts/version-checker/tests/secret_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
suite: test deployment
templates:
- secret.yaml
tests:
- it: should not be present (default)
asserts:
- hasDocuments:
count: 0

- it: Only SelfHosted
set:
selfHosted: []
asserts:
- hasDocuments:
count: 0

# ACR

# GCR:
- it: GCR
set:
gcr.token: aasfas
asserts:
- hasDocuments:
count: 1
- equal:
path: data["gcr.token"]
value: YWFzZmFz

# GHCR:
- it: GHCR
set:
ghcr.token: aasfas
asserts:
- hasDocuments:
count: 1
- equal:
path: data["ghcr.token"]
value: YWFzZmFz

0 comments on commit b7fb5e9

Please sign in to comment.