|
| 1 | +version: '1.0' |
| 2 | +kind: step-type |
| 3 | +metadata: |
| 4 | + name: google-secret-manager |
| 5 | + version: 0.0.1 |
| 6 | + title: Fetch secrets from Google Secret Manager |
| 7 | + isPublic: true |
| 8 | + description: Read secrets from Google Secret Manager inside a Codefresh pipeline. |
| 9 | + sources: |
| 10 | + - 'https://github.com/codefresh-contrib/google-secret-manager/tree/main/step' |
| 11 | + maintainers: |
| 12 | + - name: Anthony Rozario |
| 13 | + official: true |
| 14 | + icon: |
| 15 | + type: image |
| 16 | + url: 'https://cdn.jsdelivr.net/gh/codefresh-contrib/google-secret-manager@main/step/secret_manager.png' |
| 17 | + background: '#f4f4f4' |
| 18 | + examples: |
| 19 | + - description: fetch-secret-from-gsm |
| 20 | + workflow: |
| 21 | + get-secret: |
| 22 | + title: Importing GSM Secret |
| 23 | + type: google-secret-manager |
| 24 | + arguments: |
| 25 | + GCP_PROJECT_ID: '${{PROJECT_ID}}' |
| 26 | + GCP_SECRET_ID: '${{SECRET_ID}}' |
| 27 | + GCP_SECRET_VERSION: '${{SECRET_VERSION}}' |
| 28 | + ENV_VAR_KEY: '${{ENV_VAR}}' |
| 29 | +spec: |
| 30 | + arguments: |- |
| 31 | + { |
| 32 | + "definitions": {}, |
| 33 | + "$schema": "http://json-schema.org/draft-07/schema#", |
| 34 | + "type": "object", |
| 35 | + "additionalProperties": false, |
| 36 | + "patterns": [], |
| 37 | + "required": [ |
| 38 | + "GCP_PROJECT_ID", |
| 39 | + "GCP_SECRET_ID", |
| 40 | + "GCP_SECRET_VERSION", |
| 41 | + "ENV_VAR_KEY" |
| 42 | + ], |
| 43 | + "properties": { |
| 44 | + "GCP_PROJECT_ID": { |
| 45 | + "type": "string", |
| 46 | + "description": "Name of the Secret's GCP Project" |
| 47 | + }, |
| 48 | + "GCP_SECRET_ID": { |
| 49 | + "type": "string", |
| 50 | + "description": "Name of the Secret" |
| 51 | + }, |
| 52 | + "GCP_SECRET_VERSION": { |
| 53 | + "type": "string", |
| 54 | + "description": "Version of the Secret" |
| 55 | + }, |
| 56 | + "ENV_VAR_KEY": { |
| 57 | + "type": "string", |
| 58 | + "description": "Environment variable key to store the Secret's value" |
| 59 | + } |
| 60 | + } |
| 61 | + } |
| 62 | + steps: |
| 63 | + main: |
| 64 | + name: fetch-google-secret |
| 65 | + image: codefreshplugins/google-secret-manager:0.0.1 |
| 66 | + working_directory: / |
| 67 | + environment: |
| 68 | + - 'GCP_PROJECT_ID=${{GCP_PROJECT_ID}}' |
| 69 | + - 'GCP_SECRET_ID=${{GCP_SECRET_ID}}' |
| 70 | + - 'GCP_SECRET_VERSION=${{GCP_SECRET_VERSION}}' |
| 71 | + - 'ENV_VAR_KEY=${{ENV_VAR_KEY}}' |
| 72 | + commands: |
| 73 | + - python3 /get-secrets.py |
0 commit comments