Skip to content
This repository has been archived by the owner on Jan 21, 2025. It is now read-only.

CI Update Vault auth #260

Merged
merged 1 commit into from
Jan 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@ variables:
TASK_DB_VERSION: v3
DOCKERFILE: Dockerfile
VAULT_ADDR: "https://vault.parity-mgmt-vault.parity.io"
VAULT_AUTH_PATH: "gitlab-parity-io-jwt"
VAULT_AUTH_ROLE: "gitlab_${CI_PROJECT_NAME}"
VAULT_AUTH_PATH: "gitlab-parity-io-jwt-oidc"
VAULT_AUTH_ROLE: "gitlab_oidc_${CI_PROJECT_NAME}"
HELM_SECRETS_DRIVER: vals

default:
id_tokens:
VAULT_ID_TOKEN:
aud: https://gitlab.parity.io
image: $CI_IMAGE
tags:
- kubernetes-parity-build
Expand Down Expand Up @@ -137,7 +140,7 @@ push-docker-image-description:
- |-
sed -i "s/appVersion:.*/appVersion: $KUBERNETES_VERSION_TAG/" helm/Chart.yaml
# https://docs.gitlab.com/ee/ci/examples/authenticating-with-hashicorp-vault/#example
- export VAULT_TOKEN="$(vault write -field=token auth/$VAULT_AUTH_PATH/login role=$VAULT_AUTH_ROLE jwt=$CI_JOB_JWT)"
- export VAULT_TOKEN="$(vault write -field=token auth/$VAULT_AUTH_PATH/login role=$VAULT_AUTH_ROLE jwt=$VAULT_ID_TOKEN)"
- helm dependency update helm/
- helm secrets --version
- helm secrets upgrade
Expand Down
Loading