From 9e540ed944455b2ab8311c9e7ebd6e48322ddb15 Mon Sep 17 00:00:00 2001 From: Max Ludwig Date: Wed, 9 Sep 2020 20:10:50 +0200 Subject: [PATCH 1/2] Use consistent naming and fix secret data structure in README --- README.md | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 239315d..a79eab5 100644 --- a/README.md +++ b/README.md @@ -21,23 +21,23 @@ To build the jar, run `./gradlew clean test assemble` The CONFIG_DIR is typically /etc/go on Linux and C:\Program Files\Go Server\config on Windows. ```shell - java -jar gocd-file-based-secrets-plugin-$VERSION$.jar init -f secret.db + java -jar gocd-file-based-secrets-plugin-$VERSION$.jar init -f secrets.json ``` 3. Add/Update a secret: ```shell - java -jar gocd-file-based-secrets-plugin-$VERSION$.jar add -f secret.db -n my-password -v + java -jar gocd-file-based-secrets-plugin-$VERSION$.jar add -f secrets.json -n my-password -v ``` 4. Show the value of the secret: ```shell - java -jar gocd-file-based-secrets-plugin-$VERSION$.jar show -f secret.db -n my-password + java -jar gocd-file-based-secrets-plugin-$VERSION$.jar show -f secrets.json -n my-password ``` 5. Show all secret keys: ```shell - java -jar gocd-file-based-secrets-plugin-$VERSION$.jar keys -f secret.db + java -jar gocd-file-based-secrets-plugin-$VERSION$.jar keys -f secrets.json ``` 6. Remove a secret: ```shell - java -jar gocd-file-based-secrets-plugin-$VERSION$.jar remove -f secret.db -n my-password + java -jar gocd-file-based-secrets-plugin-$VERSION$.jar remove -f secrets.json -n my-password ``` ## Configuration @@ -55,7 +55,7 @@ The configuration can be added directly to the `config.xml` using the ` SecretsFilePath - /godata/config/secretsDatabase.json + /godata/config/secrets.json @@ -78,7 +78,7 @@ The configuration can be added directly to the `config.xml` using the ` SecretsFilePath - /godata/config/secretsDatabase.json + /godata/config/secrets.json @@ -92,7 +92,7 @@ The configuration can be added directly to the `config.xml` using the ` SecretsFilePath - /godata/config/secretsDatabase_env2.json + /godata/config/secrets_env2.json @@ -107,12 +107,15 @@ The configuration can be added directly to the `config.xml` using the ` Date: Thu, 10 Sep 2020 12:10:35 +0200 Subject: [PATCH 2/2] Refer to GoCD's documentation about Secrets Management --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a79eab5..ddae802 100644 --- a/README.md +++ b/README.md @@ -115,7 +115,7 @@ A secret file is made of JSON, and has the following data structure: } ``` -The secret defined in the above example can be used as `{{SECRET:[Env1Secrets][my-password]}}` in environment variables or SCM materials. +The secret defined in the above example can be used by defining a Secret Param with syntax: `{{SECRET:[Env1Secrets][my-password]}}` in entities which support secrets. For more information about supported entities refer the [Secrets Management](https://docs.gocd.org/current/configuration/secrets_management.html) documentation. ## Troubleshooting