mirror of https://github.com/actions/toolkit
defaulting compression level
parent
0a0e70d1cd
commit
59593338a6
|
@ -60,20 +60,16 @@ export async function uploadZipToBlobStorage(
|
||||||
core.info(`is the upload stream readable? ${uploadStream.readable}`)
|
core.info(`is the upload stream readable? ${uploadStream.readable}`)
|
||||||
core.info(`is the upload stream writable? ${uploadStream.writable}`)
|
core.info(`is the upload stream writable? ${uploadStream.writable}`)
|
||||||
core.info(`are we exceeding the max concurrency? ${maxConcurrency}`)
|
core.info(`are we exceeding the max concurrency? ${maxConcurrency}`)
|
||||||
// is the blob client ready?
|
|
||||||
core.info(`blob client props: ${blockBlobClient.url}`)
|
|
||||||
try {
|
try {
|
||||||
core.info(
|
core.info(
|
||||||
'1 Even more beginning upload of artifact content to blob storage'
|
'1 Even more beginning upload of artifact content to blob storage'
|
||||||
)
|
)
|
||||||
await blockBlobClient
|
await blockBlobClient.uploadStream(
|
||||||
.uploadStream(uploadStream, bufferSize, maxConcurrency, options)
|
uploadStream,
|
||||||
.catch(error => {
|
bufferSize,
|
||||||
core.info(`Upload stream error: ${error}`)
|
maxConcurrency,
|
||||||
})
|
options
|
||||||
.then(response => {
|
)
|
||||||
core.info(`Upload stream response: ${response}`)
|
|
||||||
})
|
|
||||||
core.info(
|
core.info(
|
||||||
'2 Even more beginning upload of artifact content to blob storage'
|
'2 Even more beginning upload of artifact content to blob storage'
|
||||||
)
|
)
|
||||||
|
|
|
@ -75,7 +75,10 @@ export async function uploadArtifact(
|
||||||
return uploadZipToBlobStorage(
|
return uploadZipToBlobStorage(
|
||||||
createArtifactResp.signedUploadUrl,
|
createArtifactResp.signedUploadUrl,
|
||||||
zipUploadStream
|
zipUploadStream
|
||||||
)
|
).catch(err => {
|
||||||
|
core.error(`Error uploading artifact: ${err}`)
|
||||||
|
throw err
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.then(async uploadResult => {
|
.then(async uploadResult => {
|
||||||
const finalizeArtifactReq: FinalizeArtifactRequest = {
|
const finalizeArtifactReq: FinalizeArtifactRequest = {
|
||||||
|
|
|
@ -30,7 +30,7 @@ export async function createZipUploadStream(
|
||||||
`Creating Artifact archive with compressionLevel: ${compressionLevel}`
|
`Creating Artifact archive with compressionLevel: ${compressionLevel}`
|
||||||
)
|
)
|
||||||
const zlibOptions = {
|
const zlibOptions = {
|
||||||
zlib: {level: compressionLevel, bufferSize: getUploadChunkSize()}
|
zlib: {level: DEFAULT_COMPRESSION_LEVEL, bufferSize: getUploadChunkSize()}
|
||||||
}
|
}
|
||||||
const zip = new ZipStream.default(zlibOptions)
|
const zip = new ZipStream.default(zlibOptions)
|
||||||
// register callbacks for various events during the zip lifecycle
|
// register callbacks for various events during the zip lifecycle
|
||||||
|
|
Loading…
Reference in New Issue