jenkins: escape vault env values
This commit is contained in:
parent
bb9a4e6d8b
commit
4ff2f3e889
@ -23,20 +23,20 @@ spec:
|
||||
vault.hashicorp.com/agent-inject-secret-jenkins-env: "kv/data/atlas/jenkins/jenkins-oidc"
|
||||
vault.hashicorp.com/agent-inject-template-jenkins-env: |
|
||||
{{- with secret "kv/data/atlas/jenkins/jenkins-oidc" -}}
|
||||
export OIDC_CLIENT_ID="{{ .Data.data.clientId }}"
|
||||
export OIDC_CLIENT_SECRET="{{ .Data.data.clientSecret }}"
|
||||
export OIDC_AUTH_URL="{{ .Data.data.authorizationUrl }}"
|
||||
export OIDC_TOKEN_URL="{{ .Data.data.tokenUrl }}"
|
||||
export OIDC_USERINFO_URL="{{ .Data.data.userInfoUrl }}"
|
||||
export OIDC_LOGOUT_URL="{{ .Data.data.logoutUrl }}"
|
||||
export OIDC_CLIENT_ID='{{ .Data.data.clientId | replace "'" "'\"'\"'" }}'
|
||||
export OIDC_CLIENT_SECRET='{{ .Data.data.clientSecret | replace "'" "'\"'\"'" }}'
|
||||
export OIDC_AUTH_URL='{{ .Data.data.authorizationUrl | replace "'" "'\"'\"'" }}'
|
||||
export OIDC_TOKEN_URL='{{ .Data.data.tokenUrl | replace "'" "'\"'\"'" }}'
|
||||
export OIDC_USERINFO_URL='{{ .Data.data.userInfoUrl | replace "'" "'\"'\"'" }}'
|
||||
export OIDC_LOGOUT_URL='{{ .Data.data.logoutUrl | replace "'" "'\"'\"'" }}'
|
||||
{{- end }}
|
||||
{{- with secret "kv/data/atlas/jenkins/harbor-robot-creds" -}}
|
||||
export HARBOR_ROBOT_USERNAME="{{ .Data.data.username }}"
|
||||
export HARBOR_ROBOT_PASSWORD="{{ .Data.data.password }}"
|
||||
export HARBOR_ROBOT_USERNAME='{{ .Data.data.username | replace "'" "'\"'\"'" }}'
|
||||
export HARBOR_ROBOT_PASSWORD='{{ .Data.data.password | replace "'" "'\"'\"'" }}'
|
||||
{{- end }}
|
||||
{{- with secret "kv/data/atlas/jenkins/gitea-pat" -}}
|
||||
export GITEA_PAT_USERNAME="{{ .Data.data.username }}"
|
||||
export GITEA_PAT_TOKEN="{{ .Data.data.token }}"
|
||||
export GITEA_PAT_USERNAME='{{ .Data.data.username | replace "'" "'\"'\"'" }}'
|
||||
export GITEA_PAT_TOKEN='{{ .Data.data.token | replace "'" "'\"'\"'" }}'
|
||||
{{- end -}}
|
||||
spec:
|
||||
serviceAccountName: jenkins
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user