Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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 });
Expand All @@ -366577,6 +366583,7 @@ function run() {
eventTriggerType,
eventTriggerResource,
eventTriggerService,
deployTimeout,
vpcConnector,
serviceAccountEmail,
labels,
Expand Down