From 5ffdeaf48a44485fc19fd3f23a3154ceac258b3f Mon Sep 17 00:00:00 2001 From: Tycho Bokdam Date: Mon, 11 Dec 2023 00:01:44 +0100 Subject: [PATCH 1/2] fix(gcp-functions): No longer use `gcloud beta` when deploying with secrets --- .../src/executors/deploy/deploy.impl.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/gcp-functions/src/executors/deploy/deploy.impl.ts b/packages/gcp-functions/src/executors/deploy/deploy.impl.ts index 42826475..6c9892ae 100644 --- a/packages/gcp-functions/src/executors/deploy/deploy.impl.ts +++ b/packages/gcp-functions/src/executors/deploy/deploy.impl.ts @@ -61,7 +61,7 @@ export async function deployExecutor( concurrency = 1, cloudSqlInstance = null, timeout = null, - cpu, + cpu } = options let runtime = options.runtime || 'nodejs20' @@ -103,15 +103,9 @@ export async function deployExecutor( }) .filter(Boolean) - let gcloudCommand = 'gcloud' - if (validSecrets.length > 0) { - logger.info('Using secrets, use gcloud beta') - gcloudCommand = 'gcloud beta' - } - let { success } = execCommand( buildCommand([ - `${gcloudCommand} functions deploy`, + `gcloud functions deploy`, functionName, gen === 2 && '--gen2', `--trigger-${trigger}${triggerValue ? `=${triggerValue}` : ''}`, @@ -156,7 +150,7 @@ export async function deployExecutor( const serviceUpdateCommand = execCommand( buildCommand([ - `${gcloudCommand} run services update`, + 'gcloud run services update', functionName, concurrency > 0 && `--concurrency ${concurrency}`, From a5b189e3d9d5abf36d943388816f9798f97e4cb3 Mon Sep 17 00:00:00 2001 From: Tycho Bokdam Date: Mon, 11 Dec 2023 00:01:52 +0100 Subject: [PATCH 2/2] fix(gcp-cloud-run): No longer use `gcloud beta` when deploying with secrets --- .../gcp-cloud-run/src/executors/deploy/deploy.impl.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/gcp-cloud-run/src/executors/deploy/deploy.impl.ts b/packages/gcp-cloud-run/src/executors/deploy/deploy.impl.ts index c6522e02..cfb29a9a 100644 --- a/packages/gcp-cloud-run/src/executors/deploy/deploy.impl.ts +++ b/packages/gcp-cloud-run/src/executors/deploy/deploy.impl.ts @@ -128,14 +128,8 @@ export async function deployExecutor( ])) } - let gcloudCommand = 'gcloud' - if (validSecrets.length > 0) { - logger.info('Using secrets, use gcloud beta') - gcloudCommand = 'gcloud beta' - } - const deployCommand = buildCommand([ - `${gcloudCommand} run deploy ${name}`, + `gcloud run deploy ${name}`, !buildWithArtifactRegistry && `--image=${containerName}`, buildWithArtifactRegistry && '--source=./', `--project=${project}`,