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 secrets from Hashicorp Vault vault
Read secrets from Hashicorp Vault inside a Codefresh pipeline.
arguments
Vault_to_Env:
title: Importing vault values
type: vault
arguments:
VAULT_ADDR: '${{VAULT_ADDR}}'
VAULT_PATH: '${{VAULT_PATH}}'
VAULT_AUTH_TOKEN: '${{VAULT_AUTH_TOKEN}}'
Vault_to_Env:
title: Importing vault values
type: vault
arguments:
VAULT_ADDR: '${{VAULT_ADDR}}'
VAULT_PATH: '${{VAULT_PATH}}'
VAULT_AUTH_TOKEN: '${{VAULT_AUTH_TOKEN}}'
VAULT_CLIENT_CERT_BASE64: '${{VAULT_CLIENT_CERT_BASE64}}'
VAULT_CLIENT_KEY_BASE64: '${{VAULT_CLIENT_KEY_BASE64}}'
Vault_to_Env:
title: Importing vault values
type: vault
arguments:
VAULT_ADDR: '${{VAULT_ADDR}}'
VAULT_PATH: '${{VAULT_PATH}}'
VAULT_AUTH_METHOD: APPROLE
APPROLE_ROLE_ID: '${{APPROLE_ROLE_ID}}'
APPROLE_SECRET_ID: '${{APPROLE_SECRET_ID}}'
Vault_to_Env:
title: Importing vault values
type: vault
arguments:
VAULT_ADDR: '${{VAULT_ADDR}}'
VAULT_PATH: '${{VAULT_PATH}}'
VAULT_AUTH_TOKEN: '${{VAULT_AUTH_TOKEN}}'
VAULT_FIELD_NAME: some-key-name
Vault_to_Env:
title: Importing vault values
type: vault
arguments:
VAULT_ADDR: '${{VAULT_ADDR}}'
VAULT_PATH: kv/firstpath;kv/secondpath
VAULT_PATH_DELIMITER: ;
VAULT_AUTH_TOKEN: '${{VAULT_AUTH_TOKEN}}'
Vault_to_Env:
title: Importing vault values
type: vault
arguments:
VAULT_ADDR: '${{VAULT_ADDR}}'
VAULT_PATH: kv/firstpath;kv/secondpath
VAULT_PATH_DELIMITER: ;
VAULT_AUTH_TOKEN: '${{VAULT_AUTH_TOKEN}}'
VAULT_VARIABLE_EXPORT_PREFIX: pre_