Skip to content

Commit 14a3095

Browse files
committed
Revert "Temporarily disable mooncake upload"
This reverts commit c5dece6.
1 parent c5dece6 commit 14a3095

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

build/azure-pipelines/common/createAsset.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,10 @@ async function main() {
155155
console.log(`Blob ${quality}, ${blobName} already exists, not publishing again.`);
156156
return;
157157
}
158-
// const mooncakeCredential = new ClientSecretCredential(process.env['AZURE_MOONCAKE_TENANT_ID']!, process.env['AZURE_MOONCAKE_CLIENT_ID']!, process.env['AZURE_MOONCAKE_CLIENT_SECRET']!);
159-
// const mooncakeBlobServiceClient = new BlobServiceClient(`https://vscode.blob.core.chinacloudapi.cn`, mooncakeCredential, storagePipelineOptions);
160-
// const mooncakeContainerClient = mooncakeBlobServiceClient.getContainerClient(quality);
161-
// const mooncakeBlobClient = mooncakeContainerClient.getBlockBlobClient(blobName);
158+
const mooncakeCredential = new identity_1.ClientSecretCredential(process.env['AZURE_MOONCAKE_TENANT_ID'], process.env['AZURE_MOONCAKE_CLIENT_ID'], process.env['AZURE_MOONCAKE_CLIENT_SECRET']);
159+
const mooncakeBlobServiceClient = new storage_blob_1.BlobServiceClient(`https://vscode.blob.core.chinacloudapi.cn`, mooncakeCredential, storagePipelineOptions);
160+
const mooncakeContainerClient = mooncakeBlobServiceClient.getContainerClient(quality);
161+
const mooncakeBlobClient = mooncakeContainerClient.getBlockBlobClient(blobName);
162162
console.log('Uploading blobs to Azure storage and Mooncake Azure storage...');
163163
const blobOptions = {
164164
blobHTTPHeaders: {
@@ -169,7 +169,7 @@ async function main() {
169169
};
170170
await (0, retry_1.retry)(() => Promise.all([
171171
blobClient.uploadFile(filePath, blobOptions),
172-
// mooncakeBlobClient.uploadFile(filePath, blobOptions)
172+
mooncakeBlobClient.uploadFile(filePath, blobOptions)
173173
]));
174174
console.log('Blobs successfully uploaded.');
175175
const assetUrl = `${process.env['AZURE_CDN_URL']}/${quality}/${blobName}`;

build/azure-pipelines/common/createAsset.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ async function main(): Promise<void> {
187187
return;
188188
}
189189

190-
// const mooncakeCredential = new ClientSecretCredential(process.env['AZURE_MOONCAKE_TENANT_ID']!, process.env['AZURE_MOONCAKE_CLIENT_ID']!, process.env['AZURE_MOONCAKE_CLIENT_SECRET']!);
191-
// const mooncakeBlobServiceClient = new BlobServiceClient(`https://vscode.blob.core.chinacloudapi.cn`, mooncakeCredential, storagePipelineOptions);
192-
// const mooncakeContainerClient = mooncakeBlobServiceClient.getContainerClient(quality);
193-
// const mooncakeBlobClient = mooncakeContainerClient.getBlockBlobClient(blobName);
190+
const mooncakeCredential = new ClientSecretCredential(process.env['AZURE_MOONCAKE_TENANT_ID']!, process.env['AZURE_MOONCAKE_CLIENT_ID']!, process.env['AZURE_MOONCAKE_CLIENT_SECRET']!);
191+
const mooncakeBlobServiceClient = new BlobServiceClient(`https://vscode.blob.core.chinacloudapi.cn`, mooncakeCredential, storagePipelineOptions);
192+
const mooncakeContainerClient = mooncakeBlobServiceClient.getContainerClient(quality);
193+
const mooncakeBlobClient = mooncakeContainerClient.getBlockBlobClient(blobName);
194194

195195
console.log('Uploading blobs to Azure storage and Mooncake Azure storage...');
196196

@@ -204,7 +204,7 @@ async function main(): Promise<void> {
204204

205205
await retry(() => Promise.all([
206206
blobClient.uploadFile(filePath, blobOptions),
207-
// mooncakeBlobClient.uploadFile(filePath, blobOptions)
207+
mooncakeBlobClient.uploadFile(filePath, blobOptions)
208208
]));
209209

210210
console.log('Blobs successfully uploaded.');

0 commit comments

Comments
 (0)