Codefresh Steps: Reusable Code for Common Operations
This page provides code you can use to perform common operations in the Codefresh CI/CD platform.
Fetch specific secrets from Hashicorp Vault vault-next-gen
Read specific secrets from multiple paths in Hashicorp Vault inside a Codefresh pipeline.
arguments
Vault_to_Env:
title: Importing vault values
type: vault-next-gen
arguments:
VAULT_ADDR: '${{VAULT_ADDR}}'
MOUNT_POINT: '${{MOUNT_POINT}}'
VAULT_TOKEN: '${{VAULT_AUTH_TOKEN}}'
SECRETS:
- 'EXPORT_NAME=path:secret'
Vault_to_Env:
title: Importing vault values
type: vault-next-gen
arguments:
VAULT_ADDR: '${{VAULT_ADDR}}'
MOUNT_POINT: '${{MOUNT_POINT}}'
VAULT_TOKEN: '${{VAULT_AUTH_TOKEN}}'
VAULT_CLIENT_CERT_BASE64: '${{VAULT_CLIENT_CERT_BASE64}}'
VAULT_CLIENT_KEY_BASE64: '${{VAULT_CLIENT_KEY_BASE64}}'
SECRETS:
- 'EXPORT_NAME=path:secret'
Vault_to_Env:
title: Importing vault values
type: vault-next-gen
arguments:
VAULT_ADDR: '${{VAULT_ADDR}}'
MOUNT_POINT: '${{MOUNT_POINT}}'
VAULT_AUTH_METHOD: APPROLE
APPROLE_ROLE_ID: '${{APPROLE_ROLE_ID}}'
APPROLE_SECRET_ID: '${{APPROLE_SECRET_ID}}'
SECRETS:
- 'EXPORT_NAME=path:secret'
Vault_to_Env:
title: Importing vault values
type: vault-next-gen
arguments:
VAULT_ADDR: '${{VAULT_ADDR}}'
MOUNT_POINT: '${{MOUNT_POINT}}'
VAULT_TOKEN: '${{VAULT_AUTH_TOKEN}}'
SECRETS:
- 'EXPORT_NAME=path:secret'
- 'EXPORT_NAME2=path2:secret2'
Vault_to_Env:
title: Importing vault values
type: vault-next-gen
arguments:
VAULT_ADDR: '${{VAULT_ADDR}}'
MOUNT_POINT: '${{MOUNT_POINT}}'
VAULT_TOKEN: '${{VAULT_AUTH_TOKEN}}'
VAULT_KV_VERSION: 1
SECRETS:
- 'EXPORT_NAME=path:secret'
- 'EXPORT_NAME2=path2:secret2'
Vault_to_Env:
title: Importing vault values
type: vault-next-gen
arguments:
VAULT_ADDR: '${{VAULT_ADDR}}'
MOUNT_POINT: '${{MOUNT_POINT}}'
VAULT_TOKEN: '${{VAULT_AUTH_TOKEN}}'
VAULT_KV_VERSION: 1
NEW_LINE_REPLACEMENT_STRING: BASE64
SECRETS:
- 'EXPORT_NAME=path:secret'
- 'EXPORT_NAME2=path2:secret2'