Test with unique artifact name for v4 update

This commit is contained in:
Angela P Wen
2024-09-04 15:03:26 -07:00
parent 2992a95c3f
commit 3c37ab48df
3 changed files with 21 additions and 16 deletions
+7 -5
View File
@@ -66,7 +66,7 @@ async function uploadDebugArtifacts(toUpload, rootDir, artifactName, ghVariant)
}
try {
if (ghVariant === util_1.GitHubVariant.GHES) {
await artifactLegacy.create().uploadArtifact(sanitizeArifactName(`${artifactName}${suffix}`), toUpload.map((file) => path.normalize(file)), path.normalize(rootDir), {
await artifactLegacy.create().uploadArtifact(sanitizeArifactName(`${artifactName}${suffix}}`), toUpload.map((file) => path.normalize(file)), path.normalize(rootDir), {
continueOnError: true,
// ensure we don't keep the debug artifacts around for too long since they can be large.
retentionDays: 7,
@@ -74,10 +74,12 @@ async function uploadDebugArtifacts(toUpload, rootDir, artifactName, ghVariant)
}
else {
const artifactClient = new artifact.DefaultArtifactClient();
await artifactClient.uploadArtifact(sanitizeArifactName(`${artifactName}${suffix}`), toUpload.map((file) => path.normalize(file)), path.normalize(rootDir), {
// ensure we don't keep the debug artifacts around for too long since they can be large.
retentionDays: 7,
});
for (const file of toUpload) {
await artifactClient.uploadArtifact(sanitizeArifactName(`${artifactName}${suffix}-${file}`), [path.normalize(file)], path.normalize(rootDir), {
// ensure we don't keep the debug artifacts around for too long since they can be large.
retentionDays: 7,
});
}
}
}
catch (e) {