mirror of https://github.com/actions/toolkit
Adding concurrency and upload response logs
parent
d2d69999e3
commit
31a6086649
|
@ -59,16 +59,16 @@ export async function uploadZipToBlobStorage(
|
||||||
core.info(`is the upload stream closed? ${uploadStream.closed}`)
|
core.info(`is the upload stream closed? ${uploadStream.closed}`)
|
||||||
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}`)
|
||||||
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.uploadStream(
|
await blockBlobClient
|
||||||
uploadStream,
|
.uploadStream(uploadStream, bufferSize, maxConcurrency, options)
|
||||||
bufferSize,
|
.then(response => {
|
||||||
maxConcurrency,
|
core.info(`Upload stream response: ${response}`)
|
||||||
options
|
})
|
||||||
)
|
|
||||||
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'
|
||||||
)
|
)
|
||||||
|
|
|
@ -47,18 +47,22 @@ export async function createZipUploadStream(
|
||||||
createReadStream(file.sourcePath),
|
createReadStream(file.sourcePath),
|
||||||
{name: file.destinationPath},
|
{name: file.destinationPath},
|
||||||
function (err, entry) {
|
function (err, entry) {
|
||||||
core.debug(`Entry is: ${entry}`)
|
core.info(`Entry is: ${entry}`)
|
||||||
if (err) reject(err)
|
if (err) reject(err)
|
||||||
else resolve(entry)
|
else resolve(entry)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
// add directory to zip
|
// add directory to zip
|
||||||
zip.entry(null, {name: file.destinationPath}, function (err, entry) {
|
zip.entry(
|
||||||
core.debug(`Entry is: ${entry}`)
|
null,
|
||||||
|
{name: `${file.destinationPath}/`},
|
||||||
|
function (err, entry) {
|
||||||
|
core.info(`Entry is: ${entry}`)
|
||||||
if (err) reject(err)
|
if (err) reject(err)
|
||||||
else resolve(entry)
|
else resolve(entry)
|
||||||
})
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue