diff --git a/.changeset/swift-rules-hunt.md b/.changeset/swift-rules-hunt.md new file mode 100644 index 0000000000..15707bbf90 --- /dev/null +++ b/.changeset/swift-rules-hunt.md @@ -0,0 +1,5 @@ +--- +'@backstage/techdocs-common': patch +--- + +adds passing projectID to the Storage client diff --git a/packages/techdocs-common/src/stages/publish/googleStorage.ts b/packages/techdocs-common/src/stages/publish/googleStorage.ts index ba70c36e27..c3d9d3330b 100644 --- a/packages/techdocs-common/src/stages/publish/googleStorage.ts +++ b/packages/techdocs-common/src/stages/publish/googleStorage.ts @@ -83,7 +83,7 @@ export class GoogleGCSPublish implements PublisherBase { const credentials = config.getOptionalString( 'techdocs.publisher.googleGcs.credentials', ); - let credentialsJson = {}; + let credentialsJson: any = {}; if (credentials) { try { credentialsJson = JSON.parse(credentials); @@ -96,6 +96,7 @@ export class GoogleGCSPublish implements PublisherBase { const storageClient = new Storage({ ...(credentials && { + projectId: credentialsJson.project_id, credentials: credentialsJson, }), });