mirror of https://github.com/actions/toolkit
Remove finalize
parent
97e4fcfcd5
commit
f33a3f4748
|
@ -52,22 +52,14 @@ export async function uploadZipToBlobStorage(
|
||||||
zipUploadStream.pipe(hashStream).setEncoding('hex') // This stream is used to compute a hash of the zip content that gets used. Integrity check
|
zipUploadStream.pipe(hashStream).setEncoding('hex') // This stream is used to compute a hash of the zip content that gets used. Integrity check
|
||||||
|
|
||||||
core.info('Beginning upload of artifact content to blob storage')
|
core.info('Beginning upload of artifact content to blob storage')
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await new Promise((resolve, reject) => {
|
await blockBlobClient.uploadStream(
|
||||||
uploadStream.on('readable', async () => {
|
uploadStream,
|
||||||
try {
|
bufferSize,
|
||||||
await blockBlobClient.uploadStream(
|
maxConcurrency,
|
||||||
uploadStream,
|
options
|
||||||
bufferSize,
|
)
|
||||||
maxConcurrency,
|
|
||||||
options
|
|
||||||
)
|
|
||||||
resolve('success')
|
|
||||||
} catch (error) {
|
|
||||||
reject(error)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (NetworkError.isNetworkErrorCode(error?.code)) {
|
if (NetworkError.isNetworkErrorCode(error?.code)) {
|
||||||
throw new NetworkError(error?.code)
|
throw new NetworkError(error?.code)
|
||||||
|
@ -75,20 +67,6 @@ export async function uploadZipToBlobStorage(
|
||||||
|
|
||||||
throw error
|
throw error
|
||||||
}
|
}
|
||||||
// try {
|
|
||||||
// await blockBlobClient.uploadStream(
|
|
||||||
// uploadStream,
|
|
||||||
// bufferSize,
|
|
||||||
// maxConcurrency,
|
|
||||||
// options
|
|
||||||
// )
|
|
||||||
// } catch (error) {
|
|
||||||
// if (NetworkError.isNetworkErrorCode(error?.code)) {
|
|
||||||
// throw new NetworkError(error?.code)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// throw error
|
|
||||||
// }
|
|
||||||
|
|
||||||
core.info('Finished uploading artifact content to blob storage!')
|
core.info('Finished uploading artifact content to blob storage!')
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ export async function createZipUploadStream(
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
zip.finalize()
|
// zip.finalize()
|
||||||
const bufferSize = getUploadChunkSize()
|
const bufferSize = getUploadChunkSize()
|
||||||
const zipUploadStream = new ZipUploadStream(bufferSize)
|
const zipUploadStream = new ZipUploadStream(bufferSize)
|
||||||
core.debug(
|
core.debug(
|
||||||
|
|
Loading…
Reference in New Issue