From f34bb70dc65d4e9d576f842697795bedbb031c17 Mon Sep 17 00:00:00 2001 From: Nikita Ezzhev Date: Tue, 2 Mar 2021 11:25:10 +0300 Subject: [PATCH 1/5] Added restrictions for variables and commands --- Tasks/CocoaPodsV0/task.json | 11 ++++++++++- Tasks/CocoaPodsV0/task.loc.json | 11 ++++++++++- Tasks/DownloadSecureFileV1/task.json | 12 ++++++++++-- Tasks/DownloadSecureFileV1/task.loc.json | 14 ++++++++++++-- Tasks/JenkinsQueueJobV2/package-lock.json | 2 +- Tasks/JenkinsQueueJobV2/task.json | 8 +++++++- Tasks/JenkinsQueueJobV2/task.loc.json | 10 +++++++++- 7 files changed, 59 insertions(+), 9 deletions(-) diff --git a/Tasks/CocoaPodsV0/task.json b/Tasks/CocoaPodsV0/task.json index a8a556585243..b0a7ea73cc7f 100644 --- a/Tasks/CocoaPodsV0/task.json +++ b/Tasks/CocoaPodsV0/task.json @@ -14,9 +14,10 @@ "DeploymentGroup" ], "author": "Microsoft Corporation", + "minimumAgentVersion": "2.181.1", "version": { "Major": 0, - "Minor": 181, + "Minor": 184, "Patch": 0 }, "groups": [ @@ -64,6 +65,14 @@ "argumentFormat": "" } }, + "restrictions": { + "commands": { + "mode": "restricted" + }, + "settableVariables": { + "allowed": [] + } + }, "messages": { "PodReturnCode": "The 'pod' command exited with return code: %d", "PodFailed": "The 'pod' command failed with error: %s", diff --git a/Tasks/CocoaPodsV0/task.loc.json b/Tasks/CocoaPodsV0/task.loc.json index 797b4d62d19d..8199eb3c4135 100644 --- a/Tasks/CocoaPodsV0/task.loc.json +++ b/Tasks/CocoaPodsV0/task.loc.json @@ -14,9 +14,10 @@ "DeploymentGroup" ], "author": "Microsoft Corporation", + "minimumAgentVersion": "2.181.1", "version": { "Major": 0, - "Minor": 181, + "Minor": 184, "Patch": 0 }, "groups": [ @@ -64,6 +65,14 @@ "argumentFormat": "" } }, + "restrictions": { + "commands": { + "mode": "restricted" + }, + "settableVariables": { + "allowed": [] + } + }, "messages": { "PodReturnCode": "ms-resource:loc.messages.PodReturnCode", "PodFailed": "ms-resource:loc.messages.PodFailed", diff --git a/Tasks/DownloadSecureFileV1/task.json b/Tasks/DownloadSecureFileV1/task.json index 32108e85354e..35fad58a5abf 100644 --- a/Tasks/DownloadSecureFileV1/task.json +++ b/Tasks/DownloadSecureFileV1/task.json @@ -13,7 +13,7 @@ "author": "Microsoft Corporation", "version": { "Major": 1, - "Minor": 181, + "Minor": 184, "Patch": 0 }, "runsOn": [ @@ -21,7 +21,7 @@ "DeploymentGroup" ], "demands": [], - "minimumAgentVersion": "2.116.0", + "minimumAgentVersion": "2.181.1", "instanceNameFormat": "Download secure file", "inputs": [ { @@ -61,5 +61,13 @@ "argumentFormat": "" } }, + "restrictions": { + "commands": { + "mode": "restricted" + }, + "settableVariables": { + "allowed": ["secureFilePath"] + } + }, "messages": {} } \ No newline at end of file diff --git a/Tasks/DownloadSecureFileV1/task.loc.json b/Tasks/DownloadSecureFileV1/task.loc.json index cc5300a98614..00ef3db0792e 100644 --- a/Tasks/DownloadSecureFileV1/task.loc.json +++ b/Tasks/DownloadSecureFileV1/task.loc.json @@ -13,7 +13,7 @@ "author": "Microsoft Corporation", "version": { "Major": 1, - "Minor": 181, + "Minor": 184, "Patch": 0 }, "runsOn": [ @@ -21,7 +21,7 @@ "DeploymentGroup" ], "demands": [], - "minimumAgentVersion": "2.116.0", + "minimumAgentVersion": "2.181.1", "instanceNameFormat": "ms-resource:loc.instanceNameFormat", "inputs": [ { @@ -61,5 +61,15 @@ "argumentFormat": "" } }, + "restrictions": { + "commands": { + "mode": "restricted" + }, + "settableVariables": { + "allowed": [ + "secureFilePath" + ] + } + }, "messages": {} } \ No newline at end of file diff --git a/Tasks/JenkinsQueueJobV2/package-lock.json b/Tasks/JenkinsQueueJobV2/package-lock.json index 9c88fc683b87..78cf784565ef 100644 --- a/Tasks/JenkinsQueueJobV2/package-lock.json +++ b/Tasks/JenkinsQueueJobV2/package-lock.json @@ -445,7 +445,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", "requires": { "brace-expansion": "^1.1.7" } diff --git a/Tasks/JenkinsQueueJobV2/task.json b/Tasks/JenkinsQueueJobV2/task.json index 24c6c57db96d..161da32c2115 100644 --- a/Tasks/JenkinsQueueJobV2/task.json +++ b/Tasks/JenkinsQueueJobV2/task.json @@ -12,9 +12,10 @@ ], "author": "Microsoft", "demands": [], + "minimumAgentVersion": "2.181.1", "version": { "Major": 2, - "Minor": 181, + "Minor": 184, "Patch": 0 }, "groups": [ @@ -115,6 +116,11 @@ "argumentFormat": "" } }, + "restrictions": { + "settableVariables": { + "allowed": ["JENKINS_JOB_ID"] + } + }, "messages": { "FailedToGenerateSummary": "Failed to generate build summary.", "succeeded": "succeeded", diff --git a/Tasks/JenkinsQueueJobV2/task.loc.json b/Tasks/JenkinsQueueJobV2/task.loc.json index 6b1d6ec2e5b2..b8b5f86bcb99 100644 --- a/Tasks/JenkinsQueueJobV2/task.loc.json +++ b/Tasks/JenkinsQueueJobV2/task.loc.json @@ -12,9 +12,10 @@ ], "author": "Microsoft", "demands": [], + "minimumAgentVersion": "2.181.1", "version": { "Major": 2, - "Minor": 181, + "Minor": 184, "Patch": 0 }, "groups": [ @@ -115,6 +116,13 @@ "argumentFormat": "" } }, + "restrictions": { + "settableVariables": { + "allowed": [ + "JENKINS_JOB_ID" + ] + } + }, "messages": { "FailedToGenerateSummary": "ms-resource:loc.messages.FailedToGenerateSummary", "succeeded": "ms-resource:loc.messages.succeeded", From f7bccaacc53658ccc7920748f56073c1727c4d2a Mon Sep 17 00:00:00 2001 From: Nikita Ezzhev Date: Tue, 2 Mar 2021 13:09:26 +0300 Subject: [PATCH 2/5] Change formatting of task.json --- Tasks/DownloadSecureFileV1/task.json | 4 +++- Tasks/JenkinsQueueJobV2/task.json | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Tasks/DownloadSecureFileV1/task.json b/Tasks/DownloadSecureFileV1/task.json index 35fad58a5abf..5797a9baaaf9 100644 --- a/Tasks/DownloadSecureFileV1/task.json +++ b/Tasks/DownloadSecureFileV1/task.json @@ -66,7 +66,9 @@ "mode": "restricted" }, "settableVariables": { - "allowed": ["secureFilePath"] + "allowed": [ + "secureFilePath" + ] } }, "messages": {} diff --git a/Tasks/JenkinsQueueJobV2/task.json b/Tasks/JenkinsQueueJobV2/task.json index 161da32c2115..290437027853 100644 --- a/Tasks/JenkinsQueueJobV2/task.json +++ b/Tasks/JenkinsQueueJobV2/task.json @@ -118,7 +118,9 @@ }, "restrictions": { "settableVariables": { - "allowed": ["JENKINS_JOB_ID"] + "allowed": [ + "JENKINS_JOB_ID" + ] } }, "messages": { From 41f77a484c8012e9d1913e1d12162aef9984adf0 Mon Sep 17 00:00:00 2001 From: Nikita Ezzhev Date: Tue, 2 Mar 2021 13:24:56 +0300 Subject: [PATCH 3/5] Change minimal agent version --- Tasks/CocoaPodsV0/task.json | 2 +- Tasks/CocoaPodsV0/task.loc.json | 2 +- Tasks/DownloadSecureFileV1/task.json | 2 +- Tasks/DownloadSecureFileV1/task.loc.json | 2 +- Tasks/JenkinsQueueJobV2/task.json | 2 +- Tasks/JenkinsQueueJobV2/task.loc.json | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Tasks/CocoaPodsV0/task.json b/Tasks/CocoaPodsV0/task.json index b0a7ea73cc7f..787f766a8c0f 100644 --- a/Tasks/CocoaPodsV0/task.json +++ b/Tasks/CocoaPodsV0/task.json @@ -14,7 +14,7 @@ "DeploymentGroup" ], "author": "Microsoft Corporation", - "minimumAgentVersion": "2.181.1", + "minimumAgentVersion": "2.182.1", "version": { "Major": 0, "Minor": 184, diff --git a/Tasks/CocoaPodsV0/task.loc.json b/Tasks/CocoaPodsV0/task.loc.json index 8199eb3c4135..29dff3e3716c 100644 --- a/Tasks/CocoaPodsV0/task.loc.json +++ b/Tasks/CocoaPodsV0/task.loc.json @@ -14,7 +14,7 @@ "DeploymentGroup" ], "author": "Microsoft Corporation", - "minimumAgentVersion": "2.181.1", + "minimumAgentVersion": "2.182.1", "version": { "Major": 0, "Minor": 184, diff --git a/Tasks/DownloadSecureFileV1/task.json b/Tasks/DownloadSecureFileV1/task.json index 5797a9baaaf9..b8cc37bc2199 100644 --- a/Tasks/DownloadSecureFileV1/task.json +++ b/Tasks/DownloadSecureFileV1/task.json @@ -21,7 +21,7 @@ "DeploymentGroup" ], "demands": [], - "minimumAgentVersion": "2.181.1", + "minimumAgentVersion": "2.182.1", "instanceNameFormat": "Download secure file", "inputs": [ { diff --git a/Tasks/DownloadSecureFileV1/task.loc.json b/Tasks/DownloadSecureFileV1/task.loc.json index 00ef3db0792e..175b937cbe7d 100644 --- a/Tasks/DownloadSecureFileV1/task.loc.json +++ b/Tasks/DownloadSecureFileV1/task.loc.json @@ -21,7 +21,7 @@ "DeploymentGroup" ], "demands": [], - "minimumAgentVersion": "2.181.1", + "minimumAgentVersion": "2.182.1", "instanceNameFormat": "ms-resource:loc.instanceNameFormat", "inputs": [ { diff --git a/Tasks/JenkinsQueueJobV2/task.json b/Tasks/JenkinsQueueJobV2/task.json index 290437027853..edb6831f3636 100644 --- a/Tasks/JenkinsQueueJobV2/task.json +++ b/Tasks/JenkinsQueueJobV2/task.json @@ -12,7 +12,7 @@ ], "author": "Microsoft", "demands": [], - "minimumAgentVersion": "2.181.1", + "minimumAgentVersion": "2.182.1", "version": { "Major": 2, "Minor": 184, diff --git a/Tasks/JenkinsQueueJobV2/task.loc.json b/Tasks/JenkinsQueueJobV2/task.loc.json index b8b5f86bcb99..d492b9051c22 100644 --- a/Tasks/JenkinsQueueJobV2/task.loc.json +++ b/Tasks/JenkinsQueueJobV2/task.loc.json @@ -12,7 +12,7 @@ ], "author": "Microsoft", "demands": [], - "minimumAgentVersion": "2.181.1", + "minimumAgentVersion": "2.182.1", "version": { "Major": 2, "Minor": 184, From c98eca05f81c35d620ee696b134b90d628a4db34 Mon Sep 17 00:00:00 2001 From: Nikita Ezzhev Date: Wed, 3 Mar 2021 15:54:30 +0300 Subject: [PATCH 4/5] remove restrictions from JenkinsQueueJob task --- Tasks/JenkinsQueueJobV2/package-lock.json | 2 +- Tasks/JenkinsQueueJobV2/task.json | 10 +--------- Tasks/JenkinsQueueJobV2/task.loc.json | 10 +--------- 3 files changed, 3 insertions(+), 19 deletions(-) diff --git a/Tasks/JenkinsQueueJobV2/package-lock.json b/Tasks/JenkinsQueueJobV2/package-lock.json index 78cf784565ef..9c88fc683b87 100644 --- a/Tasks/JenkinsQueueJobV2/package-lock.json +++ b/Tasks/JenkinsQueueJobV2/package-lock.json @@ -445,7 +445,7 @@ "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { "brace-expansion": "^1.1.7" } diff --git a/Tasks/JenkinsQueueJobV2/task.json b/Tasks/JenkinsQueueJobV2/task.json index edb6831f3636..24c6c57db96d 100644 --- a/Tasks/JenkinsQueueJobV2/task.json +++ b/Tasks/JenkinsQueueJobV2/task.json @@ -12,10 +12,9 @@ ], "author": "Microsoft", "demands": [], - "minimumAgentVersion": "2.182.1", "version": { "Major": 2, - "Minor": 184, + "Minor": 181, "Patch": 0 }, "groups": [ @@ -116,13 +115,6 @@ "argumentFormat": "" } }, - "restrictions": { - "settableVariables": { - "allowed": [ - "JENKINS_JOB_ID" - ] - } - }, "messages": { "FailedToGenerateSummary": "Failed to generate build summary.", "succeeded": "succeeded", diff --git a/Tasks/JenkinsQueueJobV2/task.loc.json b/Tasks/JenkinsQueueJobV2/task.loc.json index d492b9051c22..6b1d6ec2e5b2 100644 --- a/Tasks/JenkinsQueueJobV2/task.loc.json +++ b/Tasks/JenkinsQueueJobV2/task.loc.json @@ -12,10 +12,9 @@ ], "author": "Microsoft", "demands": [], - "minimumAgentVersion": "2.182.1", "version": { "Major": 2, - "Minor": 184, + "Minor": 181, "Patch": 0 }, "groups": [ @@ -116,13 +115,6 @@ "argumentFormat": "" } }, - "restrictions": { - "settableVariables": { - "allowed": [ - "JENKINS_JOB_ID" - ] - } - }, "messages": { "FailedToGenerateSummary": "ms-resource:loc.messages.FailedToGenerateSummary", "succeeded": "ms-resource:loc.messages.succeeded", From cdb0463b5de9e917d865db43fa057362df319f44 Mon Sep 17 00:00:00 2001 From: Nikita Ezzhev Date: Mon, 5 Apr 2021 14:41:32 +0300 Subject: [PATCH 5/5] Bump tasks vesions --- Tasks/CocoaPodsV0/task.json | 2 +- Tasks/CocoaPodsV0/task.loc.json | 2 +- Tasks/DownloadSecureFileV1/task.json | 2 +- Tasks/DownloadSecureFileV1/task.loc.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Tasks/CocoaPodsV0/task.json b/Tasks/CocoaPodsV0/task.json index 787f766a8c0f..a10131b52a33 100644 --- a/Tasks/CocoaPodsV0/task.json +++ b/Tasks/CocoaPodsV0/task.json @@ -17,7 +17,7 @@ "minimumAgentVersion": "2.182.1", "version": { "Major": 0, - "Minor": 184, + "Minor": 186, "Patch": 0 }, "groups": [ diff --git a/Tasks/CocoaPodsV0/task.loc.json b/Tasks/CocoaPodsV0/task.loc.json index 29dff3e3716c..07680226d27c 100644 --- a/Tasks/CocoaPodsV0/task.loc.json +++ b/Tasks/CocoaPodsV0/task.loc.json @@ -17,7 +17,7 @@ "minimumAgentVersion": "2.182.1", "version": { "Major": 0, - "Minor": 184, + "Minor": 186, "Patch": 0 }, "groups": [ diff --git a/Tasks/DownloadSecureFileV1/task.json b/Tasks/DownloadSecureFileV1/task.json index b8cc37bc2199..7f204c963f22 100644 --- a/Tasks/DownloadSecureFileV1/task.json +++ b/Tasks/DownloadSecureFileV1/task.json @@ -13,7 +13,7 @@ "author": "Microsoft Corporation", "version": { "Major": 1, - "Minor": 184, + "Minor": 186, "Patch": 0 }, "runsOn": [ diff --git a/Tasks/DownloadSecureFileV1/task.loc.json b/Tasks/DownloadSecureFileV1/task.loc.json index 175b937cbe7d..80cb7dde6b60 100644 --- a/Tasks/DownloadSecureFileV1/task.loc.json +++ b/Tasks/DownloadSecureFileV1/task.loc.json @@ -13,7 +13,7 @@ "author": "Microsoft Corporation", "version": { "Major": 1, - "Minor": 184, + "Minor": 186, "Patch": 0 }, "runsOn": [