diff --git a/dist/index.js b/dist/index.js index 4e67a3c..2fd7605 100644 --- a/dist/index.js +++ b/dist/index.js @@ -366101,6 +366101,9 @@ class CloudFunction { this.request = request; this.name = opts.name; this.sourceDir = opts.sourceDir ? opts.sourceDir : './'; + this.deployTimeout = opts.deployTimeout + ? parseInt(opts.deployTimeout) + : 300; } /** * Set GCS Bucket URL. @@ -366123,8 +366126,10 @@ class CloudFunction { if (!pair.includes('=')) { throw new TypeError(`The expected data format should be "KEY1=VALUE1", got "${pair}" while parsing "${values}"`); } - const keyValue = pair.split('='); - kvPairs[keyValue[0]] = keyValue[1]; + // Split on the first delimiter only + const name = pair.substring(0, pair.indexOf('=')); + const value = pair.substring(pair.indexOf('=') + 1); + kvPairs[name] = value; }); return kvPairs; } @@ -366394,7 +366399,7 @@ class CloudFunctionClient { requestBody: cf.request, }; const updateFunctionResponse = yield this.gcf.projects.locations.functions.patch(updateFunctionRequest, this.methodOptions); - const awaitUpdate = yield this.pollOperation(updateFunctionResponse.data, 'Updating function deployment', 2, 150); + const awaitUpdate = yield this.pollOperation(updateFunctionResponse.data, 'Updating function deployment', 2, cf.deployTimeout / 2); core.info('Function deployment updated'); return awaitUpdate; } @@ -366559,6 +366564,7 @@ function run() { const eventTriggerType = core.getInput('event_trigger_type'); const eventTriggerResource = core.getInput('event_trigger_resource'); const eventTriggerService = core.getInput('event_trigger_service'); + const deployTimeout = core.getInput('deploy_timeout'); const labels = core.getInput('labels'); // Create Cloud Functions client const client = new cloudFunctionClient_1.CloudFunctionClient(region, { projectId, credentials }); @@ -366577,6 +366583,7 @@ function run() { eventTriggerType, eventTriggerResource, eventTriggerService, + deployTimeout, vpcConnector, serviceAccountEmail, labels,