项目作者: moneysmartco

项目描述 :
高级语言: Go
项目地址: git://github.com/moneysmartco/drone-vault-exporter.git
创建时间: 2018-01-30T06:41:05Z
项目社区:https://github.com/moneysmartco/drone-vault-exporter

开源协议:

下载


drone-vault-exporter

Drone plugin to export vault secret into dotenv file. For the usage information and a listing of the available options please take a look at the docs.

Build

Build the binary with the following commands:

  1. make install
  2. make build

Docker

Build the docker image with the following commands:

  1. make linux_amd64 docker_image docker_deploy tag=X.X.X

Usage

Execute from the working directory:

1) with vault token:

  1. docker run --rm \
  2. -e PLUGIN_DEPLOY_ENV_PATH=./.deploy.env \
  3. -e PLUGIN_VAULT_KEY_PATH=secret/key/path \
  4. -e VAULT_ADDR=https://vault.server \
  5. -e VAULT_TOKEN=xxxxxxxxx \
  6. moneysmartco/drone-vault-exporter

2) with vault approle authentication:

  1. docker run --rm \
  2. -e PLUGIN_DEPLOY_ENV_PATH=./.deploy.env \
  3. -e PLUGIN_VAULT_KEY_PATH=secret/key/path \
  4. -e VAULT_ADDR=https://vault.server \
  5. -e PLUGIN_VAULT_AUTH_METHOD=APPROLE \
  6. -e VAULT_ROLE_ID=xxx-xxx-xxx-xxx-xxx \
  7. -e VAULT_SECRET_ID=xxx-xxx-xxx-xxx-xxx \
  8. moneysmartco/drone-vault-exporter

3) output with helm-yaml format

  1. docker run --rm \
  2. -e PLUGIN_OUTPUT_FORMAT=helm-yaml \
  3. -e PLUGIN_HELM_ENV_KEY=envs \
  4. -e PLUGIN_DEPLOY_ENV_PATH=./env.yaml \
  5. -e PLUGIN_VAULT_KEY_PATH=secret/key/path \
  6. -e PLUGIN_VAULT_AUTH_METHOD=APPROLE \
  7. -e VAULT_ADDR=https://vault.server \
  8. -e VAULT_ROLE_ID=xxx-xxx-xxx-xxx-xxx \
  9. -e VAULT_SECRET_ID=xxx-xxx-xxx-xxx-xxx \
  10. moneysmartco/drone-vault-exporter