mirror of https://github.com/actions/cache.git
Implement cache v2
parent
f7e6edf3a0
commit
643d6d6123
|
@ -12362,17 +12362,18 @@ const core = __importStar(__nccwpck_require__(4850));
|
|||
const storage_blob_1 = __nccwpck_require__(3864);
|
||||
function UploadCache(uploadURL, archivePath) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
core.debug(`Uploading cache to: ${uploadURL}`);
|
||||
core.info(`Uploading ${archivePath} to: ${uploadURL}`);
|
||||
// Specify data transfer options
|
||||
const uploadOptions = {
|
||||
blockSize: 4 * 1024 * 1024,
|
||||
concurrency: 2,
|
||||
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 = new storage_blob_1.BlobClient(uploadURL.urls[0].url);
|
||||
const blockBlobClient = blobClient.getBlockBlobClient();
|
||||
core.info(`BlobClient: ${blobClient}`);
|
||||
core.info(`BlobClient: ${blockBlobClient}`);
|
||||
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -12362,17 +12362,18 @@ const core = __importStar(__nccwpck_require__(4850));
|
|||
const storage_blob_1 = __nccwpck_require__(3864);
|
||||
function UploadCache(uploadURL, archivePath) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
core.debug(`Uploading cache to: ${uploadURL}`);
|
||||
core.info(`Uploading ${archivePath} to: ${uploadURL}`);
|
||||
// Specify data transfer options
|
||||
const uploadOptions = {
|
||||
blockSize: 4 * 1024 * 1024,
|
||||
concurrency: 2,
|
||||
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 = new storage_blob_1.BlobClient(uploadURL.urls[0].url);
|
||||
const blockBlobClient = blobClient.getBlockBlobClient();
|
||||
core.info(`BlobClient: ${blobClient}`);
|
||||
core.info(`BlobClient: ${blockBlobClient}`);
|
||||
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -12362,17 +12362,18 @@ const core = __importStar(__nccwpck_require__(4850));
|
|||
const storage_blob_1 = __nccwpck_require__(3864);
|
||||
function UploadCache(uploadURL, archivePath) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
core.debug(`Uploading cache to: ${uploadURL}`);
|
||||
core.info(`Uploading ${archivePath} to: ${uploadURL}`);
|
||||
// Specify data transfer options
|
||||
const uploadOptions = {
|
||||
blockSize: 4 * 1024 * 1024,
|
||||
concurrency: 2,
|
||||
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 = new storage_blob_1.BlobClient(uploadURL.urls[0].url);
|
||||
const blockBlobClient = blobClient.getBlockBlobClient();
|
||||
core.info(`BlobClient: ${blobClient}`);
|
||||
core.info(`BlobClient: ${blockBlobClient}`);
|
||||
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -12362,17 +12362,18 @@ const core = __importStar(__nccwpck_require__(4850));
|
|||
const storage_blob_1 = __nccwpck_require__(3864);
|
||||
function UploadCache(uploadURL, archivePath) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
core.debug(`Uploading cache to: ${uploadURL}`);
|
||||
core.info(`Uploading ${archivePath} to: ${uploadURL}`);
|
||||
// Specify data transfer options
|
||||
const uploadOptions = {
|
||||
blockSize: 4 * 1024 * 1024,
|
||||
concurrency: 2,
|
||||
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 = new storage_blob_1.BlobClient(uploadURL.urls[0].url);
|
||||
const blockBlobClient = blobClient.getBlockBlobClient();
|
||||
core.info(`BlobClient: ${blobClient}`);
|
||||
core.info(`BlobClient: ${blockBlobClient}`);
|
||||
return blockBlobClient.uploadFile(archivePath, uploadOptions);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue