Implement cache v2
This commit is contained in:
parent
f7e6edf3a0
commit
643d6d6123
|
@ -12362,17 +12362,18 @@ const core = __importStar(__nccwpck_require__(4850));
|
||||||
const storage_blob_1 = __nccwpck_require__(3864);
|
const storage_blob_1 = __nccwpck_require__(3864);
|
||||||
function UploadCache(uploadURL, archivePath) {
|
function UploadCache(uploadURL, archivePath) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
core.debug(`Uploading cache to: ${uploadURL}`);
|
core.info(`Uploading ${archivePath} to: ${uploadURL}`);
|
||||||
// Specify data transfer options
|
// Specify data transfer options
|
||||||
const uploadOptions = {
|
const uploadOptions = {
|
||||||
blockSize: 4 * 1024 * 1024,
|
blockSize: 4 * 1024 * 1024,
|
||||||
concurrency: 2,
|
concurrency: 2,
|
||||||
maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
|
maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
|
||||||
};
|
};
|
||||||
// Create blob client from container client
|
|
||||||
// const blobClient: BlobClient = new BlobClient(uploadURL.urls[0])
|
// const blobClient: BlobClient = new BlobClient(uploadURL.urls[0])
|
||||||
const blobClient = new storage_blob_1.BlobClient(uploadURL.urls[0].url);
|
const blobClient = new storage_blob_1.BlobClient(uploadURL.urls[0].url);
|
||||||
const blockBlobClient = blobClient.getBlockBlobClient();
|
const blockBlobClient = blobClient.getBlockBlobClient();
|
||||||
|
core.info(`BlobClient: ${blobClient}`);
|
||||||
|
core.info(`BlobClient: ${blockBlobClient}`);
|
||||||
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -12362,17 +12362,18 @@ const core = __importStar(__nccwpck_require__(4850));
|
||||||
const storage_blob_1 = __nccwpck_require__(3864);
|
const storage_blob_1 = __nccwpck_require__(3864);
|
||||||
function UploadCache(uploadURL, archivePath) {
|
function UploadCache(uploadURL, archivePath) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
core.debug(`Uploading cache to: ${uploadURL}`);
|
core.info(`Uploading ${archivePath} to: ${uploadURL}`);
|
||||||
// Specify data transfer options
|
// Specify data transfer options
|
||||||
const uploadOptions = {
|
const uploadOptions = {
|
||||||
blockSize: 4 * 1024 * 1024,
|
blockSize: 4 * 1024 * 1024,
|
||||||
concurrency: 2,
|
concurrency: 2,
|
||||||
maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
|
maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
|
||||||
};
|
};
|
||||||
// Create blob client from container client
|
|
||||||
// const blobClient: BlobClient = new BlobClient(uploadURL.urls[0])
|
// const blobClient: BlobClient = new BlobClient(uploadURL.urls[0])
|
||||||
const blobClient = new storage_blob_1.BlobClient(uploadURL.urls[0].url);
|
const blobClient = new storage_blob_1.BlobClient(uploadURL.urls[0].url);
|
||||||
const blockBlobClient = blobClient.getBlockBlobClient();
|
const blockBlobClient = blobClient.getBlockBlobClient();
|
||||||
|
core.info(`BlobClient: ${blobClient}`);
|
||||||
|
core.info(`BlobClient: ${blockBlobClient}`);
|
||||||
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -12362,17 +12362,18 @@ const core = __importStar(__nccwpck_require__(4850));
|
||||||
const storage_blob_1 = __nccwpck_require__(3864);
|
const storage_blob_1 = __nccwpck_require__(3864);
|
||||||
function UploadCache(uploadURL, archivePath) {
|
function UploadCache(uploadURL, archivePath) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
core.debug(`Uploading cache to: ${uploadURL}`);
|
core.info(`Uploading ${archivePath} to: ${uploadURL}`);
|
||||||
// Specify data transfer options
|
// Specify data transfer options
|
||||||
const uploadOptions = {
|
const uploadOptions = {
|
||||||
blockSize: 4 * 1024 * 1024,
|
blockSize: 4 * 1024 * 1024,
|
||||||
concurrency: 2,
|
concurrency: 2,
|
||||||
maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
|
maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
|
||||||
};
|
};
|
||||||
// Create blob client from container client
|
|
||||||
// const blobClient: BlobClient = new BlobClient(uploadURL.urls[0])
|
// const blobClient: BlobClient = new BlobClient(uploadURL.urls[0])
|
||||||
const blobClient = new storage_blob_1.BlobClient(uploadURL.urls[0].url);
|
const blobClient = new storage_blob_1.BlobClient(uploadURL.urls[0].url);
|
||||||
const blockBlobClient = blobClient.getBlockBlobClient();
|
const blockBlobClient = blobClient.getBlockBlobClient();
|
||||||
|
core.info(`BlobClient: ${blobClient}`);
|
||||||
|
core.info(`BlobClient: ${blockBlobClient}`);
|
||||||
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -12362,17 +12362,18 @@ const core = __importStar(__nccwpck_require__(4850));
|
||||||
const storage_blob_1 = __nccwpck_require__(3864);
|
const storage_blob_1 = __nccwpck_require__(3864);
|
||||||
function UploadCache(uploadURL, archivePath) {
|
function UploadCache(uploadURL, archivePath) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
core.debug(`Uploading cache to: ${uploadURL}`);
|
core.info(`Uploading ${archivePath} to: ${uploadURL}`);
|
||||||
// Specify data transfer options
|
// Specify data transfer options
|
||||||
const uploadOptions = {
|
const uploadOptions = {
|
||||||
blockSize: 4 * 1024 * 1024,
|
blockSize: 4 * 1024 * 1024,
|
||||||
concurrency: 2,
|
concurrency: 2,
|
||||||
maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
|
maxSingleShotSize: 8 * 1024 * 1024, // 8 MiB initial transfer size
|
||||||
};
|
};
|
||||||
// Create blob client from container client
|
|
||||||
// const blobClient: BlobClient = new BlobClient(uploadURL.urls[0])
|
// const blobClient: BlobClient = new BlobClient(uploadURL.urls[0])
|
||||||
const blobClient = new storage_blob_1.BlobClient(uploadURL.urls[0].url);
|
const blobClient = new storage_blob_1.BlobClient(uploadURL.urls[0].url);
|
||||||
const blockBlobClient = blobClient.getBlockBlobClient();
|
const blockBlobClient = blobClient.getBlockBlobClient();
|
||||||
|
core.info(`BlobClient: ${blobClient}`);
|
||||||
|
core.info(`BlobClient: ${blockBlobClient}`);
|
||||||
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue