Skip to content

Commit 63461be

Browse files
Added variable to force enable download zip option on windows (#14867)
* Added variable to force enable download zi[ option * Update variable name * Resolve review points Co-authored-by: DaniilShmelev <[email protected]>
1 parent 79a2d6b commit 63461be

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Tasks/DownloadBuildArtifactsV0/main.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,9 @@ async function main(): Promise<void> {
276276

277277
if (artifact.resource.type.toLowerCase() === "container") {
278278
var handler = new webHandlers.PersonalAccessTokenCredentialHandler(accessToken);
279+
// this variable uses to force enable zip download option, it is used only in test purpose and shouldn't be used for other reasons
280+
const forceEnableZipDownloadOption = tl.getVariable("DownloadBuildArtifacts.ForceEnableDownloadZipForCanary");
281+
const forceEnableZipDownloadOptionBool = forceEnableZipDownloadOption ? forceEnableZipDownloadOption.toLowerCase() == 'true' : false;
279282
var isPullRequestFork = tl.getVariable("SYSTEM.PULLREQUEST.ISFORK");
280283
var isPullRequestForkBool = isPullRequestFork ? isPullRequestFork.toLowerCase() == 'true' : false;
281284
var isZipDownloadDisabled = tl.getVariable("SYSTEM.DisableZipDownload");
@@ -286,7 +289,7 @@ async function main(): Promise<void> {
286289
isZipDownloadDisabledBool = true;
287290
}
288291

289-
if (!isZipDownloadDisabledBool && isWin && isPullRequestForkBool) {
292+
if (isWin && ((!isZipDownloadDisabledBool && isPullRequestForkBool) || forceEnableZipDownloadOptionBool)) {
290293
const operationName: string = `Download zip - ${artifact.name}`;
291294

292295
const handlerConfig: IContainerHandlerZipConfig = { ...config, projectId, buildId, handler, endpointUrl };

Tasks/DownloadBuildArtifactsV0/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"version": {
1111
"Major": 0,
1212
"Minor": 188,
13-
"Patch": 0
13+
"Patch": 1
1414
},
1515
"groups": [
1616
{

Tasks/DownloadBuildArtifactsV0/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"version": {
1111
"Major": 0,
1212
"Minor": 188,
13-
"Patch": 0
13+
"Patch": 1
1414
},
1515
"groups": [
1616
{

0 commit comments

Comments
 (0)