GitLab
How to sync secrets from Hanzo KMS to GitLab
Prerequisites:
- Set up and add envars to Hanzo KMS Cloud.
Use our GitLab Secret Syncs
Generate an KMS Token for the specific project and environment in Hanzo KMS.
Next, create a new variable called INFISICAL_TOKEN with the value set to the token from the previous step in Settings > CI/CD > Variables of your GitLab repository.
Edit your .gitlab-ci.yml to include the KMS CLI installation. This will allow you to use the CLI for fetching and injecting secrets into any script or command within your Gitlab CI/CD process.
Example
image: ubuntu
stages:
- build
- test
- deploy
build-job:
stage: build
script:
- apt update && apt install -y curl
- curl -1sLf 'https://artifacts-cli.kms.hanzo.ai/setup.deb.sh' | bash
- apt-get update && apt-get install -y kms
- kms run -- npm run buildHow is this guide?
Last updated on