From 8c1d7f49491ec1796ae1f462c55349dc64bbdbed Mon Sep 17 00:00:00 2001 From: Dustin Van Buskirk Date: Mon, 21 Nov 2022 09:20:58 -0800 Subject: [PATCH 1/4] fix Dockerfile capitalization --- incubating/google-secret-manager/{dockerfile => Dockerfile} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename incubating/google-secret-manager/{dockerfile => Dockerfile} (100%) diff --git a/incubating/google-secret-manager/dockerfile b/incubating/google-secret-manager/Dockerfile similarity index 100% rename from incubating/google-secret-manager/dockerfile rename to incubating/google-secret-manager/Dockerfile From 922e9d68a36015b355e82b16cfa9fd428b98ef15 Mon Sep 17 00:00:00 2001 From: Dustin Van Buskirk Date: Mon, 21 Nov 2022 09:42:23 -0800 Subject: [PATCH 2/4] forgot the required naming convention for the pipeline step automation --- .../step/{google-secret-manager-step.yml => step.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename incubating/google-secret-manager/step/{google-secret-manager-step.yml => step.yaml} (100%) diff --git a/incubating/google-secret-manager/step/google-secret-manager-step.yml b/incubating/google-secret-manager/step/step.yaml similarity index 100% rename from incubating/google-secret-manager/step/google-secret-manager-step.yml rename to incubating/google-secret-manager/step/step.yaml From b5f7c3fe0ff8fc9c8ec0b21caa8548ec63bf89a8 Mon Sep 17 00:00:00 2001 From: Dustin Van Buskirk Date: Mon, 21 Nov 2022 09:46:25 -0800 Subject: [PATCH 3/4] step in wrong folder --- .../google-secret-manager/step/step.yaml | 73 ------------------- 1 file changed, 73 deletions(-) delete mode 100644 incubating/google-secret-manager/step/step.yaml diff --git a/incubating/google-secret-manager/step/step.yaml b/incubating/google-secret-manager/step/step.yaml deleted file mode 100644 index 9d9a02d57..000000000 --- a/incubating/google-secret-manager/step/step.yaml +++ /dev/null @@ -1,73 +0,0 @@ -version: '1.0' -kind: step-type -metadata: - name: google-secret-manager - version: 0.0.1 - title: Fetch secrets from Google Secret Manager - isPublic: true - description: Read secrets from Google Secret Manager inside a Codefresh pipeline. - sources: - - 'https://github.com/codefresh-contrib/google-secret-manager/tree/main/step' - maintainers: - - name: Anthony Rozario - official: true - icon: - type: image - url: 'https://cdn.jsdelivr.net/gh/codefresh-contrib/google-secret-manager@main/step/secret_manager.png' - background: '#f4f4f4' - examples: - - description: fetch-secret-from-gsm - workflow: - get-secret: - title: Importing GSM Secret - type: google-secret-manager - arguments: - GCP_PROJECT_ID: '${{PROJECT_ID}}' - GCP_SECRET_ID: '${{SECRET_ID}}' - GCP_SECRET_VERSION: '${{SECRET_VERSION}}' - ENV_VAR_KEY: '${{ENV_VAR}}' -spec: - arguments: |- - { - "definitions": {}, - "$schema": "http://json-schema.org/draft-07/schema#", - "type": "object", - "additionalProperties": false, - "patterns": [], - "required": [ - "GCP_PROJECT_ID", - "GCP_SECRET_ID", - "GCP_SECRET_VERSION", - "ENV_VAR_KEY" - ], - "properties": { - "GCP_PROJECT_ID": { - "type": "string", - "description": "Name of the Secret's GCP Project" - }, - "GCP_SECRET_ID": { - "type": "string", - "description": "Name of the Secret" - }, - "GCP_SECRET_VERSION": { - "type": "string", - "description": "Version of the Secret" - }, - "ENV_VAR_KEY": { - "type": "string", - "description": "Environment variable key to store the Secret's value" - } - } - } - steps: - main: - name: fetch-google-secret - image: codefreshplugins/google-secret-manager:0.0.1 - working_directory: / - environment: - - 'GCP_PROJECT_ID=${{GCP_PROJECT_ID}}' - - 'GCP_SECRET_ID=${{GCP_SECRET_ID}}' - - 'GCP_SECRET_VERSION=${{GCP_SECRET_VERSION}}' - - 'ENV_VAR_KEY=${{ENV_VAR_KEY}}' - commands: - - python3 /get-secrets.py From 862f3d6fe8ba44511053c6af5dbf53cc767618c6 Mon Sep 17 00:00:00 2001 From: Dustin Van Buskirk Date: Mon, 21 Nov 2022 09:49:21 -0800 Subject: [PATCH 4/4] new file --- incubating/google-secret-manager/step.yaml | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 incubating/google-secret-manager/step.yaml diff --git a/incubating/google-secret-manager/step.yaml b/incubating/google-secret-manager/step.yaml new file mode 100644 index 000000000..9d9a02d57 --- /dev/null +++ b/incubating/google-secret-manager/step.yaml @@ -0,0 +1,73 @@ +version: '1.0' +kind: step-type +metadata: + name: google-secret-manager + version: 0.0.1 + title: Fetch secrets from Google Secret Manager + isPublic: true + description: Read secrets from Google Secret Manager inside a Codefresh pipeline. + sources: + - 'https://github.com/codefresh-contrib/google-secret-manager/tree/main/step' + maintainers: + - name: Anthony Rozario + official: true + icon: + type: image + url: 'https://cdn.jsdelivr.net/gh/codefresh-contrib/google-secret-manager@main/step/secret_manager.png' + background: '#f4f4f4' + examples: + - description: fetch-secret-from-gsm + workflow: + get-secret: + title: Importing GSM Secret + type: google-secret-manager + arguments: + GCP_PROJECT_ID: '${{PROJECT_ID}}' + GCP_SECRET_ID: '${{SECRET_ID}}' + GCP_SECRET_VERSION: '${{SECRET_VERSION}}' + ENV_VAR_KEY: '${{ENV_VAR}}' +spec: + arguments: |- + { + "definitions": {}, + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "additionalProperties": false, + "patterns": [], + "required": [ + "GCP_PROJECT_ID", + "GCP_SECRET_ID", + "GCP_SECRET_VERSION", + "ENV_VAR_KEY" + ], + "properties": { + "GCP_PROJECT_ID": { + "type": "string", + "description": "Name of the Secret's GCP Project" + }, + "GCP_SECRET_ID": { + "type": "string", + "description": "Name of the Secret" + }, + "GCP_SECRET_VERSION": { + "type": "string", + "description": "Version of the Secret" + }, + "ENV_VAR_KEY": { + "type": "string", + "description": "Environment variable key to store the Secret's value" + } + } + } + steps: + main: + name: fetch-google-secret + image: codefreshplugins/google-secret-manager:0.0.1 + working_directory: / + environment: + - 'GCP_PROJECT_ID=${{GCP_PROJECT_ID}}' + - 'GCP_SECRET_ID=${{GCP_SECRET_ID}}' + - 'GCP_SECRET_VERSION=${{GCP_SECRET_VERSION}}' + - 'ENV_VAR_KEY=${{ENV_VAR_KEY}}' + commands: + - python3 /get-secrets.py