From f530b05b3b33f35fa89523aa94065af152626cba Mon Sep 17 00:00:00 2001 From: Mohith <97882857+v-mohithgc@users.noreply.github.com> Date: Fri, 22 Mar 2024 18:31:54 +0530 Subject: [PATCH] AzureFileCopyV6: Supports WIF and remove usage of SAS token. (#19650) * new task creation * sas removal+ WIF+ Azlogin * build * update finally block * task version to 237 * remove sas tc * update gdnguidlines to fix pr failure * added v6 in make-option.json * updated gdn * updated releaseNotes * updated utility.ps1 file * added issue link * add RBAC related link * Storage context creation with Microsoft Entra credentials. * build storage context creation with Microsoft Entra credentials. --- .gdn/.gdnbaselines | 66 + .github/CODEOWNERS | 4 + Tasks/AzureFileCopyV6/AzureFileCopy.ps1 | 257 +++ .../AzureFileCopyRemoteJob.ps1 | 117 ++ Tasks/AzureFileCopyV6/AzureUtilityARM.ps1 | 525 +++++++ Tasks/AzureFileCopyV6/AzureUtilityAz1.0.ps1 | 395 +++++ Tasks/AzureFileCopyV6/AzureUtilityRest.ps1 | 160 ++ Tasks/AzureFileCopyV6/MimeMapping.json | 559 +++++++ .../PreJobExecutionAzureFileCopy.ts | 54 + Tasks/AzureFileCopyV6/README.md | 116 ++ .../resources.resjson/de-DE/resources.resjson | 94 ++ .../resources.resjson/en-US/resources.resjson | 92 ++ .../resources.resjson/es-ES/resources.resjson | 94 ++ .../resources.resjson/fr-FR/resources.resjson | 94 ++ .../resources.resjson/it-IT/resources.resjson | 94 ++ .../resources.resjson/ja-JP/resources.resjson | 94 ++ .../resources.resjson/ko-KR/resources.resjson | 94 ++ .../resources.resjson/ru-RU/resources.resjson | 94 ++ .../resources.resjson/zh-CN/resources.resjson | 94 ++ .../resources.resjson/zh-TW/resources.resjson | 94 ++ Tasks/AzureFileCopyV6/Tests/L0.ts | 103 ++ .../L0AddAzureVMCustomScriptExtension.ps1 | 68 + .../Tests/L0CheckContainerNameAndArgs.ps1 | 15 + .../Tests/L0CopyFilesParallelyToAzureVMs.ps1 | 34 + .../L0CopyFilesSequentiallyToAzureVMs.ps1 | 30 + ...opyFilesToAzureVMsFromStorageContainer.ps1 | 61 + .../Tests/L0DoesAzureVMMatchTagFilter.ps1 | 33 + .../Tests/L0GetAzureUtility.ps1 | 22 + .../Tests/L0GetAzureVMResourcesProperties.ps1 | 31 + .../Tests/L0GetAzureVMsCredentials.ps1 | 16 + ...L0GetFilteredAzureRMVmsInResourceGroup.ps1 | 19 + .../L0GetFilteredAzureVmsInResourceGroup.ps1 | 27 + .../Tests/L0GetFrontEndPorts.ps1 | 34 + .../L0GetMachineBasedFilteredAzureVMs.ps1 | 30 + .../Tests/L0GetMachineNameFromId.ps1 | 91 ++ .../Tests/L0GetMachinesFqdnForLB.ps1 | 31 + .../Tests/L0GetRMVMConnectionDetailsInRG.ps1 | 36 + .../Tests/L0GetStorageAccountType.ps1 | 17 + .../AzureFileCopyV6/Tests/L0GetStorageKey.ps1 | 16 + .../Tests/L0GetTagBasedFilteredAzureVMs.ps1 | 22 + .../Tests/L0GetblobStorageEndpoint.ps1 | 17 + .../L0IsWinRMCustomScriptExtensionExists.ps1 | 61 + .../Tests/L0UtilityThrowError.ps1 | 12 + .../Tests/L0ValidateAzurePSVersion.ps1 | 26 + .../L0ValidateCustomScriptExecutionStatus.ps1 | 66 + Tasks/AzureFileCopyV6/Tests/MockHelper.ps1 | 653 ++++++++ Tasks/AzureFileCopyV6/Tests/MockVariable.ps1 | 58 + Tasks/AzureFileCopyV6/ThirdPartyNotices.txt | 1137 ++++++++++++++ Tasks/AzureFileCopyV6/Utility.ps1 | 1387 +++++++++++++++++ .../_buildConfigs/Node20/package-lock.json | 793 ++++++++++ .../_buildConfigs/Node20/package.json | 15 + Tasks/AzureFileCopyV6/icon.png | Bin 0 -> 517 bytes Tasks/AzureFileCopyV6/icon.svg | 3 + Tasks/AzureFileCopyV6/make.json | 63 + Tasks/AzureFileCopyV6/package-lock.json | 773 +++++++++ Tasks/AzureFileCopyV6/package.json | 15 + Tasks/AzureFileCopyV6/task.json | 290 ++++ Tasks/AzureFileCopyV6/task.loc.json | 290 ++++ Tasks/AzureFileCopyV6/tsconfig.json | 10 + _generated/AzureFileCopyV6.versionmap.txt | 2 + _generated/AzureFileCopyV6_Node20/.npmrc | 1 + .../AzureFileCopyV6_Node20/AzureFileCopy.ps1 | 257 +++ .../AzureFileCopyRemoteJob.ps1 | 117 ++ .../AzureUtilityARM.ps1 | 525 +++++++ .../AzureUtilityAz1.0.ps1 | 395 +++++ .../AzureUtilityRest.ps1 | 160 ++ .../AzureFileCopyV6_Node20/MimeMapping.json | 559 +++++++ .../PreJobExecutionAzureFileCopy.ts | 54 + _generated/AzureFileCopyV6_Node20/README.md | 116 ++ .../resources.resjson/de-DE/resources.resjson | 94 ++ .../resources.resjson/en-US/resources.resjson | 92 ++ .../resources.resjson/es-ES/resources.resjson | 94 ++ .../resources.resjson/fr-FR/resources.resjson | 94 ++ .../resources.resjson/it-IT/resources.resjson | 94 ++ .../resources.resjson/ja-JP/resources.resjson | 94 ++ .../resources.resjson/ko-KR/resources.resjson | 94 ++ .../resources.resjson/ru-RU/resources.resjson | 94 ++ .../resources.resjson/zh-CN/resources.resjson | 94 ++ .../resources.resjson/zh-TW/resources.resjson | 94 ++ _generated/AzureFileCopyV6_Node20/Tests/L0.ts | 103 ++ .../L0AddAzureVMCustomScriptExtension.ps1 | 68 + .../Tests/L0CheckContainerNameAndArgs.ps1 | 15 + .../Tests/L0CopyFilesParallelyToAzureVMs.ps1 | 34 + .../L0CopyFilesSequentiallyToAzureVMs.ps1 | 30 + ...opyFilesToAzureVMsFromStorageContainer.ps1 | 61 + .../Tests/L0DoesAzureVMMatchTagFilter.ps1 | 33 + .../Tests/L0GetAzureUtility.ps1 | 22 + .../Tests/L0GetAzureVMResourcesProperties.ps1 | 31 + .../Tests/L0GetAzureVMsCredentials.ps1 | 16 + ...L0GetFilteredAzureRMVmsInResourceGroup.ps1 | 19 + .../L0GetFilteredAzureVmsInResourceGroup.ps1 | 27 + .../Tests/L0GetFrontEndPorts.ps1 | 34 + .../L0GetMachineBasedFilteredAzureVMs.ps1 | 30 + .../Tests/L0GetMachineNameFromId.ps1 | 91 ++ .../Tests/L0GetMachinesFqdnForLB.ps1 | 31 + .../Tests/L0GetRMVMConnectionDetailsInRG.ps1 | 36 + .../Tests/L0GetStorageAccountType.ps1 | 17 + .../Tests/L0GetStorageKey.ps1 | 16 + .../Tests/L0GetTagBasedFilteredAzureVMs.ps1 | 22 + .../Tests/L0GetblobStorageEndpoint.ps1 | 17 + .../L0IsWinRMCustomScriptExtensionExists.ps1 | 61 + .../Tests/L0UtilityThrowError.ps1 | 12 + .../Tests/L0ValidateAzurePSVersion.ps1 | 26 + .../L0ValidateCustomScriptExecutionStatus.ps1 | 66 + .../Tests/MockHelper.ps1 | 653 ++++++++ .../Tests/MockVariable.ps1 | 58 + .../ThirdPartyNotices.txt | 1137 ++++++++++++++ _generated/AzureFileCopyV6_Node20/Utility.ps1 | 1387 +++++++++++++++++ _generated/AzureFileCopyV6_Node20/icon.png | Bin 0 -> 517 bytes _generated/AzureFileCopyV6_Node20/icon.svg | 3 + _generated/AzureFileCopyV6_Node20/make.json | 63 + .../AzureFileCopyV6_Node20/package-lock.json | 793 ++++++++++ .../AzureFileCopyV6_Node20/package.json | 15 + _generated/AzureFileCopyV6_Node20/task.json | 298 ++++ .../AzureFileCopyV6_Node20/task.loc.json | 298 ++++ .../AzureFileCopyV6_Node20/tsconfig.json | 10 + make-options.json | 2 + 117 files changed, 18355 insertions(+) create mode 100644 Tasks/AzureFileCopyV6/AzureFileCopy.ps1 create mode 100644 Tasks/AzureFileCopyV6/AzureFileCopyRemoteJob.ps1 create mode 100644 Tasks/AzureFileCopyV6/AzureUtilityARM.ps1 create mode 100644 Tasks/AzureFileCopyV6/AzureUtilityAz1.0.ps1 create mode 100644 Tasks/AzureFileCopyV6/AzureUtilityRest.ps1 create mode 100644 Tasks/AzureFileCopyV6/MimeMapping.json create mode 100644 Tasks/AzureFileCopyV6/PreJobExecutionAzureFileCopy.ts create mode 100644 Tasks/AzureFileCopyV6/README.md create mode 100644 Tasks/AzureFileCopyV6/Strings/resources.resjson/de-DE/resources.resjson create mode 100644 Tasks/AzureFileCopyV6/Strings/resources.resjson/en-US/resources.resjson create mode 100644 Tasks/AzureFileCopyV6/Strings/resources.resjson/es-ES/resources.resjson create mode 100644 Tasks/AzureFileCopyV6/Strings/resources.resjson/fr-FR/resources.resjson create mode 100644 Tasks/AzureFileCopyV6/Strings/resources.resjson/it-IT/resources.resjson create mode 100644 Tasks/AzureFileCopyV6/Strings/resources.resjson/ja-JP/resources.resjson create mode 100644 Tasks/AzureFileCopyV6/Strings/resources.resjson/ko-KR/resources.resjson create mode 100644 Tasks/AzureFileCopyV6/Strings/resources.resjson/ru-RU/resources.resjson create mode 100644 Tasks/AzureFileCopyV6/Strings/resources.resjson/zh-CN/resources.resjson create mode 100644 Tasks/AzureFileCopyV6/Strings/resources.resjson/zh-TW/resources.resjson create mode 100644 Tasks/AzureFileCopyV6/Tests/L0.ts create mode 100644 Tasks/AzureFileCopyV6/Tests/L0AddAzureVMCustomScriptExtension.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0CheckContainerNameAndArgs.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0CopyFilesParallelyToAzureVMs.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0CopyFilesSequentiallyToAzureVMs.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0CopyFilesToAzureVMsFromStorageContainer.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0DoesAzureVMMatchTagFilter.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0GetAzureUtility.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0GetAzureVMResourcesProperties.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0GetAzureVMsCredentials.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0GetFilteredAzureRMVmsInResourceGroup.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0GetFilteredAzureVmsInResourceGroup.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0GetFrontEndPorts.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0GetMachineBasedFilteredAzureVMs.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0GetMachineNameFromId.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0GetMachinesFqdnForLB.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0GetRMVMConnectionDetailsInRG.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0GetStorageAccountType.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0GetStorageKey.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0GetTagBasedFilteredAzureVMs.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0GetblobStorageEndpoint.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0IsWinRMCustomScriptExtensionExists.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0UtilityThrowError.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0ValidateAzurePSVersion.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/L0ValidateCustomScriptExecutionStatus.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/MockHelper.ps1 create mode 100644 Tasks/AzureFileCopyV6/Tests/MockVariable.ps1 create mode 100644 Tasks/AzureFileCopyV6/ThirdPartyNotices.txt create mode 100644 Tasks/AzureFileCopyV6/Utility.ps1 create mode 100644 Tasks/AzureFileCopyV6/_buildConfigs/Node20/package-lock.json create mode 100644 Tasks/AzureFileCopyV6/_buildConfigs/Node20/package.json create mode 100644 Tasks/AzureFileCopyV6/icon.png create mode 100644 Tasks/AzureFileCopyV6/icon.svg create mode 100644 Tasks/AzureFileCopyV6/make.json create mode 100644 Tasks/AzureFileCopyV6/package-lock.json create mode 100644 Tasks/AzureFileCopyV6/package.json create mode 100644 Tasks/AzureFileCopyV6/task.json create mode 100644 Tasks/AzureFileCopyV6/task.loc.json create mode 100644 Tasks/AzureFileCopyV6/tsconfig.json create mode 100644 _generated/AzureFileCopyV6.versionmap.txt create mode 100644 _generated/AzureFileCopyV6_Node20/.npmrc create mode 100644 _generated/AzureFileCopyV6_Node20/AzureFileCopy.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/AzureFileCopyRemoteJob.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/AzureUtilityARM.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/AzureUtilityAz1.0.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/AzureUtilityRest.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/MimeMapping.json create mode 100644 _generated/AzureFileCopyV6_Node20/PreJobExecutionAzureFileCopy.ts create mode 100644 _generated/AzureFileCopyV6_Node20/README.md create mode 100644 _generated/AzureFileCopyV6_Node20/Strings/resources.resjson/de-DE/resources.resjson create mode 100644 _generated/AzureFileCopyV6_Node20/Strings/resources.resjson/en-US/resources.resjson create mode 100644 _generated/AzureFileCopyV6_Node20/Strings/resources.resjson/es-ES/resources.resjson create mode 100644 _generated/AzureFileCopyV6_Node20/Strings/resources.resjson/fr-FR/resources.resjson create mode 100644 _generated/AzureFileCopyV6_Node20/Strings/resources.resjson/it-IT/resources.resjson create mode 100644 _generated/AzureFileCopyV6_Node20/Strings/resources.resjson/ja-JP/resources.resjson create mode 100644 _generated/AzureFileCopyV6_Node20/Strings/resources.resjson/ko-KR/resources.resjson create mode 100644 _generated/AzureFileCopyV6_Node20/Strings/resources.resjson/ru-RU/resources.resjson create mode 100644 _generated/AzureFileCopyV6_Node20/Strings/resources.resjson/zh-CN/resources.resjson create mode 100644 _generated/AzureFileCopyV6_Node20/Strings/resources.resjson/zh-TW/resources.resjson create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0.ts create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0AddAzureVMCustomScriptExtension.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0CheckContainerNameAndArgs.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0CopyFilesParallelyToAzureVMs.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0CopyFilesSequentiallyToAzureVMs.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0CopyFilesToAzureVMsFromStorageContainer.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0DoesAzureVMMatchTagFilter.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0GetAzureUtility.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0GetAzureVMResourcesProperties.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0GetAzureVMsCredentials.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0GetFilteredAzureRMVmsInResourceGroup.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0GetFilteredAzureVmsInResourceGroup.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0GetFrontEndPorts.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0GetMachineBasedFilteredAzureVMs.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0GetMachineNameFromId.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0GetMachinesFqdnForLB.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0GetRMVMConnectionDetailsInRG.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0GetStorageAccountType.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0GetStorageKey.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0GetTagBasedFilteredAzureVMs.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0GetblobStorageEndpoint.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0IsWinRMCustomScriptExtensionExists.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0UtilityThrowError.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0ValidateAzurePSVersion.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/L0ValidateCustomScriptExecutionStatus.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/MockHelper.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/Tests/MockVariable.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/ThirdPartyNotices.txt create mode 100644 _generated/AzureFileCopyV6_Node20/Utility.ps1 create mode 100644 _generated/AzureFileCopyV6_Node20/icon.png create mode 100644 _generated/AzureFileCopyV6_Node20/icon.svg create mode 100644 _generated/AzureFileCopyV6_Node20/make.json create mode 100644 _generated/AzureFileCopyV6_Node20/package-lock.json create mode 100644 _generated/AzureFileCopyV6_Node20/package.json create mode 100644 _generated/AzureFileCopyV6_Node20/task.json create mode 100644 _generated/AzureFileCopyV6_Node20/task.loc.json create mode 100644 _generated/AzureFileCopyV6_Node20/tsconfig.json diff --git a/.gdn/.gdnbaselines b/.gdn/.gdnbaselines index f00f855c7c5a..f072d9d26b0f 100644 --- a/.gdn/.gdnbaselines +++ b/.gdn/.gdnbaselines @@ -13,6 +13,72 @@ } }, "results": { + "407cc257f37ce2a1a83660de9e661902b2aad514f7ca760e16ed4ac555cff1c3": { + "signature": "407cc257f37ce2a1a83660de9e661902b2aad514f7ca760e16ed4ac555cff1c3", + "alternativeSignatures": [ + "fee414b5ea08713bc228b9edf15baee950baba8f8fa35f9c67be6e86795b77ee" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-03-20 15:10:36Z" + }, + "9115d8d02bc9d2b3aa7a0509f742da5087765a603bf954512923566fa4ffa946": { + "signature": "9115d8d02bc9d2b3aa7a0509f742da5087765a603bf954512923566fa4ffa946", + "alternativeSignatures": [ + "5330e2e2159d8073e5a7492e49d705b60c40b85436b9406e2ef4b8a19af77cca" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-03-20 15:10:36Z" + }, + "784fc91626d8ee62fd3f99d56999618147f2b68218768aeeb7ea064ded65e6db": { + "signature": "784fc91626d8ee62fd3f99d56999618147f2b68218768aeeb7ea064ded65e6db", + "alternativeSignatures": [ + "b67a25df17a2218170da5aa5eff32ed84727c6ba9f02f7a2308c7162a0821dfa" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-03-20 15:10:36Z" + }, + "158c4b23b4ff681530f30aa80653ae6261210f9777a2cfd0f3535ebc66dfb227": { + "signature": "158c4b23b4ff681530f30aa80653ae6261210f9777a2cfd0f3535ebc66dfb227", + "alternativeSignatures": [ + "c832f5a0cc0e2ce50496a2860c006279a37505b1a69c6a2ccb70295481910468" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-03-20 10:25:39Z", + "justification": "PSAvoidUsingConvertToSecureStringWithPlainText" + }, + "2c02eec8cf96bc63fb8ff72417da0e84215ba8dead870baedfdad351e7659372": { + "signature": "2c02eec8cf96bc63fb8ff72417da0e84215ba8dead870baedfdad351e7659372", + "alternativeSignatures": [ + "92f202b770c277f86d23afc5fc79c53b64a7f2fe00544f9f4e0019e36403fd40" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-03-20 10:25:39Z", + "justification": "PSAvoidUsingUsernameAndPasswordParams" + }, + "60a0aa841d38e44479e47d9d4349475efeb49a3e8f4cd8adfbe8ec832160713b": { + "signature": "60a0aa841d38e44479e47d9d4349475efeb49a3e8f4cd8adfbe8ec832160713b", + "alternativeSignatures": [ + "30cc30f55e8853b028db85e8d8056968a779e3376453b4a28abafd228153f6be" + ], + "memberOf": [ + "default" + ], + "createdDate": "2024-03-20 10:25:39Z", + "justification": "PSAvoidUsingConvertToSecureStringWithPlainText" + }, + + + "a2a4017726eb18c7612da6ab3828cfdfd1218160fbd5d373c715476df1847499": { "signature": "a2a4017726eb18c7612da6ab3828cfdfd1218160fbd5d373c715476df1847499", "alternativeSignatures": [ diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 921cf09d527e..297d16fdfd13 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -43,6 +43,10 @@ Tasks/AzureFileCopyV3/ @microsoft/release-management-task-team @manolerazvan Tasks/AzureFileCopyV4/ @microsoft/release-management-task-team @manolerazvan +Tasks/AzureFileCopyV5/ @microsoft/release-management-task-team @manolerazvan + +Tasks/AzureFileCopyV6/ @microsoft/release-management-task-team @manolerazvan + Tasks/AzureFunctionAppV1/ @finvamp1 @patelchandni @microsoft/release-management-task-team @manolerazvan Tasks/AzureFunctionAppV2/ @finvamp1 @patelchandni @microsoft/release-management-task-team @manolerazvan diff --git a/Tasks/AzureFileCopyV6/AzureFileCopy.ps1 b/Tasks/AzureFileCopyV6/AzureFileCopy.ps1 new file mode 100644 index 000000000000..49ac79808d9d --- /dev/null +++ b/Tasks/AzureFileCopyV6/AzureFileCopy.ps1 @@ -0,0 +1,257 @@ +[CmdletBinding()] +param() + +Trace-VstsEnteringInvocation $MyInvocation + +# Get inputs for the task +$sourcePath = Get-VstsInput -Name SourcePath -Require +$destination = Get-VstsInput -Name Destination -Require +$connectedServiceName = Get-VstsInput -Name ConnectedServiceNameARM -Require +$storageAccount = Get-VstsInput -Name StorageAccountRM +$containerName = Get-VstsInput -Name ContainerName +$blobPrefix = Get-VstsInput -Name BlobPrefix +$environmentName = Get-VstsInput -Name EnvironmentNameRM +$resourceFilteringMethod = Get-VstsInput -Name ResourceFilteringMethod +$machineNames = Get-VstsInput -Name MachineNames +$vmsAdminUserName = Get-VstsInput -Name VmsAdminUsername +$vmsAdminPassword = Get-VstsInput -Name VmsAdminPassword +$targetPath = Get-VstsInput -Name TargetPath +$additionalArgumentsForBlobCopy = Get-VstsInput -Name AdditionalArgumentsForBlobCopy +$additionalArgumentsForVMCopy = Get-VstsInput -Name AdditionalArgumentsForVMCopy +$cleanTargetBeforeCopy = Get-VstsInput -Name CleanTargetBeforeCopy -AsBool +$copyFilesInParallel = Get-VstsInput -Name CopyFilesInParallel -AsBool +$skipCACheck = Get-VstsInput -Name SkipCACheck -AsBool +$enableCopyPrerequisites = Get-VstsInput -Name EnableCopyPrerequisites -AsBool + +if ($destination -ne "AzureBlob") { + $blobPrefix = "" +} + +# Constants +$useHttpsProtocolOption = '' +$ErrorActionPreference = 'Stop' +$telemetrySet = $false +$isPremiumStorage = $false + +$sourcePath = $sourcePath.Trim('"') +$storageAccount = $storageAccount.Trim() +$containerName = $containerName.Trim().ToLower() + +$additionalArgumentsForBlobCopy = $additionalArgumentsForBlobCopy.Trim() +$additionalArgumentsForVMCopy = $additionalArgumentsForVMCopy.Trim() +$useDefaultArgumentsForBlobCopy = ($additionalArgumentsForBlobCopy -eq "") + +# azcopy location on automation agent +$azCopyExeLocation = 'AzCopy\AzCopy.exe' +$azCopyLocation = [System.IO.Path]::GetDirectoryName($azCopyExeLocation) + +# Import RemoteDeployer +Import-Module $PSScriptRoot\ps_modules\RemoteDeployer + +# Initialize Azure. +Import-Module $PSScriptRoot\ps_modules\VstsAzureHelpers_ + +$endpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + +# Update PSModulePath for hosted agent +. "$PSScriptRoot\Utility.ps1" + +CleanUp-PSModulePathForHostedAgent + +$vstsEndpoint = Get-VstsEndpoint -Name SystemVssConnection -Require +$vstsAccessToken = $vstsEndpoint.auth.parameters.AccessToken + +if (Get-Module Az.Accounts -ListAvailable) { + $encryptedToken = ConvertTo-SecureString $vstsAccessToken -AsPlainText -Force + Initialize-AzModule -Endpoint $endpoint -connectedServiceNameARM $connectedServiceName -encryptedToken $encryptedToken +} +else { + Write-Verbose "No module found with name: Az.Accounts" + throw ("Could not find the module Az.Accounts with given version. If the module was recently installed, retry after restarting the Azure Pipelines task agent.") +} + +# Import the loc strings. +Import-VstsLocStrings -LiteralPath $PSScriptRoot/Task.json + +# Load all dependent files for execution +. "$PSScriptRoot\AzureFileCopyRemoteJob.ps1" + +# Enabling detailed logging only when system.debug is true +$enableDetailedLogging = ($env:system_debug -eq "true") + +# Telemetry +Import-Module $PSScriptRoot\ps_modules\TelemetryHelper + +# Sanitizer +Import-Module $PSScriptRoot\ps_modules\Sanitizer +$useSanitizerCall = Get-SanitizerCallStatus +$useSanitizerActivate = Get-SanitizerActivateStatus + +if ($useSanitizerCall) { + $sanitizedArgumentsForBlobCopy = Protect-ScriptArguments -InputArgs $additionalArgumentsForBlobCopy -TaskName "AzureFileCopyV5" + $sanitizedArgumentsForVMCopy = Protect-ScriptArguments -InputArgs $additionalArgumentsForVMCopy -TaskName "AzureFileCopyV5" +} + +if ($useSanitizerActivate) { + $additionalArgumentsForBlobCopy = $sanitizedArgumentsForBlobCopy -join " " + $additionalArgumentsForVMCopy = $sanitizedArgumentsForVMCopy -join " " +} + +#### MAIN EXECUTION OF AZURE FILE COPY TASK BEGINS HERE #### +try { + try { + # Importing required version of azure cmdlets according to azureps installed on machine + $azureUtility = Get-AzureUtility + + Write-Verbose -Verbose "Loading $azureUtility" + . "$PSScriptRoot/$azureUtility" + + # Telemetry for endpoint id + $telemetryJsonContent = "{`"endpointId`":`"$connectedServiceName`"}" + Write-Host "##vso[telemetry.publish area=TaskEndpointId;feature=AzureFileCopy]$telemetryJsonContent" + + + # creating storage context to be used while creating container, deleting container + $storageContext = Create-AzureStorageContextWithConnectedAcc -StorageAccountName $storageAccount + + # Geting Azure Storage Account type + $storageAccountType = Get-StorageAccountType $storageAccount $endpoint $connectedServiceName $vstsAccessToken + Write-Verbose "Obtained Storage Account type: $storageAccountType" + if (-not [string]::IsNullOrEmpty($storageAccountType) -and $storageAccountType.Contains('Premium')) { + $isPremiumStorage = $true + } + + # creating temporary container for uploading files if no input is provided for container name + if ([string]::IsNullOrEmpty($containerName) -or ($destination -ne "AzureBlob")) { + $containerName = [guid]::NewGuid().ToString() + Write-Verbose "Container Name input not found. Creating Temporary container for uploading files." + Create-AzureContainer -containerName $containerName -storageContext $storageContext + } + else { + #checking if the containerName provided exist or not + $containerPresent = Get-AzureContainer -containerName $containerName -storageContext $storageContext + + #creating container if the containerName provided does not exist + if ($null -eq $containerPresent) { + Write-Verbose "Creating container if the containerName provided does not exist" + Create-AzureContainer -containerName $containerName -storageContext $storageContext + } + } + + + # Getting Azure Blob Storage Endpoint + $blobStorageEndpoint = Get-blobStorageEndpoint -storageAccountName $storageAccount -endpoint $endpoint -vstsAccessToken $vstsAccessToken + + # Setting environment variable for tracking Azure Pipelines usage in AzCopy telemetry + $env:AZCOPY_USER_AGENT_PREFIX = "TFS_useragent" + } + catch { + Write-Verbose $_.Exception.ToString() + Write-Telemetry "Task_InternalError" "TemporaryCopyingToBlobContainerFailed" + throw + } + + # Set optional arguments for azcopy blob upload + if ($useDefaultArgumentsForBlobCopy) { + # Adding default optional arguments: + # log-level: Defines the log verbosity for the log file. Default is INFO(all requests/responses) + + Write-Verbose "Using default AzCopy arguments for uploading to blob storage" + + $additionalArgumentsForBlobCopy = "--log-level=INFO" + + # Add more arguments if required + + # Premium storage accounts only support page blobs + if ($isPremiumStorage) { + Write-Verbose "Setting BlobType to page for Premium Storage account." + $additionalArgumentsForBlobCopy += " --blob-type=PageBlob" + } + + # $root container does not support sub folders. So excluding recursive copy option for $root container. + if ($containerName -ne '$root') { + Write-Verbose "Adding argument for recursive copy" + $additionalArgumentsForBlobCopy += " --recursive" + } + } + + Check-ContainerNameAndArgs -containerName $containerName -additionalArguments $additionalArgumentsForBlobCopy + + # Uploading files to container + Upload-FilesToAzureContainer -sourcePath $sourcePath ` + -endPoint $endpoint ` + -storageAccountName $storageAccount ` + -containerName $containerName ` + -blobPrefix $blobPrefix ` + -blobStorageEndpoint $blobStorageEndpoint ` + -azCopyLocation $azCopyLocation ` + -additionalArguments $additionalArgumentsForBlobCopy ` + -destinationType $destination ` + -useDefaultArguments $useDefaultArgumentsForBlobCopy ` + -cleanTargetBeforeCopy $cleanTargetBeforeCopy ` + -useSanitizerActivate $useSanitizerActivate + + # Complete the task if destination is azure blob + if ($destination -eq "AzureBlob") { + # Get URI for output variable + $storageAccountContainerURI = $storageContext.BlobEndPoint + $containerName + "/" + Write-Host "##vso[task.setvariable variable=StorageContainerUri]$storageAccountContainerURI" + + Remove-EndpointSecrets + Write-Verbose "Completed Azure File Copy Task for Azure Blob Destination" + + return + } + + # Copying files to Azure VMs + try { + # Normalize admin username + if ($vmsAdminUserName -and (-not $vmsAdminUserName.StartsWith(".\")) -and ($vmsAdminUserName.IndexOf("\") -eq -1) -and ($vmsAdminUserName.IndexOf("@") -eq -1)) { + $vmsAdminUserName = ".\" + $vmsAdminUserName + } + # getting azure vms properties(name, fqdn, winrmhttps port) + $azureVMResourcesProperties = Get-AzureVMResourcesProperties -resourceGroupName $environmentName ` + -resourceFilteringMethod $resourceFilteringMethod -machineNames $machineNames -enableCopyPrerequisites $enableCopyPrerequisites ` + -connectedServiceName $connectedServiceName -vstsAccessToken $vstsAccessToken + + $azureVMsCredentials = Get-AzureVMsCredentials -vmsAdminUserName $vmsAdminUserName -vmsAdminPassword $vmsAdminPassword + + # Get Invoke-RemoteScript parameters + $invokeRemoteScriptParams = Get-InvokeRemoteScriptParameters -azureVMResourcesProperties $azureVMResourcesProperties ` + -networkCredentials $azureVMsCredentials ` + -skipCACheck $skipCACheck + + # Copies files on azureVMs + Copy-FilesToAzureVMsFromStorageContainer -targetMachineNames $invokeRemoteScriptParams.targetMachineNames ` + -credential $invokeRemoteScriptParams.credential ` + -protocol $invokeRemoteScriptParams.protocol ` + -sessionOption $invokeRemoteScriptParams.sessionOption ` + -blobStorageEndpoint $blobStorageEndpoint ` + -containerName $containerName ` + -targetPath $targetPath ` + -cleanTargetBeforeCopy $cleanTargetBeforeCopy ` + -copyFilesInParallel $copyFilesInParallel ` + -additionalArguments $additionalArgumentsForVMCopy ` + -azCopyToolLocation $azCopyLocation ` + -fileCopyJobScript $AzureFileCopyRemoteJob ` + -enableDetailedLogging $enableDetailedLogging ` + -useSanitizerActivate $useSanitizerActivate + + Write-Output (Get-VstsLocString -Key "AFC_CopySuccessful" -ArgumentList $sourcePath, $environmentName) + } + catch { + Write-Verbose $_.Exception.ToString() + + Write-Telemetry "Task_InternalError" "CopyingToAzureVMFailed" + throw + } + finally { + Remove-AzureContainer -containerName $containerName -storageContext $storageContext + Remove-EndpointSecrets + Write-Verbose "Completed Azure File Copy Task for Azure VMs Destination" -Verbose + Trace-VstsLeavingInvocation $MyInvocation + } +} +finally { + Disconnect-AzureAndClearContext -authScheme $endpoint.Auth.Scheme -ErrorAction SilentlyContinue +} \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/AzureFileCopyRemoteJob.ps1 b/Tasks/AzureFileCopyV6/AzureFileCopyRemoteJob.ps1 new file mode 100644 index 000000000000..06a529b070f3 --- /dev/null +++ b/Tasks/AzureFileCopyV6/AzureFileCopyRemoteJob.ps1 @@ -0,0 +1,117 @@ +$AzureFileCopyRemoteJob = { + param( + [string]$containerURL, + [string]$targetPath, + [string]$containerSasToken, + [string]$additionalArguments, + [switch]$CleanTargetBeforeCopy, + [switch]$EnableDetailedLogging, + [switch]$useSanitizerActivate + ) + + function Write-DetailLogs + { + [CmdletBinding()] + param( + [string]$message + ) + + if($EnableDetailedLogging) + { + Write-Verbose $message + } + } + + try + { + $useDefaultArguments = ($additionalArguments -eq "") + + # Argument to check whether azcopy.exe needs to be downloaded on VM or it is already present on VM + $shouldDownload = $false + + if($CleanTargetBeforeCopy) + { + if (Test-Path $targetPath -PathType Container) + { + Get-ChildItem -Path $targetPath -Recurse -Force | Remove-Item -Force -Recurse + Write-DetailLogs "Destination location cleaned" + } + else + { + Write-DetailLogs "Folder at path $targetPath not found for cleanup." + } + } + + try + { + $azCopyVersionCommand = azcopy --version + $azCopyVersion = $azCopyVersionCommand.split(' ')[2] + if([version]$azCopyVersion -lt [version]"10.12.2") + { + $shouldDownload = $true + } + } + catch + { + $shouldDownload = $true + } + + if($shouldDownload) + { + try + { + $azCopyFolderName = "ADO_AzCopyV10" + $azCopyFolderPath = Join-Path -Path $env:systemdrive -ChildPath $azCopyFolderName + + New-Item -ItemType Directory -Force -Path $azCopyFolderPath + $azCopyZipPath = Join-Path -Path $azCopyFolderPath -ChildPath "AzCopy.zip" + + # Downloading AzCopy from URL and copying it in $azcopyZipPath + $webclient = New-Object System.Net.WebClient + $webclient.DownloadFile('https://vstsagenttools.blob.core.windows.net/tools/azcopy/10.12/AzCopy.zip',$azCopyZipPath) + + #Unzipping the azcopy zip to $azcopyFolderPath + Expand-Archive $azCopyZipPath -DestinationPath $azCopyFolderPath -Force + + $azCopyFolderEnvPath = Join-Path -Path $azCopyFolderPath -ChildPath "AzCopy" + + #setting path at machine level so that when user again do copy on VM, there is no need to download the azcopy.exe again + [Environment]::SetEnvironmentVariable("Path", $azCopyFolderEnvPath + ';' + $env:Path, [System.EnvironmentVariableTarget]::Machine) + + #setting $env:Path at user level to include azcopy.exe path as the above command used do set the path at machine level and not at user level + $env:Path = $azCopyFolderEnvPath + ';' + $env:Path + } + catch + { + $exceptionMessage = $_.Exception.Message.ToString() + throw "Failed while downloading azcopy.exe from the URL with exception $exceptionMessage. Please download azcopy.exe 10.12.2 and set this extracted path in env:Path" + } + } + + if($useDefaultArguments) + { + # Adding default optional arguments: + # log-level: Defines the log verbosity for the log file. Default is INFO(all requests/responses) + # recursive: Recursive copy + + Write-DetailLogs "Using default AzCopy arguments for dowloading to VM" + $additionalArguments = "--recursive --log-level=INFO" + } + + if ($useSanitizerActivate) { + # Splitting arguments on space, but not on space inside quotes + $sanitizedArguments = [regex]::Split($additionalArguments, ' (?=(?:[^"]|"[^"]*")*$)') + Write-DetailLogs "##[command] & azcopy copy `"$containerURL*****`" `"$targetPath`" $sanitizedArguments" + & azcopy copy "$containerURL/*$containerSasToken" "$targetPath" $sanitizedArguments + } else { + Write-DetailLogs "##[command] & azcopy copy `"$containerURL*****`" `"$targetPath`" $additionalArguments" + $azCopyCommand = "& azcopy copy `"$containerURL/*$containerSasToken`" `"$targetPath`" $additionalArguments" + Invoke-Expression $azCopyCommand + } + } + catch + { + Write-Verbose "AzureFileCopyRemoteJob threw exception" + throw + } +} \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/AzureUtilityARM.ps1 b/Tasks/AzureFileCopyV6/AzureUtilityARM.ps1 new file mode 100644 index 000000000000..6a0be6c25766 --- /dev/null +++ b/Tasks/AzureFileCopyV6/AzureUtilityARM.ps1 @@ -0,0 +1,525 @@ +# This file implements IAzureUtility for AzureRM PowerShell + +. "$PSScriptRoot/AzureUtilityRest.ps1" + +$featureFlags = @{ + retireAzureRM = [System.Convert]::ToBoolean($env:RETIRE_AZURERM_POWERSHELL_MODULE) +} + +function Get-AzureStorageAccountResourceGroupName +{ + param([string]$storageAccountName) + + $ARMStorageAccountResourceType = "Microsoft.Storage/storageAccounts" + if (-not [string]::IsNullOrEmpty($storageAccountName)) + { + Write-Verbose "[Azure Call]Getting resource details for azure storage account resource: $storageAccountName with resource type: $ARMStorageAccountResourceType" + if ($featureFlags.retireAzureRM) + { + $azureStorageAccountResourceDetails = Get-AzStorageAccount -ErrorAction Stop | Where-Object { $_.StorageAccountName -eq $storageAccountName } + } + else + { + $azureStorageAccountResourceDetails = Get-AzureRmStorageAccount -ErrorAction Stop | Where-Object { $_.StorageAccountName -eq $storageAccountName } + } + Write-Verbose "[Azure Call]Retrieved resource details successfully for azure storage account resource: $storageAccountName with resource type: $ARMStorageAccountResourceType" + + $azureResourceGroupName = $azureStorageAccountResourceDetails.ResourceGroupName + if ([string]::IsNullOrEmpty($azureResourceGroupName)) + { + Write-Verbose "(ARM)Storage account: $storageAccountName not found" + Write-Telemetry "Task_InternalError" "RMStorageAccountNotFound" + Throw (Get-VstsLocString -Key "AFC_StorageAccountNotFound" -ArgumentList $storageAccountName) + } + + return $azureResourceGroupName + } +} + +function Create-AzureStorageContext +{ + param([string]$storageAccountName, + [string]$storageAccountKey) + + if(-not [string]::IsNullOrEmpty($storageAccountName) -and -not [string]::IsNullOrEmpty($storageAccountKey)) + { + Write-Verbose "[Azure Call]Creating AzureStorageContext for storage account: $storageAccountName" + if ($featureFlags.retireAzureRM) + { + $storageContext = New-AzStorageContext -StorageAccountName $storageAccountName -StorageAccountKey $storageAccountKey -ErrorAction Stop + } + else + { + $storageContext = New-AzureStorageContext -StorageAccountName $storageAccountName -StorageAccountKey $storageAccountKey -ErrorAction Stop + } + Write-Verbose "[Azure Call]Created AzureStorageContext for storage account: $storageAccountName" + + return $storageContext + } +} + +# Create a context object using Azure AD credentials +function Create-AzureStorageContextWithConnectedAcc +{ + param([string]$storageAccountName) + + if(-not [string]::IsNullOrEmpty($storageAccountName)) + { + Write-Verbose "[Azure Call]Creating AzStorageContext for storage account: $storageAccountName" + $storageContext = New-AzStorageContext -StorageAccountName $storageAccountName -UseConnectedAccount -ErrorAction Stop + Write-Verbose "[Azure Call]Created AzStorageContext for storage account: $storageAccountName" + + return $storageContext + } +} + +function Create-AzureContainer +{ + param([string]$containerName, + [object]$storageContext) + + if(-not [string]::IsNullOrEmpty($containerName) -and $storageContext) + { + $storageAccountName = $storageContext.StorageAccountName + + Write-Verbose "[Azure Call]Creating container: $containerName in storage account: $storageAccountName" + if ($featureFlags.retireAzureRM) + { + $container = New-AzStorageContainer -Name $containerName -Context $storageContext -Permission Off -ErrorAction Stop + } + else + { + $container = New-AzureStorageContainer -Name $containerName -Context $storageContext -Permission Off -ErrorAction Stop + } + Write-Verbose "[Azure Call]Created container: $containerName successfully in storage account: $storageAccountName" + } +} + +function Get-AzureContainer +{ + param([string]$containerName, + [object]$storageContext) + + $container = $null + + if(-not [string]::IsNullOrEmpty($containerName) -and $storageContext) + { + $storageAccountName = $storageContext.StorageAccountName + + Write-Verbose "[Azure Call]Getting container: $containerName in storage account: $storageAccountName" + try + { + if ($featureFlags.retireAzureRM) + { + $container = Get-AzStorageContainer -Name $containerName -Context $storageContext -ErrorAction Stop + } + else + { + $container = Get-AzureStorageContainer -Name $containerName -Context $storageContext -ErrorAction Stop + } + } + catch + { + Write-Verbose "Container: $containerName does not exist in storage account: $storageAccountName" + } + } + + return $container +} + +function Remove-AzureContainer +{ + param([string]$containerName, + [object]$storageContext) + + if(-not [string]::IsNullOrEmpty($containerName) -and $storageContext) + { + $storageAccountName = $storageContext.StorageAccountName + + Write-Verbose "[Azure Call]Deleting container: $containerName in storage account: $storageAccountName" + if ($featureFlags.retireAzureRM) + { + Remove-AzStorageContainer -Name $containerName -Context $storageContext -Force -ErrorAction SilentlyContinue + } + else + { + Remove-AzureStorageContainer -Name $containerName -Context $storageContext -Force -ErrorAction SilentlyContinue + } + + Write-Verbose "[Azure Call]Deleted container: $containerName in storage account: $storageAccountName" + } +} + +function Get-AzureRMVMsInResourceGroup +{ + param([string]$resourceGroupName) + + If(-not [string]::IsNullOrEmpty($resourceGroupName)) + { + try + { + Write-Verbose "[Azure Call]Getting resource group:$resourceGroupName RM virtual machines type resources" + if ($featureFlags.retireAzureRM) + { + $azureRMVMResources = Get-AzVM -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + else + { + $azureRMVMResources = Get-AzureRMVM -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + Write-Verbose "[Azure Call]Count of resource group:$resourceGroupName RM virtual machines type resource is $($azureRMVMResources.Count)" + + return $azureRMVMResources + } + catch [Hyak.Common.CloudException], [Microsoft.Rest.Azure.CloudException] + { + $exceptionMessage = $_.Exception.Message.ToString() + Write-Verbose "ExceptionMessage: $exceptionMessage" + + Write-Telemetry "Task_InternalError" "ResourceGroupNotFound" + throw (Get-VstsLocString -Key "AFC_ResourceGroupNotFound" -ArgumentList $resourceGroupName) + } + } +} + +function Get-AzureRMResourceGroupResourcesDetails +{ + param([string]$resourceGroupName, + [object]$azureRMVMResources) + + [hashtable]$azureRGResourcesDetails = @{} + [hashtable]$loadBalancerDetails = @{} + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and $azureRMVMResources) + { + Write-Verbose "[Azure Call]Getting network interfaces in resource group $resourceGroupName" + if ($featureFlags.retireAzureRM) + { + $networkInterfaceResources = Get-AzNetworkInterface -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + else + { + $networkInterfaceResources = Get-AzureRMNetworkInterface -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + Write-Verbose "[Azure Call]Got network interfaces in resource group $resourceGroupName" + $azureRGResourcesDetails.Add("networkInterfaceResources", $networkInterfaceResources) + + Write-Verbose "[Azure Call]Getting public IP Addresses in resource group $resourceGroupName" + if ($featureFlags.retireAzureRM) + { + $publicIPAddressResources = Get-AzPublicIpAddress -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + else + { + $publicIPAddressResources = Get-AzureRMPublicIpAddress -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + Write-Verbose "[Azure Call]Got public IP Addresses in resource group $resourceGroupName" + $azureRGResourcesDetails.Add("publicIPAddressResources", $publicIPAddressResources) + + Write-Verbose "[Azure Call]Getting load balancers in resource group $resourceGroupName" + if ($featureFlags.retireAzureRM) + { + $lbGroup = Get-AzLoadBalancer -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + else + { + $lbGroup = Get-AzureRMLoadBalancer -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + Write-Verbose "[Azure Call]Got load balancers in resource group $resourceGroupName" + + if($lbGroup) + { + foreach($lb in $lbGroup) + { + $lbDetails = @{} + Write-Verbose "[Azure Call]Getting load balancer in resource group $resourceGroupName" + if ($featureFlags.retireAzureRM) + { + $loadBalancer = Get-AzLoadBalancer -Name $lb.Name -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + else + { + $loadBalancer = Get-AzureRMLoadBalancer -Name $lb.Name -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + Write-Verbose "[Azure Call]Got load balancer in resource group $resourceGroupName" + + Write-Verbose "[Azure Call]Getting LoadBalancer Frontend Ip Config" + if ($featureFlags.retireAzureRM) + { + $frontEndIPConfigs = Get-AzLoadBalancerFrontendIpConfig -LoadBalancer $loadBalancer -ErrorAction Stop -Verbose + } + else + { + $frontEndIPConfigs = Get-AzureRMLoadBalancerFrontendIpConfig -LoadBalancer $loadBalancer -ErrorAction Stop -Verbose + } + Write-Verbose "[Azure Call]Got LoadBalancer Frontend Ip Config" + + Write-Verbose "[Azure Call]Getting Azure LoadBalancer Inbound NatRule Config" + if ($featureFlags.retireAzureRM) + { + $inboundRules = Get-AzLoadBalancerInboundNatRuleConfig -LoadBalancer $loadBalancer -ErrorAction Stop -Verbose + } + else + { + $inboundRules = Get-AzureRMLoadBalancerInboundNatRuleConfig -LoadBalancer $loadBalancer -ErrorAction Stop -Verbose + } + Write-Verbose "[Azure Call]Got Azure LoadBalancer Inbound NatRule Config" + + $lbDetails.Add("frontEndIPConfigs", $frontEndIPConfigs) + $lbDetails.Add("inboundRules", $inboundRules) + $loadBalancerDetails.Add($lb.Name, $lbDetails) + } + + $azureRGResourcesDetails.Add("loadBalancerResources", $loadBalancerDetails) + } + } + + return $azureRGResourcesDetails +} + +function Generate-AzureStorageContainerSASToken +{ + param([string]$containerName, + [object]$storageContext, + [System.Int32]$tokenTimeOutInMinutes) + + if(-not [string]::IsNullOrEmpty($containerName) -and $storageContext) + { + $storageAccountName = $storageContext.StorageAccountName + + Write-Verbose "[Azure Call]Generating SasToken for container: $containerName in storage: $storageAccountName with expiry time: $tokenTimeOutInMinutes minutes" + if ($featureFlags.retireAzureRM) + { + $containerSasToken = New-AzStorageContainerSASToken -Name $containerName -ExpiryTime (Get-Date).AddMinutes($tokenTimeOutInMinutes) -Context $storageContext -Permission rwdl + } + else + { + $containerSasToken = New-AzureStorageContainerSASToken -Name $containerName -ExpiryTime (Get-Date).AddMinutes($tokenTimeOutInMinutes) -Context $storageContext -Permission rwdl + } + $containerSasToken = New-AzStorageContainerSASToken -Name $containerName -ExpiryTime (Get-Date).AddMinutes($tokenTimeOutInMinutes) -Context $storageContext -Permission rwdl + Write-Verbose "[Azure Call]Generated SasToken: $containerSasToken successfully for container: $containerName in storage: $storageAccountName" + + return $containerSasToken + } +} + +function Get-AzureMachineStatus +{ + param([string]$resourceGroupName, + [string]$name) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($name)) + { + Write-Host (Get-VstsLocString -Key "AFC_GetVMStatus" -ArgumentList $name) + if ($featureFlags.retireAzureRM) + { + $status = Get-AzVM -ResourceGroupName $resourceGroupName -Name $name -Status -ErrorAction Stop -Verbose + } + else + { + $status = Get-AzureRmVM -ResourceGroupName $resourceGroupName -Name $name -Status -ErrorAction Stop -Verbose + } + Write-Host (Get-VstsLocString -Key "AFC_GetVMStatusComplete" -ArgumentList $name) + } + + return $status +} + +function Set-AzureMachineCustomScriptExtension +{ + param([string]$resourceGroupName, + [string]$vmName, + [string]$name, + [string[]]$fileUri, + [string]$run, + [string]$argument, + [string]$location) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmName) -and -not [string]::IsNullOrEmpty($name)) + { + Write-Host (Get-VstsLocString -Key "AFC_SetCustomScriptExtension" -ArgumentList $name, $vmName) + Write-Verbose "Set-AzureRmVMCustomScriptExtension -ResourceGroupName $resourceGroupName -VMName $vmName -Name $name -FileUri $fileUri -Run $run -Argument $argument -Location $location -ErrorAction Stop -Verbose" + if ($featureFlags.retireAzureRM) + { + $result = Set-AzVMCustomScriptExtension -ResourceGroupName $resourceGroupName -VMName $vmName -Name $name -FileUri $fileUri -Run $run -Argument $argument -Location $location -ErrorAction Stop -Verbose + } + else + { + $result = Set-AzureRmVMCustomScriptExtension -ResourceGroupName $resourceGroupName -VMName $vmName -Name $name -FileUri $fileUri -Run $run -Argument $argument -Location $location -ErrorAction Stop -Verbose + } + Write-Host (Get-VstsLocString -Key "AFC_SetCustomScriptExtensionComplete" -ArgumentList $name, $vmName) + if($result.IsSuccessStatusCode -eq $true) + { + $responseJObject = [Newtonsoft.Json.Linq.JObject]::Parse(($result | ConvertTo-Json)) + $result = $responseJObject.ToObject([System.Collections.Hashtable]) + $result.Status = "Succeeded" + } + } + + return $result +} + +function Get-NetworkSecurityGroups +{ + param([string]$resourceGroupName, + [string]$vmId) + + $securityGroups = New-Object System.Collections.Generic.List[System.Object] + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmId)) + { + Write-Verbose "[Azure Call]Getting network interfaces in resource group $resourceGroupName for vm $vmId" + if ($featureFlags.retireAzureRM) + { + $networkInterfaces = Get-AzNetworkInterface -ResourceGroupName $resourceGroupName | Where-Object { $_.VirtualMachine.Id -eq $vmId } + } + else + { + $networkInterfaces = Get-AzureRmNetworkInterface -ResourceGroupName $resourceGroupName | Where-Object { $_.VirtualMachine.Id -eq $vmId } + } + Write-Verbose "[Azure Call]Got network interfaces in resource group $resourceGroupName" + + if($networkInterfaces) + { + $noOfNics = $networkInterfaces.Count + Write-Verbose "Number of network interface cards present in the vm: $noOfNics" + + foreach($networkInterface in $networkInterfaces) + { + $networkSecurityGroupEntry = $networkInterface.NetworkSecurityGroup + if($networkSecurityGroupEntry) + { + $nsId = $networkSecurityGroupEntry.Id + Write-Verbose "Network Security Group Id: $nsId" + + $securityGroupName = $nsId.Split('/')[-1] + $sgResourceGroup = $nsId.Split('/')[4] + Write-Verbose "Security Group name is $securityGroupName and the related resource group $sgResourceGroup" + + # Get the network security group object + Write-Verbose "[Azure Call]Getting network security group $securityGroupName in resource group $sgResourceGroup" + if ($featureFlags.retireAzureRM) + { + $securityGroup = Get-AzNetworkSecurityGroup -ResourceGroupName $sgResourceGroup -Name $securityGroupName + } + else + { + $securityGroup = Get-AzureRmNetworkSecurityGroup -ResourceGroupName $sgResourceGroup -Name $securityGroupName + } + Write-Verbose "[Azure Call]Got network security group $securityGroupName in resource group $sgResourceGroup" + + $securityGroups.Add($securityGroup) + } + } + } + else + { + throw (Get-VstsLocString -Key "AFC_NoNetworkInterface" -ArgumentList $vmid , $resourceGroupName) + } + } + else + { + throw (Get-VstsLocString -Key "AFC_NullOrEmptyResourceGroup") + } + + return $securityGroups +} + +function Add-NetworkSecurityRuleConfig +{ + param([string]$resourceGroupName, + [object]$securityGroups, + [string]$ruleName, + [string]$rulePriotity, + [string]$winrmHttpsPort) + + if($securityGroups.Count -gt 0) + { + foreach($securityGroup in $securityGroups) + { + $securityGroupName = $securityGroup.Name + try + { + $winRMConfigRule = $null + + Write-Verbose "[Azure Call]Getting network security rule config $ruleName under security group $securityGroupName" + if ($featureFlags.retireAzureRM) + { + $winRMConfigRule = Get-AzNetworkSecurityRuleConfig -NetworkSecurityGroup $securityGroup -Name $ruleName -EA SilentlyContinue + } + else + { + $winRMConfigRule = Get-AzureRmNetworkSecurityRuleConfig -NetworkSecurityGroup $securityGroup -Name $ruleName -EA SilentlyContinue + } + Write-Verbose "[Azure Call]Got network security rule config $ruleName under security group $securityGroupName" + } + catch + { + #Ignore the exception + } + + # Add the network security rule if it doesn't exists + if(-not $winRMConfigRule) + { + $maxRetries = 3 + for($retryCnt=1; $retryCnt -le $maxRetries; $retryCnt++) + { + try + { + Write-Verbose "[Azure Call]Adding inbound network security rule config $ruleName with priority $rulePriotity for port $winrmHttpsPort under security group $securityGroupName" + if ($featureFlags.retireAzureRM) + { + $securityGroup = Add-AzNetworkSecurityRuleConfig -NetworkSecurityGroup $securityGroup -Name $ruleName -Direction Inbound -Access Allow -SourceAddressPrefix '*' -SourcePortRange '*' -DestinationAddressPrefix '*' -DestinationPortRange $winrmHttpsPort -Protocol * -Priority $rulePriotity + } + else + { + $securityGroup = Add-AzureRmNetworkSecurityRuleConfig -NetworkSecurityGroup $securityGroup -Name $ruleName -Direction Inbound -Access Allow -SourceAddressPrefix '*' -SourcePortRange '*' -DestinationAddressPrefix '*' -DestinationPortRange $winrmHttpsPort -Protocol * -Priority $rulePriotity + } + Write-Verbose "[Azure Call]Added inbound network security rule config $ruleName with priority $rulePriotity for port $winrmHttpsPort under security group $securityGroupName" + + Write-Verbose "[Azure Call]Setting the azure network security group" + if ($featureFlags.retireAzureRM) + { + $result = Set-AzNetworkSecurityGroup -NetworkSecurityGroup $securityGroup + } + else + { + $result = Set-AzureRmNetworkSecurityGroup -NetworkSecurityGroup $securityGroup + } + Write-Verbose "[Azure Call]Set the azure network security group" + } + catch + { + Write-Verbose "Failed to add inbound network security rule config $ruleName with priority $rulePriotity for port $winrmHttpsPort under security group $securityGroupName : $_.Exception.Message" + + $newPort = [convert]::ToInt32($rulePriotity, 10) + 50; + $rulePriotity = $newPort.ToString() + + Write-Verbose "[Azure Call]Getting network security group $securityGroupName in resource group $resourceGroupName" + if ($featureFlags.retireAzureRM) + { + $securityGroup = Get-AzNetworkSecurityGroup -ResourceGroupName $resourceGroupName -Name $securityGroupName + } + else + { + $securityGroup = Get-AzureRmNetworkSecurityGroup -ResourceGroupName $resourceGroupName -Name $securityGroupName + } + Write-Verbose "[Azure Call]Got network security group $securityGroupName in resource group $resourceGroupName" + + + if($retryCnt -eq $maxRetries) + { + throw $_ + } + + continue + } + + Write-Verbose "Successfully added the network security group rule $ruleName with priority $rulePriotity for port $winrmHttpsPort" + break + } + } + } + } +} + diff --git a/Tasks/AzureFileCopyV6/AzureUtilityAz1.0.ps1 b/Tasks/AzureFileCopyV6/AzureUtilityAz1.0.ps1 new file mode 100644 index 000000000000..1200c55d451a --- /dev/null +++ b/Tasks/AzureFileCopyV6/AzureUtilityAz1.0.ps1 @@ -0,0 +1,395 @@ +# This file implements IAzureUtility for Az PowerShell + +. "$PSScriptRoot/AzureUtilityRest.ps1" + +function Get-AzureStorageAccountResourceGroupName +{ + param([string]$storageAccountName) + + $ARMStorageAccountResourceType = "Microsoft.Storage/storageAccounts" + if (-not [string]::IsNullOrEmpty($storageAccountName)) + { + Write-Verbose "[Azure Call]Getting resource details for azure storage account resource: $storageAccountName with resource type: $ARMStorageAccountResourceType" + $azureStorageAccountResourceDetails = (Get-AzResource -ErrorAction Stop) | Where-Object { ($_.ResourceType -eq $ARMStorageAccountResourceType) -and ($_.Name -eq $storageAccountName)} + + Write-Verbose "[Azure Call]Retrieved resource details successfully for azure storage account resource: $storageAccountName with resource type: $ARMStorageAccountResourceType" + + $azureResourceGroupName = $azureStorageAccountResourceDetails.ResourceGroupName + if ([string]::IsNullOrEmpty($azureResourceGroupName)) + { + Write-Verbose "(ARM)Storage account: $storageAccountName not found" + Write-Telemetry "Task_InternalError" "RMStorageAccountNotFound" + Throw (Get-VstsLocString -Key "AFC_StorageAccountNotFound" -ArgumentList $storageAccountName) + } + + return $azureResourceGroupName + } +} + +function Create-AzureStorageContext +{ + param([string]$storageAccountName, + [string]$storageAccountKey) + + if(-not [string]::IsNullOrEmpty($storageAccountName) -and -not [string]::IsNullOrEmpty($storageAccountKey)) + { + Write-Verbose "[Azure Call]Creating AzStorageContext for storage account: $storageAccountName" + $storageContext = New-AzStorageContext -StorageAccountName $storageAccountName -StorageAccountKey $storageAccountKey -ErrorAction Stop + Write-Verbose "[Azure Call]Created AzStorageContext for storage account: $storageAccountName" + + return $storageContext + } +} + +# Create a context object using Azure AD credentials +function Create-AzureStorageContextWithConnectedAcc +{ + param([string]$storageAccountName) + + if(-not [string]::IsNullOrEmpty($storageAccountName)) + { + Write-Verbose "[Azure Call]Creating AzStorageContext for storage account: $storageAccountName" + $storageContext = New-AzStorageContext -StorageAccountName $storageAccountName -UseConnectedAccount -ErrorAction Stop + Write-Verbose "[Azure Call]Created AzStorageContext for storage account: $storageAccountName" + + return $storageContext + } +} + +function Create-AzureContainer +{ + param([string]$containerName, + [object]$storageContext) + + if(-not [string]::IsNullOrEmpty($containerName) -and $storageContext) + { + $storageAccountName = $storageContext.StorageAccountName + + Write-Verbose "[Azure Call]Creating container: $containerName in storage account: $storageAccountName" + $container = New-AzStorageContainer -Name $containerName -Context $storageContext -Permission Off -ErrorAction Stop + Write-Verbose "[Azure Call]Created container: $containerName successfully in storage account: $storageAccountName" + } +} + +function Get-AzureContainer +{ + param([string]$containerName, + [object]$storageContext) + + $container = $null + + if(-not [string]::IsNullOrEmpty($containerName) -and $storageContext) + { + $storageAccountName = $storageContext.StorageAccountName + + Write-Verbose "[Azure Call]Getting container: $containerName in storage account: $storageAccountName" + try + { + $container = Get-AzStorageContainer -Name $containerName -Context $storageContext -ErrorAction Stop + } + catch + { + Write-Verbose "Container: $containerName does not exist in storage account: $storageAccountName" + } + } + + return $container +} + +function Remove-AzureContainer +{ + param([string]$containerName, + [object]$storageContext) + + if(-not [string]::IsNullOrEmpty($containerName) -and $storageContext) + { + $storageAccountName = $storageContext.StorageAccountName + + Write-Verbose "[Azure Call]Deleting container: $containerName in storage account: $storageAccountName" + Remove-AzStorageContainer -Name $containerName -Context $storageContext -Force -ErrorAction SilentlyContinue + Write-Verbose "[Azure Call]Deleted container: $containerName in storage account: $storageAccountName" + } +} + +function Get-AzureRMVMsInResourceGroup +{ + param([string]$resourceGroupName) + + If(-not [string]::IsNullOrEmpty($resourceGroupName)) + { + try + { + Write-Verbose "[Azure Call]Getting resource group:$resourceGroupName RM virtual machines type resources" + $azureRMVMResources = Get-AzVM -ResourceGroupName $resourceGroupName -ErrorAction Stop -WarningAction SilentlyContinue -Verbose + Write-Verbose "[Azure Call]Count of resource group:$resourceGroupName RM virtual machines type resource is $($azureRMVMResources.Count)" + + return $azureRMVMResources + } + catch [Hyak.Common.CloudException], [Microsoft.Rest.Azure.CloudException] + { + $exceptionMessage = $_.Exception.Message.ToString() + Write-Verbose "ExceptionMessage: $exceptionMessage" + + Write-Telemetry "Task_InternalError" "ResourceGroupNotFound" + throw (Get-VstsLocString -Key "AFC_ResourceGroupNotFound" -ArgumentList $resourceGroupName) + } + } +} + +function Get-AzureRMResourceGroupResourcesDetails +{ + param([string]$resourceGroupName, + [object]$azureRMVMResources) + + [hashtable]$azureRGResourcesDetails = @{} + [hashtable]$loadBalancerDetails = @{} + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and $azureRMVMResources) + { + Write-Verbose "[Azure Call]Getting network interfaces in resource group $resourceGroupName" + $networkInterfaceResources = Get-AzNetworkInterface -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + Write-Verbose "[Azure Call]Got network interfaces in resource group $resourceGroupName" + $azureRGResourcesDetails.Add("networkInterfaceResources", $networkInterfaceResources) + + Write-Verbose "[Azure Call]Getting public IP Addresses in resource group $resourceGroupName" + $publicIPAddressResources = Get-AzPublicIpAddress -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + Write-Verbose "[Azure Call]Got public IP Addresses in resource group $resourceGroupName" + $azureRGResourcesDetails.Add("publicIPAddressResources", $publicIPAddressResources) + + Write-Verbose "[Azure Call]Getting load balancers in resource group $resourceGroupName" + $lbGroup = Get-AzLoadBalancer -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + Write-Verbose "[Azure Call]Got load balancers in resource group $resourceGroupName" + + if($lbGroup) + { + foreach($lb in $lbGroup) + { + $lbDetails = @{} + Write-Verbose "[Azure Call]Getting load balancer in resource group $resourceGroupName" + $loadBalancer = Get-AzLoadBalancer -Name $lb.Name -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + Write-Verbose "[Azure Call]Got load balancer in resource group $resourceGroupName" + + Write-Verbose "[Azure Call]Getting LoadBalancer Frontend Ip Config" + $frontEndIPConfigs = Get-AzLoadBalancerFrontendIpConfig -LoadBalancer $loadBalancer -ErrorAction Stop -Verbose + Write-Verbose "[Azure Call]Got LoadBalancer Frontend Ip Config" + + Write-Verbose "[Azure Call]Getting Azure LoadBalancer Inbound NatRule Config" + $inboundRules = Get-AzLoadBalancerInboundNatRuleConfig -LoadBalancer $loadBalancer -ErrorAction Stop -Verbose + Write-Verbose "[Azure Call]Got Azure LoadBalancer Inbound NatRule Config" + + $lbDetails.Add("frontEndIPConfigs", $frontEndIPConfigs) + $lbDetails.Add("inboundRules", $inboundRules) + $loadBalancerDetails.Add($lb.Name, $lbDetails) + } + + $azureRGResourcesDetails.Add("loadBalancerResources", $loadBalancerDetails) + } + } + + return $azureRGResourcesDetails +} + +function Generate-AzureStorageContainerSASToken +{ + param([string]$containerName, + [object]$storageContext, + [System.Int32]$tokenTimeOutInMinutes) + + if(-not [string]::IsNullOrEmpty($containerName) -and $storageContext) + { + $storageAccountName = $storageContext.StorageAccountName + + Write-Verbose "[Azure Call]Generating SasToken for container: $containerName in storage: $storageAccountName with expiry time: $tokenTimeOutInMinutes minutes" + $containerSasToken = New-AzStorageContainerSASToken -Name $containerName -ExpiryTime (Get-Date).AddMinutes($tokenTimeOutInMinutes) -Context $storageContext -Permission rwdl + Write-Verbose "[Azure Call]Generated SasToken: $containerSasToken successfully for container: $containerName in storage: $storageAccountName" + + return $containerSasToken + } +} + +function Get-AzureMachineStatus +{ + param([string]$resourceGroupName, + [string]$name) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($name)) + { + Write-Host (Get-VstsLocString -Key "AFC_GetVMStatus" -ArgumentList $name) + $status = Get-AzVM -ResourceGroupName $resourceGroupName -Name $name -Status -ErrorAction Stop -WarningAction SilentlyContinue -Verbose + Write-Host (Get-VstsLocString -Key "AFC_GetVMStatusComplete" -ArgumentList $name) + } + + return $status +} + +function Set-AzureMachineCustomScriptExtension +{ + param([string]$resourceGroupName, + [string]$vmName, + [string]$name, + [string[]]$fileUri, + [string]$run, + [string]$argument, + [string]$location) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmName) -and -not [string]::IsNullOrEmpty($name)) + { + Write-Host (Get-VstsLocString -Key "AFC_SetCustomScriptExtension" -ArgumentList $name, $vmName) + Write-Verbose "Set-AzVMCustomScriptExtension -ResourceGroupName $resourceGroupName -VMName $vmName -Name $name -FileUri $fileUri -Run $run -Argument $argument -Location $location -ErrorAction Stop -Verbose" + $result = Set-AzVMCustomScriptExtension -ResourceGroupName $resourceGroupName -VMName $vmName -Name $name -FileUri $fileUri -Run $run -Argument $argument -Location $location -ErrorAction Stop -Verbose + Write-Host (Get-VstsLocString -Key "AFC_SetCustomScriptExtensionComplete" -ArgumentList $name, $vmName) + if($result.IsSuccessStatusCode -eq $true) + { + $responseJObject = [Newtonsoft.Json.Linq.JObject]::Parse(($result | ConvertTo-Json)) + $result = $responseJObject.ToObject([System.Collections.Hashtable]) + $result.Status = "Succeeded" + } + } + + return $result +} + +function Get-NetworkSecurityGroups +{ + param([string]$resourceGroupName, + [string]$vmId) + + $securityGroups = New-Object System.Collections.Generic.List[System.Object] + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmId)) + { + Write-Verbose "[Azure Call]Getting network interfaces in resource group $resourceGroupName for vm $vmId" + $networkInterfaces = Get-AzNetworkInterface -ResourceGroupName $resourceGroupName | Where-Object { $_.VirtualMachine.Id -eq $vmId } + Write-Verbose "[Azure Call]Got network interfaces in resource group $resourceGroupName" + + if($networkInterfaces) + { + $noOfNics = $networkInterfaces.Count + Write-Verbose "Number of network interface cards present in the vm: $noOfNics" + + foreach($networkInterface in $networkInterfaces) + { + $networkSecurityGroupEntry = $networkInterface.NetworkSecurityGroup + if($networkSecurityGroupEntry) + { + $nsId = $networkSecurityGroupEntry.Id + Write-Verbose "Network Security Group Id: $nsId" + + $securityGroupName = $nsId.Split('/')[-1] + $sgResourceGroup = $nsId.Split('/')[4] + Write-Verbose "Security Group name is $securityGroupName and the related resource group $sgResourceGroup" + + # Get the network security group object + Write-Verbose "[Azure Call]Getting network security group $securityGroupName in resource group $sgResourceGroup" + $securityGroup = Get-AzNetworkSecurityGroup -ResourceGroupName $sgResourceGroup -Name $securityGroupName + Write-Verbose "[Azure Call]Got network security group $securityGroupName in resource group $sgResourceGroup" + + $securityGroups.Add($securityGroup) + } + } + } + else + { + throw (Get-VstsLocString -Key "AFC_NoNetworkInterface" -ArgumentList $vmid , $resourceGroupName) + } + } + else + { + throw (Get-VstsLocString -Key "AFC_NullOrEmptyResourceGroup") + } + + return $securityGroups +} + +function Add-NetworkSecurityRuleConfig +{ + param([string]$resourceGroupName, + [object]$securityGroups, + [string]$ruleName, + [string]$rulePriotity, + [string]$winrmHttpsPort) + + if($securityGroups.Count -gt 0) + { + foreach($securityGroup in $securityGroups) + { + $securityGroupName = $securityGroup.Name + try + { + $winRMConfigRule = $null + + Write-Verbose "[Azure Call]Getting network security rule config $ruleName under security group $securityGroupName" + $winRMConfigRule = Get-AzNetworkSecurityRuleConfig -NetworkSecurityGroup $securityGroup -Name $ruleName -EA SilentlyContinue + Write-Verbose "[Azure Call]Got network security rule config $ruleName under security group $securityGroupName" + } + catch + { + #Ignore the exception + } + + # Add the network security rule if it doesn't exists + if(-not $winRMConfigRule) + { + $maxRetries = 3 + for($retryCnt=1; $retryCnt -le $maxRetries; $retryCnt++) + { + try + { + Write-Verbose "[Azure Call]Adding inbound network security rule config $ruleName with priority $rulePriotity for port $winrmHttpsPort under security group $securityGroupName" + $securityGroup = Add-AzNetworkSecurityRuleConfig -NetworkSecurityGroup $securityGroup -Name $ruleName -Direction Inbound -Access Allow -SourceAddressPrefix '*' -SourcePortRange '*' -DestinationAddressPrefix '*' -DestinationPortRange $winrmHttpsPort -Protocol * -Priority $rulePriotity + Write-Verbose "[Azure Call]Added inbound network security rule config $ruleName with priority $rulePriotity for port $winrmHttpsPort under security group $securityGroupName" + + Write-Verbose "[Azure Call]Setting the azure network security group" + $result = Set-AzNetworkSecurityGroup -NetworkSecurityGroup $securityGroup + Write-Verbose "[Azure Call]Set the azure network security group" + } + catch + { + Write-Verbose "Failed to add inbound network security rule config $ruleName with priority $rulePriotity for port $winrmHttpsPort under security group $securityGroupName : $_.Exception.Message" + + $newPort = [convert]::ToInt32($rulePriotity, 10) + 50; + $rulePriotity = $newPort.ToString() + + Write-Verbose "[Azure Call]Getting network security group $securityGroupName in resource group $resourceGroupName" + $securityGroup = Get-AzNetworkSecurityGroup -ResourceGroupName $resourceGroupName -Name $securityGroupName + Write-Verbose "[Azure Call]Got network security group $securityGroupName in resource group $resourceGroupName" + + + if($retryCnt -eq $maxRetries) + { + throw $_ + } + + continue + } + + Write-Verbose "Successfully added the network security group rule $ruleName with priority $rulePriotity for port $winrmHttpsPort" + break + } + } + } + } +} + +function Import-AzModule +{ + param([string]$moduleName) + + if (!(Get-Module $moduleName)) + { + $module = Get-Module -Name $moduleName -ListAvailable | Sort-Object Version -Descending | Select-Object -First 1 + if (!$module) { + Write-Verbose "No module found with name: $moduleName" + } + else { + # Import the module. + Write-Host "##[command]Import-Module -Name $($module.Path) -Global" + $module = Import-Module -Name $module.Path -Global -PassThru -Force + } + } +} + +Import-AzModule -moduleName "Az.Resources" +Import-AzModule -moduleName "Az.Storage" +Import-AzModule -moduleName "Az.Compute" +Import-AzModule -moduleName "Az.Network" diff --git a/Tasks/AzureFileCopyV6/AzureUtilityRest.ps1 b/Tasks/AzureFileCopyV6/AzureUtilityRest.ps1 new file mode 100644 index 000000000000..d1119903394a --- /dev/null +++ b/Tasks/AzureFileCopyV6/AzureUtilityRest.ps1 @@ -0,0 +1,160 @@ +Import-Module $PSScriptRoot\ps_modules\VstsAzureRestHelpers_ + +function Get-AzureStorageKeyFromARM +{ + param([string]$storageAccountName, + [object]$serviceEndpoint, + [string][Parameter(Mandatory=$false)]$connectedServiceNameARM, + [string][Parameter(Mandatory=$false)]$vstsAccessToken) + + if (-not [string]::IsNullOrEmpty($storageAccountName)) + { + # get azure storage account resource group name + $azureResourceGroupName = Get-AzureStorageAccountResourceGroupName -storageAccountName $storageAccountName + + Write-Verbose "[Azure Call]Retrieving storage key for the storage account: $storageAccount in resource group: $azureResourceid" + + $storageKeyDetails = Get-AzRMStorageKeys $azureResourceGroupName $storageAccountName $serviceEndpoint $connectedServiceNameARM $vstsAccessToken + $storageKey = $storageKeyDetails.Key1 + Write-Verbose "[Azure Call]Retrieved storage key successfully for the storage account: $storageAccount in resource group: $azureResourceGroupName" + + return $storageKey + } +} + +function Get-AzureBlobStorageEndpointFromARM +{ + param([string]$storageAccountName, + [object]$endpoint, + [string]$connectedServiceNameARM, + [string]$vstsAccessToken) + + if(-not [string]::IsNullOrEmpty($storageAccountName)) + { + # get azure storage account resource group name + $azureResourceGroupName = Get-AzureStorageAccountResourceGroupName -storageAccountName $storageAccountName + + Write-Verbose "[Azure Call]Retrieving storage account endpoint for the storage account: $storageAccount in resource group: $azureResourceGroupName" + + $storageAccountInfo = Get-AzRMStorageAccount $azureResourceGroupName $storageAccountName $endpoint $connectedServiceNameARM $vstsAccessToken -ErrorAction Stop + $storageAccountEnpoint = $storageAccountInfo.PrimaryEndpoints[0].blob + Write-Verbose "[Azure Call]Retrieved storage account endpoint successfully for the storage account: $storageAccount in resource group: $azureResourceGroupName" + + return $storageAccountEnpoint + } +} + +function Get-AzureStorageAccountTypeFromARM +{ + param([string]$storageAccountName, + [object]$endpoint, + [string]$connectedServiceNameARM, + [string]$vstsAccessToken) + + if(-not [string]::IsNullOrEmpty($storageAccountName)) + { + # get azure storage account resource group name + $azureResourceGroupName = Get-AzureStorageAccountResourceGroupName -storageAccountName $storageAccountName + + Write-Verbose "[Azure Call]Retrieving storage account type for the storage account: $storageAccount in resource group: $azureResourceGroupName" + $storageAccountInfo = Get-AzRMStorageAccount $azureResourceGroupName $storageAccountName $endpoint $connectedServiceNameARM $vstsAccessToken -ErrorAction Stop + $storageAccountType = $storageAccountInfo.sku.tier + Write-Verbose "[Azure Call]Retrieved storage account type successfully for the storage account: $storageAccount in resource group: $azureResourceGroupName" + + return $storageAccountType + } +} + +function Get-AzureMachineCustomScriptExtension +{ + param([string]$resourceGroupName, + [string]$vmName, + [string]$name, + [object]$endpoint, + [string]$connectedServiceNameARM, + [string]$vstsAccessToken) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmName)) + { + Write-Host (Get-VstsLocString -Key "AFC_GetCustomScriptExtension" -ArgumentList $name, $vmName) + $customScriptExtension = Get-AzRmVmCustomScriptExtension $resourceGroupName $vmName $name $endpoint $connectedServiceNameARM $vstsAccessToken + Write-Host (Get-VstsLocString -Key "AFC_GetCustomScriptExtensionComplete" -ArgumentList $name, $vmName) + } + + return $customScriptExtension +} + +function Remove-AzureMachineCustomScriptExtension +{ + param([string]$resourceGroupName, + [string]$vmName, + [string]$name, + [object]$endpoint, + [string]$connectedServiceNameARM, + [string]$vstsAccessToken) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmName) -and -not [string]::IsNullOrEmpty($name)) + { + Write-Host (Get-VstsLocString -Key "AFC_RemoveCustomScriptExtension" -ArgumentList $name, $vmName) + $response = Remove-AzRmVMCustomScriptExtension $resourceGroupName $vmName $name $endpoint $connectedServiceNameARM $vstsAccessToken + Write-Host (Get-VstsLocString -Key "AFC_RemoveCustomScriptExtensionComplete" -ArgumentList $name, $vmName) + } + + return $response +} + +function Get-AzureRMResourceGroupResourcesDetailsForAzureStack +{ + param([string]$resourceGroupName, + [object]$azureRMVMResources, + [object]$endpoint, + [string]$connectedServiceNameARM, + [string]$vstsAccessToken) + + [hashtable]$azureRGResourcesDetails = @{} + [hashtable]$loadBalancerDetails = @{} + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and $azureRMVMResources) + { + Write-Verbose "[Azure Call]Getting network interfaces in resource group $resourceGroupName" + $networkInterfaceResources = Get-AzureNetworkInterfaceDetails $resourceGroupName $endpoint $connectedServiceNameARM $vstsAccessToken + Write-Verbose "[Azure Call]Got network interfaces in resource group $resourceGroupName" + $azureRGResourcesDetails.Add("networkInterfaceResources", $networkInterfaceResources) + + Write-Verbose "[Azure Call]Getting public IP Addresses in resource group $resourceGroupName" + $publicIPAddressResources = Get-AzurePublicIpAddressDetails $resourceGroupName $endpoint $connectedServiceNameARM $vstsAccessToken + Write-Verbose "[Azure Call]Got public IP Addresses in resource group $resourceGroupName" + $azureRGResourcesDetails.Add("publicIPAddressResources", $publicIPAddressResources) + + Write-Verbose "[Azure Call]Getting load balancers in resource group $resourceGroupName" + $lbGroup = Get-AzureLoadBalancersDetails $resourceGroupName $endpoint $connectedServiceNameARM $vstsAccessToken + Write-Verbose "[Azure Call]Got load balancers in resource group $resourceGroupName" + + if($lbGroup) + { + foreach($lb in $lbGroup) + { + $lbDetails = @{} + Write-Verbose "[Azure Call]Getting load balancer in resource group $resourceGroupName" + $loadBalancer = Get-AzureLoadBalancerDetails $resourceGroupName $lb.Name $endpoint $connectedServiceNameARM $vstsAccessToken + Write-Verbose "[Azure Call]Got load balancer in resource group $resourceGroupName" + + Write-Verbose "[Azure Call]Getting LoadBalancer Frontend Ip Config" + $frontEndIPConfigs = Get-AzureRMLoadBalancerFrontendIpConfigDetails -LoadBalancer $loadBalancer + Write-Verbose "[Azure Call]Got LoadBalancer Frontend Ip Config" + + Write-Verbose "[Azure Call]Getting Azure LoadBalancer Inbound NatRule Config" + $inboundRules = Get-AzureRMLoadBalancerInboundNatRuleConfigDetails -LoadBalancer $loadBalancer + Write-Verbose "[Azure Call]Got Azure LoadBalancer Inbound NatRule Config" + + $lbDetails.Add("frontEndIPConfigs", $frontEndIPConfigs) + $lbDetails.Add("inboundRules", $inboundRules) + $loadBalancerDetails.Add($lb.Name, $lbDetails) + } + + $azureRGResourcesDetails.Add("loadBalancerResources", $loadBalancerDetails) + } + } + + return $azureRGResourcesDetails +} \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/MimeMapping.json b/Tasks/AzureFileCopyV6/MimeMapping.json new file mode 100644 index 000000000000..bcca3431f02d --- /dev/null +++ b/Tasks/AzureFileCopyV6/MimeMapping.json @@ -0,0 +1,559 @@ +{ + "MIMETypeMapping": { + ".323": "text/h323", + ".3g2": "video/3gpp2", + ".3gp": "video/3gpp", + ".3gp2": "video/3gpp2", + ".3gpp": "video/3gpp", + ".7z": "application/x-7z-compressed", + ".aca": "application/octet-stream", + ".accda": "application/msaccess.addin", + ".accdb": "application/msaccess", + ".accdc": "application/msaccess.cab", + ".accde": "application/msaccess", + ".accdr": "application/msaccess.runtime", + ".accdt": "application/msaccess", + ".accdw": "application/msaccess.webapplication", + ".accft": "application/msaccess.ftemplate", + ".acx": "application/internet-property-stream", + ".AddIn": "text/xml", + ".ade": "application/msaccess", + ".adobebridge": "application/x-bridge-url", + ".adp": "application/msaccess", + ".ADT": "audio/vnd.dlna.adts", + ".ADTS": "audio/aac", + ".afm": "application/octet-stream", + ".ai": "application/postscript", + ".aif": "audio/x-aiff", + ".aifc": "audio/aiff", + ".aiff": "audio/aiff", + ".air": "application/vnd.adobe.air-application-installer-package+zip", + ".amc": "application/x-mpeg", + ".application": "application/x-ms-application", + ".art": "image/x-jg", + ".asa": "application/xml", + ".asax": "application/xml", + ".ascx": "application/xml", + ".asd": "application/octet-stream", + ".asf": "video/x-ms-asf", + ".ashx": "application/xml", + ".asi": "application/octet-stream", + ".asm": "text/plain", + ".asmx": "application/xml", + ".aspx": "application/xml", + ".asr": "video/x-ms-asf", + ".asx": "video/x-ms-asf", + ".atom": "application/atom+xml", + ".au": "audio/basic", + ".avi": "video/x-msvideo", + ".axs": "application/olescript", + ".bas": "text/plain", + ".bcpio": "application/x-bcpio", + ".bin": "application/octet-stream", + ".bmp": "image/bmp", + ".c": "text/plain", + ".cab": "application/octet-stream", + ".caf": "audio/x-caf", + ".calx": "application/vnd.ms-office.calx", + ".cat": "application/vnd.ms-pki.seccat", + ".cc": "text/plain", + ".cd": "text/plain", + ".cdda": "audio/aiff", + ".cdf": "application/x-cdf", + ".cer": "application/x-x509-ca-cert", + ".chm": "application/octet-stream", + ".class": "application/x-java-applet", + ".clp": "application/x-msclip", + ".cmx": "image/x-cmx", + ".cnf": "text/plain", + ".cod": "image/cis-cod", + ".config": "application/xml", + ".contact": "text/x-ms-contact", + ".coverage": "application/xml", + ".cpio": "application/x-cpio", + ".cpp": "text/plain", + ".crd": "application/x-mscardfile", + ".crl": "application/pkix-crl", + ".crt": "application/x-x509-ca-cert", + ".cs": "text/plain", + ".csdproj": "text/plain", + ".csh": "application/x-csh", + ".csproj": "text/plain", + ".css": "text/css", + ".csv": "text/csv", + ".cur": "application/octet-stream", + ".cxx": "text/plain", + ".dat": "application/octet-stream", + ".datasource": "application/xml", + ".dbproj": "text/plain", + ".dcr": "application/x-director", + ".def": "text/plain", + ".deploy": "application/octet-stream", + ".der": "application/x-x509-ca-cert", + ".dgml": "application/xml", + ".dib": "image/bmp", + ".dif": "video/x-dv", + ".dir": "application/x-director", + ".disco": "text/xml", + ".dll": "application/x-msdownload", + ".dll.config": "text/xml", + ".dlm": "text/dlm", + ".doc": "application/msword", + ".docm": "application/vnd.ms-word.document.macroEnabled.12", + ".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + ".dot": "application/msword", + ".dotm": "application/vnd.ms-word.template.macroEnabled.12", + ".dotx": "application/vnd.openxmlformats-officedocument.wordprocessingml.template", + ".dsp": "application/octet-stream", + ".dsw": "text/plain", + ".dtd": "text/xml", + ".dtsConfig": "text/xml", + ".dv": "video/x-dv", + ".dvi": "application/x-dvi", + ".dwf": "drawing/x-dwf", + ".dwp": "application/octet-stream", + ".dxr": "application/x-director", + ".eml": "message/rfc822", + ".emz": "application/octet-stream", + ".eot": "application/octet-stream", + ".eps": "application/postscript", + ".etl": "application/etl", + ".etx": "text/x-setext", + ".evy": "application/envoy", + ".exe": "application/octet-stream", + ".exe.config": "text/xml", + ".fdf": "application/vnd.fdf", + ".fif": "application/fractals", + ".filters": "Application/xml", + ".fla": "application/octet-stream", + ".flr": "x-world/x-vrml", + ".flv": "video/x-flv", + ".fsscript": "application/fsharp-script", + ".fsx": "application/fsharp-script", + ".generictest": "application/xml", + ".gif": "image/gif", + ".group": "text/x-ms-group", + ".gsm": "audio/x-gsm", + ".gtar": "application/x-gtar", + ".gz": "application/x-gzip", + ".h": "text/plain", + ".hdf": "application/x-hdf", + ".hdml": "text/x-hdml", + ".hhc": "application/x-oleobject", + ".hhk": "application/octet-stream", + ".hhp": "application/octet-stream", + ".hlp": "application/winhlp", + ".hpp": "text/plain", + ".hqx": "application/mac-binhex40", + ".hta": "application/hta", + ".htc": "text/x-component", + ".htm": "text/html", + ".html": "text/html", + ".htt": "text/webviewhtml", + ".hxa": "application/xml", + ".hxc": "application/xml", + ".hxd": "application/octet-stream", + ".hxe": "application/xml", + ".hxf": "application/xml", + ".hxh": "application/octet-stream", + ".hxi": "application/octet-stream", + ".hxk": "application/xml", + ".hxq": "application/octet-stream", + ".hxr": "application/octet-stream", + ".hxs": "application/octet-stream", + ".hxt": "text/html", + ".hxv": "application/xml", + ".hxw": "application/octet-stream", + ".hxx": "text/plain", + ".i": "text/plain", + ".ico": "image/x-icon", + ".ics": "application/octet-stream", + ".idl": "text/plain", + ".ief": "image/ief", + ".iii": "application/x-iphone", + ".inc": "text/plain", + ".inf": "application/octet-stream", + ".inl": "text/plain", + ".ins": "application/x-internet-signup", + ".ipa": "application/x-itunes-ipa", + ".ipg": "application/x-itunes-ipg", + ".ipproj": "text/plain", + ".ipsw": "application/x-itunes-ipsw", + ".iqy": "text/x-ms-iqy", + ".isp": "application/x-internet-signup", + ".ite": "application/x-itunes-ite", + ".itlp": "application/x-itunes-itlp", + ".itms": "application/x-itunes-itms", + ".itpc": "application/x-itunes-itpc", + ".IVF": "video/x-ivf", + ".jar": "application/java-archive", + ".java": "application/octet-stream", + ".jck": "application/liquidmotion", + ".jcz": "application/liquidmotion", + ".jfif": "image/pjpeg", + ".jnlp": "application/x-java-jnlp-file", + ".jpb": "application/octet-stream", + ".jpe": "image/jpeg", + ".jpeg": "image/jpeg", + ".jpg": "image/jpeg", + ".js": "application/x-javascript", + ".json": "application/json", + ".jsx": "text/jscript", + ".jsxbin": "text/plain", + ".latex": "application/x-latex", + ".library-ms": "application/windows-library+xml", + ".lit": "application/x-ms-reader", + ".loadtest": "application/xml", + ".lpk": "application/octet-stream", + ".lsf": "video/x-la-asf", + ".lst": "text/plain", + ".lsx": "video/x-la-asf", + ".lzh": "application/octet-stream", + ".m13": "application/x-msmediaview", + ".m14": "application/x-msmediaview", + ".m1v": "video/mpeg", + ".m2t": "video/vnd.dlna.mpeg-tts", + ".m2ts": "video/vnd.dlna.mpeg-tts", + ".m2v": "video/mpeg", + ".m3u": "audio/x-mpegurl", + ".m3u8": "audio/x-mpegurl", + ".m4a": "audio/m4a", + ".m4b": "audio/m4b", + ".m4p": "audio/m4p", + ".m4r": "audio/x-m4r", + ".m4v": "video/x-m4v", + ".mac": "image/x-macpaint", + ".mak": "text/plain", + ".man": "application/x-troff-man", + ".manifest": "application/x-ms-manifest", + ".map": "text/plain", + ".master": "application/xml", + ".mda": "application/msaccess", + ".mdb": "application/x-msaccess", + ".mde": "application/msaccess", + ".mdp": "application/octet-stream", + ".me": "application/x-troff-me", + ".mfp": "application/x-shockwave-flash", + ".mht": "message/rfc822", + ".mhtml": "message/rfc822", + ".mid": "audio/mid", + ".midi": "audio/mid", + ".mix": "application/octet-stream", + ".mk": "text/plain", + ".mmf": "application/x-smaf", + ".mno": "text/xml", + ".mny": "application/x-msmoney", + ".mod": "video/mpeg", + ".mov": "video/quicktime", + ".movie": "video/x-sgi-movie", + ".mp2": "video/mpeg", + ".mp2v": "video/mpeg", + ".mp3": "audio/mpeg", + ".mp4": "video/mp4", + ".mp4v": "video/mp4", + ".mpa": "video/mpeg", + ".mpe": "video/mpeg", + ".mpeg": "video/mpeg", + ".mpf": "application/vnd.ms-mediapackage", + ".mpg": "video/mpeg", + ".mpp": "application/vnd.ms-project", + ".mpv2": "video/mpeg", + ".mqv": "video/quicktime", + ".ms": "application/x-troff-ms", + ".msi": "application/octet-stream", + ".mso": "application/octet-stream", + ".mts": "video/vnd.dlna.mpeg-tts", + ".mtx": "application/xml", + ".mvb": "application/x-msmediaview", + ".mvc": "application/x-miva-compiled", + ".mxp": "application/x-mmxp", + ".nc": "application/x-netcdf", + ".nsc": "video/x-ms-asf", + ".nws": "message/rfc822", + ".ocx": "application/octet-stream", + ".oda": "application/oda", + ".odc": "text/x-ms-odc", + ".odh": "text/plain", + ".odl": "text/plain", + ".odp": "application/vnd.oasis.opendocument.presentation", + ".ods": "application/oleobject", + ".odt": "application/vnd.oasis.opendocument.text", + ".one": "application/onenote", + ".onea": "application/onenote", + ".onepkg": "application/onenote", + ".onetmp": "application/onenote", + ".onetoc": "application/onenote", + ".onetoc2": "application/onenote", + ".orderedtest": "application/xml", + ".osdx": "application/opensearchdescription+xml", + ".p10": "application/pkcs10", + ".p12": "application/x-pkcs12", + ".p7b": "application/x-pkcs7-certificates", + ".p7c": "application/pkcs7-mime", + ".p7m": "application/pkcs7-mime", + ".p7r": "application/x-pkcs7-certreqresp", + ".p7s": "application/pkcs7-signature", + ".pbm": "image/x-portable-bitmap", + ".pcast": "application/x-podcast", + ".pct": "image/pict", + ".pcx": "application/octet-stream", + ".pcz": "application/octet-stream", + ".pdf": "application/pdf", + ".pfb": "application/octet-stream", + ".pfm": "application/octet-stream", + ".pfx": "application/x-pkcs12", + ".pgm": "image/x-portable-graymap", + ".pic": "image/pict", + ".pict": "image/pict", + ".pkgdef": "text/plain", + ".pkgundef": "text/plain", + ".pko": "application/vnd.ms-pki.pko", + ".pls": "audio/scpls", + ".pma": "application/x-perfmon", + ".pmc": "application/x-perfmon", + ".pml": "application/x-perfmon", + ".pmr": "application/x-perfmon", + ".pmw": "application/x-perfmon", + ".png": "image/png", + ".pnm": "image/x-portable-anymap", + ".pnt": "image/x-macpaint", + ".pntg": "image/x-macpaint", + ".pnz": "image/png", + ".pot": "application/vnd.ms-powerpoint", + ".potm": "application/vnd.ms-powerpoint.template.macroEnabled.12", + ".potx": "application/vnd.openxmlformats-officedocument.presentationml.template", + ".ppa": "application/vnd.ms-powerpoint", + ".ppam": "application/vnd.ms-powerpoint.addin.macroEnabled.12", + ".ppm": "image/x-portable-pixmap", + ".pps": "application/vnd.ms-powerpoint", + ".ppsm": "application/vnd.ms-powerpoint.slideshow.macroEnabled.12", + ".ppsx": "application/vnd.openxmlformats-officedocument.presentationml.slideshow", + ".ppt": "application/vnd.ms-powerpoint", + ".pptm": "application/vnd.ms-powerpoint.presentation.macroEnabled.12", + ".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation", + ".prf": "application/pics-rules", + ".prm": "application/octet-stream", + ".prx": "application/octet-stream", + ".ps": "application/postscript", + ".psc1": "application/PowerShell", + ".psd": "application/octet-stream", + ".psess": "application/xml", + ".psm": "application/octet-stream", + ".psp": "application/octet-stream", + ".pub": "application/x-mspublisher", + ".pwz": "application/vnd.ms-powerpoint", + ".qht": "text/x-html-insertion", + ".qhtm": "text/x-html-insertion", + ".qt": "video/quicktime", + ".qti": "image/x-quicktime", + ".qtif": "image/x-quicktime", + ".qtl": "application/x-quicktimeplayer", + ".qxd": "application/octet-stream", + ".ra": "audio/x-pn-realaudio", + ".ram": "audio/x-pn-realaudio", + ".rar": "application/octet-stream", + ".ras": "image/x-cmu-raster", + ".rat": "application/rat-file", + ".rc": "text/plain", + ".rc2": "text/plain", + ".rct": "text/plain", + ".rdlc": "application/xml", + ".resx": "application/xml", + ".rf": "image/vnd.rn-realflash", + ".rgb": "image/x-rgb", + ".rgs": "text/plain", + ".rm": "application/vnd.rn-realmedia", + ".rmi": "audio/mid", + ".rmp": "application/vnd.rn-rn_music_package", + ".roff": "application/x-troff", + ".rpm": "audio/x-pn-realaudio-plugin", + ".rqy": "text/x-ms-rqy", + ".rtf": "application/rtf", + ".rtx": "text/richtext", + ".ruleset": "application/xml", + ".s": "text/plain", + ".safariextz": "application/x-safari-safariextz", + ".scd": "application/x-msschedule", + ".sct": "text/scriptlet", + ".sd2": "audio/x-sd2", + ".sdp": "application/sdp", + ".sea": "application/octet-stream", + ".searchConnector-ms": "application/windows-search-connector+xml", + ".setpay": "application/set-payment-initiation", + ".setreg": "application/set-registration-initiation", + ".settings": "application/xml", + ".sgimb": "application/x-sgimb", + ".sgml": "text/sgml", + ".sh": "application/x-sh", + ".shar": "application/x-shar", + ".shtml": "text/html", + ".sit": "application/x-stuffit", + ".sitemap": "application/xml", + ".skin": "application/xml", + ".sldm": "application/vnd.ms-powerpoint.slide.macroEnabled.12", + ".sldx": "application/vnd.openxmlformats-officedocument.presentationml.slide", + ".slk": "application/vnd.ms-excel", + ".sln": "text/plain", + ".slupkg-ms": "application/x-ms-license", + ".smd": "audio/x-smd", + ".smi": "application/octet-stream", + ".smx": "audio/x-smd", + ".smz": "audio/x-smd", + ".snd": "audio/basic", + ".snippet": "application/xml", + ".snp": "application/octet-stream", + ".sol": "text/plain", + ".sor": "text/plain", + ".spc": "application/x-pkcs7-certificates", + ".spl": "application/futuresplash", + ".src": "application/x-wais-source", + ".srf": "text/plain", + ".SSISDeploymentManifest": "text/xml", + ".ssm": "application/streamingmedia", + ".sst": "application/vnd.ms-pki.certstore", + ".stl": "application/vnd.ms-pki.stl", + ".sv4cpio": "application/x-sv4cpio", + ".sv4crc": "application/x-sv4crc", + ".svc": "application/xml", + ".swf": "application/x-shockwave-flash", + ".t": "application/x-troff", + ".tar": "application/x-tar", + ".tcl": "application/x-tcl", + ".testrunconfig": "application/xml", + ".testsettings": "application/xml", + ".tex": "application/x-tex", + ".texi": "application/x-texinfo", + ".texinfo": "application/x-texinfo", + ".tgz": "application/x-compressed", + ".thmx": "application/vnd.ms-officetheme", + ".thn": "application/octet-stream", + ".tif": "image/tiff", + ".tiff": "image/tiff", + ".tlh": "text/plain", + ".tli": "text/plain", + ".toc": "application/octet-stream", + ".tr": "application/x-troff", + ".trm": "application/x-msterminal", + ".trx": "application/xml", + ".ts": "video/vnd.dlna.mpeg-tts", + ".tsv": "text/tab-separated-values", + ".ttf": "application/octet-stream", + ".tts": "video/vnd.dlna.mpeg-tts", + ".txt": "text/plain", + ".u32": "application/octet-stream", + ".uls": "text/iuls", + ".user": "text/plain", + ".ustar": "application/x-ustar", + ".vb": "text/plain", + ".vbdproj": "text/plain", + ".vbk": "video/mpeg", + ".vbproj": "text/plain", + ".vbs": "text/vbscript", + ".vcf": "text/x-vcard", + ".vcproj": "Application/xml", + ".vcs": "text/plain", + ".vcxproj": "Application/xml", + ".vddproj": "text/plain", + ".vdp": "text/plain", + ".vdproj": "text/plain", + ".vdx": "application/vnd.ms-visio.viewer", + ".vml": "text/xml", + ".vscontent": "application/xml", + ".vsct": "text/xml", + ".vsd": "application/vnd.visio", + ".vsi": "application/ms-vsi", + ".vsix": "application/vsix", + ".vsixlangpack": "text/xml", + ".vsixmanifest": "text/xml", + ".vsmdi": "application/xml", + ".vspscc": "text/plain", + ".vss": "application/vnd.visio", + ".vsscc": "text/plain", + ".vssettings": "text/xml", + ".vssscc": "text/plain", + ".vst": "application/vnd.visio", + ".vstemplate": "text/xml", + ".vsto": "application/x-ms-vsto", + ".vsw": "application/vnd.visio", + ".vsx": "application/vnd.visio", + ".vtx": "application/vnd.visio", + ".wav": "audio/wav", + ".wave": "audio/wav", + ".wax": "audio/x-ms-wax", + ".wbk": "application/msword", + ".wbmp": "image/vnd.wap.wbmp", + ".wcm": "application/vnd.ms-works", + ".wdb": "application/vnd.ms-works", + ".wdp": "image/vnd.ms-photo", + ".webarchive": "application/x-safari-webarchive", + ".webtest": "application/xml", + ".wiq": "application/xml", + ".wiz": "application/msword", + ".wks": "application/vnd.ms-works", + ".WLMP": "application/wlmoviemaker", + ".wlpginstall": "application/x-wlpg-detect", + ".wlpginstall3": "application/x-wlpg3-detect", + ".wm": "video/x-ms-wm", + ".wma": "audio/x-ms-wma", + ".wmd": "application/x-ms-wmd", + ".wmf": "application/x-msmetafile", + ".wml": "text/vnd.wap.wml", + ".wmlc": "application/vnd.wap.wmlc", + ".wmls": "text/vnd.wap.wmlscript", + ".wmlsc": "application/vnd.wap.wmlscriptc", + ".wmp": "video/x-ms-wmp", + ".wmv": "video/x-ms-wmv", + ".wmx": "video/x-ms-wmx", + ".wmz": "application/x-ms-wmz", + ".wpl": "application/vnd.ms-wpl", + ".wps": "application/vnd.ms-works", + ".wri": "application/x-mswrite", + ".wrl": "x-world/x-vrml", + ".wrz": "x-world/x-vrml", + ".wsc": "text/scriptlet", + ".wsdl": "text/xml", + ".wvx": "video/x-ms-wvx", + ".x": "application/directx", + ".xaf": "x-world/x-vrml", + ".xaml": "application/xaml+xml", + ".xap": "application/x-silverlight-app", + ".xbap": "application/x-ms-xbap", + ".xbm": "image/x-xbitmap", + ".xdr": "text/plain", + ".xht": "application/xhtml+xml", + ".xhtml": "application/xhtml+xml", + ".xla": "application/vnd.ms-excel", + ".xlam": "application/vnd.ms-excel.addin.macroEnabled.12", + ".xlc": "application/vnd.ms-excel", + ".xld": "application/vnd.ms-excel", + ".xlk": "application/vnd.ms-excel", + ".xll": "application/vnd.ms-excel", + ".xlm": "application/vnd.ms-excel", + ".xls": "application/vnd.ms-excel", + ".xlsb": "application/vnd.ms-excel.sheet.binary.macroEnabled.12", + ".xlsm": "application/vnd.ms-excel.sheet.macroEnabled.12", + ".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + ".xlt": "application/vnd.ms-excel", + ".xltm": "application/vnd.ms-excel.template.macroEnabled.12", + ".xltx": "application/vnd.openxmlformats-officedocument.spreadsheetml.template", + ".xlw": "application/vnd.ms-excel", + ".xml": "text/xml", + ".xmta": "application/xml", + ".xof": "x-world/x-vrml", + ".XOML": "text/plain", + ".xpm": "image/x-xpixmap", + ".xps": "application/vnd.ms-xpsdocument", + ".xrm-ms": "text/xml", + ".xsc": "application/xml", + ".xsd": "text/xml", + ".xsf": "text/xml", + ".xsl": "text/xml", + ".xslt": "text/xml", + ".xsn": "application/octet-stream", + ".xss": "application/xml", + ".xtp": "application/octet-stream", + ".xwd": "image/x-xwindowdump", + ".z": "application/x-compress", + ".zip": "application/x-zip-compressed" + } + } \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/PreJobExecutionAzureFileCopy.ts b/Tasks/AzureFileCopyV6/PreJobExecutionAzureFileCopy.ts new file mode 100644 index 000000000000..f0bacc48a816 --- /dev/null +++ b/Tasks/AzureFileCopyV6/PreJobExecutionAzureFileCopy.ts @@ -0,0 +1,54 @@ +import tl = require('azure-pipelines-task-lib/task'); +import path = require('path'); +import fs = require('fs') +import armStorage = require('azure-pipelines-tasks-azure-arm-rest/azure-arm-storage'); +import msRestAzure = require('azure-pipelines-tasks-azure-arm-rest/azure-arm-common'); +import { AzureRMEndpoint } from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-endpoint'; +import { AzureEndpoint, StorageAccount } from 'azure-pipelines-tasks-azure-arm-rest/azureModels'; + +function isNonEmpty(str: string): boolean { + return (!!str && !!str.trim()); +} + +function getResourceGroupNameFromUri(resourceUri: string): string { + if (isNonEmpty(resourceUri)) { + resourceUri = resourceUri.toLowerCase(); + return resourceUri.substring(resourceUri.indexOf("resourcegroups/") + "resourcegroups/".length, resourceUri.indexOf("/providers")); + } + + return ""; +} + +async function run(): Promise { + let tempDirectory: string = tl.getVariable('Agent.TempDirectory'); + let fileName: string = Math.random().toString(36).replace('0.', ''); + let file: string = path.resolve(tempDirectory, fileName); + try { + const taskManifestPath = path.join(__dirname, "task.json"); + tl.debug("Setting resource path to " + taskManifestPath); + tl.setResourcePath(taskManifestPath); + let connectionType = tl.getInput('ConnectedServiceNameSelector', false); + if(connectionType === 'ConnectedServiceNameARM') { + let connectedServiceName = tl.getInput('ConnectedServiceNameARM', true); + let storageAccountName = tl.getInput('StorageAccountRM', true); + var azureEndpoint: AzureEndpoint = await new AzureRMEndpoint(connectedServiceName).getEndpoint(); + const storageArmClient = new armStorage.StorageManagementClient(azureEndpoint.applicationTokenCredentials, azureEndpoint.subscriptionID); + let storageAccount: StorageAccount = await storageArmClient.storageAccounts.get(storageAccountName); + let storageAccountResourceGroupName = getResourceGroupNameFromUri(storageAccount.id); + let accessKeys = await storageArmClient.storageAccounts.listKeys(storageAccountResourceGroupName, storageAccountName, null); + let accessKey: string = accessKeys[0]; + let data: string = `/DestKey:\"${accessKey}\"`; + let options = { encoding : "utf8" } + fs.writeFileSync(file, data, options); + tl.setTaskVariable('AFC_V2_ARM_STORAGE_KEY_FILE', file); + tl.debug("Response file created"); + } + } catch(error) { + if (fs.existsSync(file)) { + fs.unlinkSync(file); + } + console.log(tl.loc("AFC_PreexecutionJob_UnableToGetStorageKey", error)); + } +} + +run() \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/README.md b/Tasks/AzureFileCopyV6/README.md new file mode 100644 index 000000000000..d563b42b68d9 --- /dev/null +++ b/Tasks/AzureFileCopyV6/README.md @@ -0,0 +1,116 @@ +# Azure File Copy + +### Overview + +The task is used to copy application files and other artifacts that are required to install the application on Azure VMs like PowerShell scripts, PowerShell-DSC modules etc. The task provides the ability to copy files to an Azure blob or directly to Azure VMs. Even when the target is Azure VMs, Azure blobs are used as an intermediary and the files are copied to it first and then downloaded to the VMs. The tasks uses [AzCopy](https://azure.microsoft.com/en-in/documentation/articles/storage-use-azcopy/), the command-line utility built for fast copying of data from and into Azure storage accounts. + +### Contact Information + +Please report a problem at [Developer Community Forum](https://developercommunity.visualstudio.com/spaces/21/index.html) if you are facing problems in making this task work. You can also share feedback about the task like, what more functionality should be added to the task, what other tasks you would like to have, at the same place. + +### Prerequisite for the task + +**Azure Subscription** + +To deploy to Azure, an Azure subscription has to be linked to Team Foundation Server or to Azure Pipelines using the Services tab in the Account Administration section. Add the Azure subscription to use in the Build or Release Management definition by opening the Account Administration screen (gear icon on the top-right of the screen) and then click on the Services Tab. + + - Use 'Azure Resource Manager' endpoint type to create a ARM endpoint, for more details follow the steps listed in the link [here](https://go.microsoft.com/fwlink/?LinkID=623000&clcid=0x409). + - As this version of task uses AzCopy 10, service principal needs to have one of these `Storage Blob Data Contributor` or `Storage Blob Data Owner` roles assigned to access resources. + 1. Click on `Manage` link next to Azure Subscription + 2. Click `Manage Service Principal` which will redirect you to the Application Registration of the Service Principal. Copy the name. + 3. Go back and click `Manage service connection roles` which will redirect you to the IAM blade of the Azure Subscription. Here you need to assign a role to the service principal. Use name copied in previous step to search service principal + +**PowerShell** + +The task needs at least version 3.0 of Powershell on the target machine. + +**Azure PowerShell** + +The task needs Az modules to be installed on the automation agent, and that can be done easily using https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-7.0.0. + +**Azure Virtual Machines** + +The task can copy files to the Azure Virtual Machines that are created either using the [new azure portal](https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-tutorial/). For copying the files to VMs, they are first copied to an automatically generated container in the Azure storage account, and then from there to the VMs. The container is deleted after the files are copied successfully to the VMs. + +To dynamically deploy Azure resource groups with virtual machines in them use the [Azure Resource Group Deployment](https://github.com/Microsoft/vsts-tasks/tree/master/Tasks/DeployAzureResourceGroup) task. The task has a sample template that can setup the WinRM HTTPS protocol on the virtual machines, open the 5986 port in the Firewall, and install the test certificate. After this the virtual machines are ready for use in the deployment task. + +If the VMs have been created without opening the WinRM HTTPS ports then follow the steps below to setup the machine for WinRM HTTPS: + +- In the target machine, the WinRM HTTPS port (default 5986) should be open in the Firewall. Disable [UAC remote restrictions](https://support.microsoft.com/en-us/kb/951016) and the credentials should be in the format of username like vmuser, where vmuser is the admin user of the VM. +- The trusted certificate should be installed in the Automation agent, and if the trusted certificate is not installed in the Automation agent, then ensure that the Test Certificate option is selected in the task for the application deployment to work. +- For more guidance refer this [blog](https://blogs.msdn.com/b/muthus_blog/archive/2015/11/04/pre-requisites-for-using-azure-vms-in-winrm-based-tasks-in-build-and-rm-workflows.aspx). + +### Parameters of the task: + +The parameters of the task are described in details, including examples, to show how to input the parameters. The parameters listed with a * are required parameters for the task: + +* **Azure Subscription**: The name of Azure subscription, where the Azure storage account is located. The storage account is accessed using the stored credentials of the Azure account in the Services tab. + +* **Source**: The source of the files. As described above using pre-defined system variables like $(Build.Repository.LocalPath) make it easy to specify the location of the build on the Build Automation Agent machine. The variables resolve to the working folder on the agent machine, when the task is run on it. Note that wild cards like *\.zip are not supported. + +* **Storage Account**: The name of an existing storage account in the Azure Subscription specified earlier. + +* **Destination**: The target for copying the files and is either an Azure blob or VMs. The section below details the parameters that need to be filled-out if the target is Azure VMs. + + * **Resource Group**: Name of the resource group that contains the Azure VMs. + + * **Select Machines By**: The parameter is used to copy the files to a subset of VMs and the subset can be specified by the host name of the VMs or the tags on them. [Tags](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/) are supported for resources created via the Azure Resource Manager only. + + * **Filter Criteria**: If you are copying to a subset of VMs using machine names filter, you can provide a comma separated list of the VM host names for example, ffweb, ffdb1, ffdb2. If you are using tags then you can specify tags in the format “:, :” for example, role:web, db; OS:win7. The default behavior is to copy to all the VMs in the Resource Group. Note the delimiters used for tags are ,(comma), :(colon) and ;(semicolon). + + * **Admin Login**: Administrator Username for all the Azure VMs in the Resource Group. + + * **Password**: Administrator Username password for all the Azure VMs in the Resource Group. + + * **Destination Folder**: The folder in the Azure VMs where the files will be copied to. Environment variables are also supported like $env:windir, $env:systemroot etc. An example of the destination folder is $env:windir\FabrikamFibre\Web or c:\FabrikamFibre. + + * **Enable Copy Prerequisites**: Enabling this option configures Windows Remote Management (WinRM) listener over HTTPS protocol on port 5986, using a self-signed certificate. This configuration is required for performing copy operation on Azure machines. If the target Virtual Machines are backed by a Load balancer, ensure Inbound NAT rules are configured for target port (5986). If the target Virtual Machines are associated with a Network security group (NSG), configure Inbound security rules for Destination port (5986). Applicable only for ARM VMs. + + * **Copy in Parallel**: Selecting this option will copy files to all the VMs in the Resource Group in-parallel, hence speeding up the process of copying. + + * **Clean Target**: Selecting this option will clean the destination folder prior to copying the files to it. When destination type is AzureBlob, it will delete all the folders/files in that container and If blob prefix is provided then it will delete all the folders/files in that blob prefix. + + * **Test Certificate**: This setting is required while copying the files from the blob containers to the Azure VMs. The copy operation is initiated over the WinRM HTTPS protocol and if the VM has a test certificate installed on it, then select this option to to skip the validation that the server certificate is signed by a trusted certificate authority (CA). + +* **Destination**: If the target is Azure blob then the following parameters need to be filled out. + + * **Container Name**: The name of the container where the files will be copied to. If the container does not exist then a new one will be created with the name provided in this parameter. + + * **Blob Prefix**: A prefix for the Blobs that can be used to filter the blobs like appending the Build number to the blobs, so that all the blobs with the same build number can be downloaded from the Container. + +* **Additional Arguments**: Additional [AzCopy.exe](https://azure.microsoft.com/en-us/documentation/articles/storage-use-azcopy/) arguments that will be applied for uploading to blob and same will be applied for downloading while copy to VM. + * **Blob Destination**: Supported additional arguments for copy to blob are listed in https://docs.microsoft.com/en-us/azure/storage/common/storage-ref-azcopy-copy?toc=/azure/storage/blobs/toc.json. + + * **VM Destination**: Supported additional arguments for copy to blob are listed in https://docs.microsoft.com/en-us/azure/storage/common/storage-ref-azcopy-copy?toc=/azure/storage/blobs/toc.json. + +### Output Variables + +The task creates the following as output variables: +* **StorageContainerUri**: When copying files to an Azure container, this parameter returns the Uri of the container were the files were copied to. +* **StorageContainerSasToken**: When copying files to an Azure container, a SasToken is created and returned. By default, this token expires after 4 hours. + +Following the [output variables](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#use-output-variables-from-tasks) documentation and naming the step, we can then reference the variables like so: + +```yaml +- task: AzureFileCopy@5 + inputs: + SourcePath: 'Readme.md' + azureSubscription: 'Azure' + Destination: 'AzureBlob' + storage: 'storageAccount' + ContainerName: 'containerName' + BlobPrefix: '' + name: AzureFileCopy + +- script: | + echo $(AzureFileCopy.StorageContainerUri) + echo $(AzureFileCopy.StorageContainerSasToken) +``` + +### Known Limitations : + +* If resource group contains both [resource manager](https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-tutorial/) and [classic](https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-tutorial-classic-portal/) VMs, then copy operation will be performed only on resource manager VMs. + +### Earlier Versions + +If you want to work with earlier version of this task, please refer README.md present at https://github.com/microsoft/azure-pipelines-tasks/tree/releases/m195/Tasks/AzureFileCopyV4/ . diff --git a/Tasks/AzureFileCopyV6/Strings/resources.resjson/de-DE/resources.resjson b/Tasks/AzureFileCopyV6/Strings/resources.resjson/de-DE/resources.resjson new file mode 100644 index 000000000000..28987d5df569 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Strings/resources.resjson/de-DE/resources.resjson @@ -0,0 +1,94 @@ +{ + "loc.friendlyName": "Azure-Dateikopiervorgang", + "loc.helpMarkDown": "[Weitere Informationen zu dieser Aufgabe](https://aka.ms/azurefilecopyreadme)", + "loc.description": "Hiermit werden Dateien in Azure Blob Storage oder auf virtuelle Computer kopiert.", + "loc.instanceNameFormat": "$(Destination)-Dateikopiervorgang", + "loc.releaseNotes": "Neuerungen in Version 5.0:
   Unterstützung von AzCopy.exe-Version 10.12.2", + "loc.input.label.SourcePath": "Quelle", + "loc.input.help.SourcePath": "Der absolute Pfad des Quellordners oder der Datei auf dem lokalen Computer oder eine UNC-Freigabe. Der Ausdruck muss einen einzelnen Ordner oder eine Datei zurückgeben. Das Platzhaltersymbol (*) wird an beliebiger Stelle im Dateipfad oder im Dateinamen unterstützt.", + "loc.input.label.ConnectedServiceNameARM": "Azure-Abonnement", + "loc.input.help.ConnectedServiceNameARM": "Azure Resource Manager-Abonnement, das als Ziel für den Kopiervorgang von Dateien dient.", + "loc.input.label.Destination": "Zieltyp", + "loc.input.help.Destination": "Wählen Sie als Ziel entweder Azure-Blob oder Azure-VMs aus.", + "loc.input.label.StorageAccountRM": "RM-Speicherkonto", + "loc.input.help.StorageAccountRM": "Geben Sie ein bereits vorhandenes ARM-Speicherkonto an. Es wird auch als Zwischenspeicher zum Kopieren von Dateien in virtuelle Azure-Maschinen verwendet.", + "loc.input.label.ContainerName": "Containername", + "loc.input.help.ContainerName": "Der Name des Containers zum Hochladen der Dateien. Wenn im angegebenen Speicherkonto kein Container mit dem angegebenen Namen vorhanden ist, wird er automatisch erstellt.
Wenn Sie ein virtuelles Verzeichnis innerhalb des Containers erstellen möchten, verwenden Sie die unten aufgeführte Blobpräfixeingabe.
Beispiel: Wenn der Zielort https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/ lautet, geben Sie mycontainer als Containername und vd1/vd2 als Blobpräfix an.", + "loc.input.label.BlobPrefix": "Blobpräfix", + "loc.input.help.BlobPrefix": "Nützlich zum Filtern von Dateien, z. B. das Anfügen der Buildnummer an alle Blobs, um nur Dateien aus diesem Build herunterzuladen. Beispiel: Wenn Sie das Blobpräfix als myvd1/ angeben, wird innerhalb des Containers ein virtuelles Verzeichnis mit diesem Namen erstellt. Das Blobpräfix mit dem nachstehenden \"/\" wird als virtuelles Verzeichnis betrachtet. Andernfalls wird es als Datei behandelt, es sei denn, das Element, das kopiert wird, ist selbst ein Ordner. Die Quelldateien werden in https://myaccount.blob.core.windows.net/mycontainer/myvd1/ kopiert.", + "loc.input.label.EnvironmentNameRM": "Ressourcengruppe", + "loc.input.help.EnvironmentNameRM": "Der Name der Zielressourcengruppe, in die Dateien kopiert werden sollen.", + "loc.input.label.ResourceFilteringMethod": "Computer auswählen nach", + "loc.input.help.ResourceFilteringMethod": "Wählen Sie optional eine Teilmenge der virtuellen Maschinen in der Ressourcengruppe durch Angeben des Hostnamens oder der Tags der virtuellen Maschinen aus. [Tags](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/) werden nur für Ressourcen unterstützt, die über den Azure Resource Manager erstellt werden.", + "loc.input.label.MachineNames": "Filterkriterien", + "loc.input.help.MachineNames": "Stellen Sie eine Liste der VM-Hostnamen (z. B. \"ffweb\", \"ffdb\") oder Tags (z. B. \"Role:DB\", \"Web; OS:Win8.1\" bereit. Beachten Sie, dass die für Tags verwendeten Trennzeichen \",\" (Komma), \":\" (Doppelpunkt) und \";\" (Semikolon) sind. Wenn mehrere Tags angegeben werden, wird der Task auf allen virtuellen Maschinen mit den angegebenen Tags ausgeführt. Standardmäßig wird der Task auf allen virtuellen Maschinen ausgeführt.", + "loc.input.label.vmsAdminUserName": "Administratoranmeldung", + "loc.input.help.vmsAdminUserName": "Der Benutzername des Administrators der virtuellen Maschinen.", + "loc.input.label.vmsAdminPassword": "Kennwort", + "loc.input.help.vmsAdminPassword": "Das Administratorkennwort der VMs.
Die in den Build- oder Releasepipelines als \"$(passwordVariable)\" festgelegten Variablen werden akzeptiert.
Sie können die Variable als \"secret\" markieren, um sie abzusichern.", + "loc.input.label.TargetPath": "Zielordner", + "loc.input.help.TargetPath": "Lokaler Pfad auf den Zielcomputern zum Kopieren der Dateien aus der Quelle. Die Umgebungsvariable kann wie folgt verwendet werden: $env:windir\\BudgetIT\\Web.", + "loc.input.label.AdditionalArgumentsForBlobCopy": "Optionale Argumente (für das Hochladen von Dateien in das Blob)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "Optionale AzCopy.exe-Argumente, die beim Hochladen in ein Blob angewendet werden, z. B. --check-length=true. Werden hier keine optionalen Argumente angegeben, werden standardmäßig die folgenden optionalen Argumente hinzugefügt.
--log-level=INFO (verwenden Sie bei Ausführung der Pipeline im Debugmodus \"--log-level=DEBUG\"),
--recursive (nur, wenn der Containername nicht \"$root\" lautet),
--blob-type=PageBlob (nur, wenn das angegebene Speicherkonto ein Premium-Konto ist)", + "loc.input.label.AdditionalArgumentsForVMCopy": "Optionale Argumente (für das Herunterladen von Dateien auf die VM)", + "loc.input.help.AdditionalArgumentsForVMCopy": "Optionale AzCopy.exe-Argumente, die beim Herunterladen auf eine VM angewendet werden, z. B. --check-length=true. Werden hier keine optionalen Argumente angegeben, werden standardmäßig die folgenden optionalen Argumente hinzugefügt.
--log-level=INFO (verwenden Sie bei Ausführung der Pipeline im Debugmodus \"--log-level=DEBUG\"),
--recursive", + "loc.input.label.sasTokenTimeOutInMinutes": "Gültigkeitsdauer des SAS-Tokens in Minuten", + "loc.input.help.sasTokenTimeOutInMinutes": "Geben Sie die Zeit in Minuten an, nach der das SAS-Token für den Container abläuft. Dieses Token läuft standardmäßig nach 4 Stunden ab.", + "loc.input.label.enableCopyPrerequisites": "Kopiervoraussetzungen aktivieren", + "loc.input.help.enableCopyPrerequisites": "Durch das Aktivieren dieser Option wird der Listener der Windows-Remoteverwaltung (Windows Remote Management, WinRM) über das HTTPS-Protokoll an Port 5986 mithilfe eines selbstsignierten Zertifikats konfiguriert. Diese Konfiguration ist zum Ausführen des Kopiervorgangs auf Azure-Computern erforderlich. Wenn die virtuellen Zielcomputer durch Lastenausgleich gesichert werden, stellen Sie sicher, dass die Regeln für eingehenden NAT-Datenverkehr für den Zielport (5986) konfiguriert sind. Gilt nur für virtuelle ARM-Computer.", + "loc.input.label.CopyFilesInParallel": "Parallel kopieren", + "loc.input.help.CopyFilesInParallel": "Wenn diese Option auf \"True\" festgelegt ist, werden Dateien parallel auf die Zielcomputer kopiert.", + "loc.input.label.CleanTargetBeforeCopy": "Ziel bereinigen", + "loc.input.help.CleanTargetBeforeCopy": "Wenn diese Option auf \"True\" festgelegt ist, wird der Zielordner vor dem Kopieren der Dateien bereinigt.", + "loc.input.label.skipCACheck": "Testzertifikat", + "loc.input.help.skipCACheck": "Wenn diese Option ausgewählt wird, überspringt der Client die Überprüfung, ob das Serverzertifikat von einer vertrauenswürdigen Zertifizierungsstelle (CA) signiert wurde, wenn eine Verbindung über HTTPS (Hypertext Transfer Protocol über Secure Socket Layer) hergestellt wird.", + "loc.messages.AFC_StorageAccountNotFound": "Das Speicherkonto \"{0}\" wurde nicht gefunden. Die ausgewählte Dienstverbindung \"Dienstprinzipal\" unterstützt nur Speicherkonten des Azure Resource Manager-Typs.", + "loc.messages.AFC_ResourceGroupNotFound": "Die angegebene Ressourcengruppe \"{0}\" ist nicht vorhanden.", + "loc.messages.AFC_GetVMStatus": "[Azure-Aufruf]Der Status für den virtuellen Computer \"{0}\" wird abgerufen.", + "loc.messages.AFC_GetVMStatusComplete": "[Azure-Aufruf]Der Status für den virtuellen Computer \"{0}\" wurde abgerufen.", + "loc.messages.AFC_GetCustomScriptExtension": "[Azure-Aufruf]Die benutzerdefinierte Skripterweiterung \"{0}\" für den virtuellen Computer \"{1}\" wird abgerufen.", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Azure-Aufruf]Die benutzerdefinierte Skripterweiterung \"{0}\" für den virtuellen Computer \"{1}\" wurde abgerufen.", + "loc.messages.AFC_SetCustomScriptExtension": "[Azure-Aufruf]Die benutzerdefinierte Skripterweiterung \"{0}\" für den virtuellen Computer \"{1}\" wird festgelegt.", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Azure-Aufruf]Die benutzerdefinierte Skripterweiterung \"{0}\" für den virtuellen Computer \"{1}\" wird festgelegt.", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Azure-Aufruf]Die benutzerdefinierte Skripterweiterung \"{0}\" für den virtuellen Computer \"{1}\" wird entfernt.", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Azure-Aufruf]Die benutzerdefinierte Skripterweiterung \"{0}\" für den virtuellen Computer \"{1}\" wurde entfernt.", + "loc.messages.AFC_NoNetworkInterface": "[Azure-Aufruf]Es wurde keine Netzwerkschnittstelle mit der ID \"{0}\" des virtuellen Computers unter der Ressourcengruppe \"{1}\" gefunden.", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Azure-Aufruf]Der Name der Ressourcengruppe und die ID des virtuellen Computers dürfen nicht NULL oder leer sein.", + "loc.messages.AFC_AzurePSNotInstalled": "Die erforderliche Mindestversion {0} der Azure PowerShell-Cmdlets ist nicht installiert. Sie können die Anweisungen unter https://azure.microsoft.com/en-in/documentation/articles/powershell-install-configure/ befolgen, um das aktuellste Azure PowerShell-Modul abzurufen.", + "loc.messages.AFC_ClassicStorageAccountNotFound": "Das Speicherkonto \"{0}\" wurde nicht gefunden. Die ausgewählte Dienstverbindung \"Zertifikat\" unterstützt nur Speicherkonten des Typs \"Azure klassisch\".", + "loc.messages.AFC_GenericStorageAccountNotFound": "Das Speicherkonto \"{0}\" wurde nicht gefunden. Bitte geben Sie ein vorhandenes Speicherkonto an.", + "loc.messages.AFC_AzureFileCopyMoreHelp": "Weitere Informationen finden Sie unter {0}.", + "loc.messages.AFC_UploadFilesStorageAccount": "Dateien werden aus dem Quellpfad \"{0}\" in das Speicherkonto \"{1}\" im Container \"{2}\" mit dem Blobpräfix \"{3}\" hochgeladen.", + "loc.messages.AFC_UploadContainerStorageAccount": "Fehler beim Hochladen in den Container \"{0}\" im Speicherkonto \"{1}\" mit dem Blobpräfix \"{2}\": \"{3}\"", + "loc.messages.AFC_UploadFileSuccessful": "Dateien wurden aus dem Quellpfad \"{0}\" in das Speicherkonto \"{1}\" im Container \"{2}\" mit dem Blobpräfix \"{3}\" erfolgreich hochgeladen.", + "loc.messages.AFC_IncorrectTags": "Tags wurden falsch angegeben. Sie müssen das folgende Format aufweisen: \"Role:Web,DB;Location:East US;Dept.:Finance,HR\".", + "loc.messages.AFC_MachineDoesNotExist": "Die folgenden Computer sind in der Ressourcengruppe nicht vorhanden, oder ihre Namen wurde nicht richtig angegeben: {0}. Geben Sie die genauen Namen der Computer an, die in der Ressourcengruppe vorhanden sind. Verwenden Sie Kommas, um mehrere Computernamen zu trennen.", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "\"{0}\" für alle Ressourcen in der folgenden ResourceGroup können nicht abgerufen werden: \"{1}\"", + "loc.messages.AFC_MachineNameFromIdError": "\"{0}\" für \"{1}\"-Ressourcen in der folgenden ResourceGroup können nicht abgerufen werden: \"{2}\"", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "Die Ressource \"{1}\" kann mithilfe der ausgewählten Dienstverbindung \"{0}\" nicht gefunden werden. Die ausgewählte Dienstverbindung \"{0}\" unterstützt nur klassische Ressourcen (Dienstverwaltungsmodell).", + "loc.messages.AFC_NoClassicVMResources": "Unter der Ressourcengruppe \"{0}\" ist kein Computer zum Kopieren vorhanden. Die ausgewählte Dienstverbindung \"{1}\" unterstützt nur virtuelle Computer des Typs \"Azure klassisch\".", + "loc.messages.AFC_NoARMVMResources": "Unter der Ressourcengruppe \"{0}\" ist kein Computer zum Kopieren vorhanden. Die ausgewählte Dienstverbindung \"{1}\" unterstützt nur virtuelle Computer des Typs \"Azure Resource Manager\".", + "loc.messages.AFC_NoGenericVMResources": "Unter der Ressourcengruppe \"{0}\" ist kein Computer zum Kopieren vorhanden.", + "loc.messages.AFC_FilteringNoVMResources": "Unter der Ressourcengruppe ist kein Computer vorhanden: \"{0}\" mit den folgenden {1} \"{2}\".", + "loc.messages.AFC_CopyStarted": "Der Kopiervorgang wurde für den Computer gestartet: \"{0}\"", + "loc.messages.AFC_CopyCompleted": "Kopierstatus für den Computer \"{0}\": \"{1}\"", + "loc.messages.AFC_WinRMHelpMessage": "Wählen Sie zum Beheben von Problemen, die sich auf die WinRM-Dienstverbindung beziehen, die Option \"Kopiervoraussetzungen aktivieren\" in der Aufgabe aus. Wenn diese Einstellung bereits festgelegt ist und die virtuellen Zielcomputer durch einen Lastenausgleich gesichert sind, stellen Sie sicher, dass die Regeln für eingehenden NAT-Datenverkehr für den Zielport (5986) konfiguriert sind. Gilt nur für virtuelle ARM-Computer.", + "loc.messages.AFC_CopyFailed": "Fehler beim Kopieren auf dem Computer \"{0}\". Weitere Informationen finden Sie in den Protokollen.", + "loc.messages.AFC_ParallelCopyFailed": "Fehler beim Kopieren auf mindestens einen Computer. Weitere Informationen finden Sie in den Protokollen.", + "loc.messages.AFC_CopySuccessful": "Dateien wurden erfolgreich aus dem Quellpfad \"{0}\" auf virtuelle Azure-Zielcomputer in der Ressourcengruppe \"{1}\" kopiert.", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "Fehler beim Festlegen der benutzerdefinierten Skripterweiterung \"{0}\" für den virtuellen Computer \"{1}\": {2}", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "Fehler beim Hinzufügen der Netzwerksicherheitsregel: {0}", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "Die benutzerdefinierte Skripterweiterung \"{0}\" kann nicht für den virtuellen Computer \"{1}\" festgelegt werden: {2}", + "loc.messages.AFC_CopyPrereqsFailed": "Fehler beim Aktivieren der Kopiervoraussetzungen. {0}", + "loc.messages.AFC_BlobStorageNotFound": "Das Speicherkonto \"{0}\" wurde nicht gefunden. Bitte geben Sie ein vorhandenes Speicherkonto an.", + "loc.messages.AFC_RootContainerAndDirectory": "Die Option \"/S\" gilt nicht für \"$root\"-Container.", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "Der HTTP-Antwortcode \"{0}\" ist kein gültiger Umleitungsstatuscode.", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "Der Adressheader der Umleitungsantwort ist NULL.", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "\"AzCopy.exe\" wurde mit einem Exitcode ungleich null beendet, während Dateien in den Blobspeicher hochgeladen wurden.", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "Der Speicherkontoschlüssel konnte nicht abgerufen werden. Fehler: {0}", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "Deinstallieren Sie das benutzerdefinierte WinRM-Skript manuell, und wiederholen Sie die Bereitstellung.", + "loc.messages.ExpiredServicePrincipal": "Das Zugriffstoken für Azure konnte nicht abgerufen werden. Stellen Sie sicher, dass der verwendete Dienstprinzipal gültig und nicht abgelaufen ist.", + "loc.messages.UnsupportedAuthScheme": "Nicht unterstütztes Authentifizierungsschema \"{0}\" für Endpunkt.", + "loc.messages.ServicePrincipalError": "Fehler im für die Bereitstellung verwendeten Dienstprinzipal.", + "loc.messages.AzModuleNotFound": "Die Module \"Az.Accounts\" wurden nicht gefunden. Wenn das Modul vor kurzem installiert wurde, wiederholen Sie den Vorgang nach einem Neustart des Azure Pipelines-Task-Agents." +} \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Strings/resources.resjson/en-US/resources.resjson b/Tasks/AzureFileCopyV6/Strings/resources.resjson/en-US/resources.resjson new file mode 100644 index 000000000000..972283046275 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Strings/resources.resjson/en-US/resources.resjson @@ -0,0 +1,92 @@ +{ + "loc.friendlyName": "Azure file copy", + "loc.helpMarkDown": "[Learn more about this task](https://aka.ms/azurefilecopyreadme) and to report any issues with this new version of the task [here](https://github.com/microsoft/azure-pipelines-tasks/issues/new?assignees=&labels=regression%2Cbug&projects=&template=1.regression.yml&title=%5BREGRESSION%5D%3A+)", + "loc.description": "Copy files to Azure Blob Storage or virtual machines", + "loc.instanceNameFormat": "$(Destination) File Copy", + "loc.releaseNotes": "What's new in Version 6.0:
   Support Workload identity federation and [Azure RBAC](https://learn.microsoft.com/en-us/azure/storage/blobs/assign-azure-role-data-access?tabs=portal)", + "loc.input.label.SourcePath": "Source", + "loc.input.help.SourcePath": "Absolute path of the source folder, or file on the local machine, or a UNC share. Expression should return a single folder or a file. Wild card symbol (*) is supported anywhere in the file path or file name.", + "loc.input.label.ConnectedServiceNameARM": "Azure Subscription", + "loc.input.help.ConnectedServiceNameARM": "Azure Resource Manager subscription to target for copying the files.", + "loc.input.label.Destination": "Destination Type", + "loc.input.help.Destination": "Select the destination, either Azure Blob or Azure VMs.", + "loc.input.label.StorageAccountRM": "RM Storage Account", + "loc.input.help.StorageAccountRM": "Specify a pre-existing ARM storage account. It is also used as an intermediary for copying files to Azure VMs", + "loc.input.label.ContainerName": "Container Name", + "loc.input.help.ContainerName": "Name of the Container for uploading the files. If a container with the given name does not exist in the specified storage account, it will automatically be created.
If you need to create a virtual directory inside the container, use the blob prefix input below.
Example: If your target location is https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/, then specify mycontainer as container name and vd1/vd2/ as blob prefix.", + "loc.input.label.BlobPrefix": "Blob Prefix", + "loc.input.help.BlobPrefix": "Useful for filtering files, for example, append build number to all the blobs to download files from that build only. Example: If you specify blob prefix as myvd1/, a virtual directory with this name will be created inside the container. Blob prefix with a trailing '/' will be considered a virtual directory. Otherwise, it will be treated as a file, unless the item being copied is itself a folder. The source files will be copied to https://myaccount.blob.core.windows.net/mycontainer/myvd1/.", + "loc.input.label.EnvironmentNameRM": "Resource Group", + "loc.input.help.EnvironmentNameRM": "Name of the target Resource Group for copying files to.", + "loc.input.label.ResourceFilteringMethod": "Select Machines By", + "loc.input.help.ResourceFilteringMethod": "Optionally, select a subset of VMs in resource group either by providing VMs host name or tags. [Tags](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/) are supported for resources created via the Azure Resource Manager only.", + "loc.input.label.MachineNames": "Filter Criteria", + "loc.input.help.MachineNames": "Provide a list of VMs host name like ffweb, ffdb, or tags like Role:DB, Web; OS:Win8.1. Note the delimiters used for tags are ,(comma), :(colon) and ;(semicolon). If multiple tags are provided, then the task will run in all the VMs with the specified tags. The default is to run the task in all the VMs.", + "loc.input.label.vmsAdminUserName": "Admin Login", + "loc.input.help.vmsAdminUserName": "Administrator Username of the VMs.", + "loc.input.label.vmsAdminPassword": "Password", + "loc.input.help.vmsAdminPassword": "The administrator password of the VMs.
It can accept variable defined in build or release pipelines as '$(passwordVariable)'.
You may mark variable as 'secret' to secure it.", + "loc.input.label.TargetPath": "Destination Folder", + "loc.input.help.TargetPath": "Local path on the target machines for copying the files from the source. Environment variable can be used like $env:windir\\BudgetIT\\Web.", + "loc.input.label.AdditionalArgumentsForBlobCopy": "Optional Arguments (for uploading files to blob)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "Optional AzCopy.exe arguments that will be applied when uploading to blob like, --check-length=true. If no optional arguments are specified here, the following optional arguments will be added by default.
--log-level=INFO (if the pipeline is running in debug mode set --log-level=DEBUG),
--recursive (only if container name is not $root),
--blob-type=PageBlob (only if specified storage account is a premium account).", + "loc.input.label.AdditionalArgumentsForVMCopy": "Optional Arguments (for downloading files to VM)", + "loc.input.help.AdditionalArgumentsForVMCopy": "Optional AzCopy.exe arguments that will be applied when downloading to VM like, --check-length=true. If no optional arguments are specified here, the following optional arguments will be added by default.
--log-level=INFO (if the pipeline is running in debug mode set --log-level=DEBUG),
--recursive", + "loc.input.label.enableCopyPrerequisites": "Enable Copy Prerequisites", + "loc.input.help.enableCopyPrerequisites": "Enabling this option configures Windows Remote Management (WinRM) listener over HTTPS protocol on port 5986, using a self-signed certificate. This configuration is required for performing copy operation on Azure machines. If the target Virtual Machines are backed by a Load balancer, ensure Inbound NAT rules are configured for target port (5986). Applicable only for ARM VMs.", + "loc.input.label.CopyFilesInParallel": "Copy in Parallel", + "loc.input.help.CopyFilesInParallel": "Setting it to true will copy files in parallel to the target machines.", + "loc.input.label.CleanTargetBeforeCopy": "Clean Target", + "loc.input.help.CleanTargetBeforeCopy": "Setting it to true will clean-up the destination folder before copying the files.", + "loc.input.label.skipCACheck": "Test Certificate", + "loc.input.help.skipCACheck": "If this option is selected, client skips the validation that the server certificate is signed by a trusted certificate authority (CA) when connecting over Hypertext Transfer Protocol over Secure Socket Layer (HTTPS).", + "loc.messages.AFC_StorageAccountNotFound": "Storage account: {0} not found. The selected service connection 'Service Principal' supports storage accounts of Azure Resource Manager type only.", + "loc.messages.AFC_ResourceGroupNotFound": "Provided resource group '{0}' does not exist.", + "loc.messages.AFC_GetVMStatus": "[Azure Call]Getting the status for vm '{0}'", + "loc.messages.AFC_GetVMStatusComplete": "[Azure Call]Got the status for vm '{0}'", + "loc.messages.AFC_GetCustomScriptExtension": "[Azure Call]Getting the custom script extension '{0}' for vm '{1}'", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Azure Call]Got the custom script extension '{0}' for vm '{1}'", + "loc.messages.AFC_SetCustomScriptExtension": "[Azure Call]Setting the custom script extension '{0}' for vm '{1}'", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Azure Call]Set the custom script extension '{0}' for vm '{1}'", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Azure Call]Removing the custom script extension '{0}' for vm '{1}'", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Azure Call]Removed the custom script extension '{0}' for vm '{1}'", + "loc.messages.AFC_NoNetworkInterface": "[Azure Call]No network interface found with virtual machine ID {0} under resource group {1}", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Azure Call]Resource group name and virtual machine ID should not be null or empty", + "loc.messages.AFC_AzurePSNotInstalled": "The required minimum version {0} of the Azure Powershell Cmdlets are not installed. You can follow the instructions at https://azure.microsoft.com/en-in/documentation/articles/powershell-install-configure/ to get the latest Azure powershell", + "loc.messages.AFC_ClassicStorageAccountNotFound": "Storage account: {0} not found. The selected service connection 'Certificate' supports storage accounts of Azure Classic type only.", + "loc.messages.AFC_GenericStorageAccountNotFound": "Storage account: {0} not found. Please specify existing storage account", + "loc.messages.AFC_AzureFileCopyMoreHelp": "For more info please refer to {0}", + "loc.messages.AFC_UploadFilesStorageAccount": "Uploading files from source path: '{0}' to storage account: '{1}' in container: '{2}' with blob prefix: '{3}'", + "loc.messages.AFC_UploadContainerStorageAccount": "Upload to container: '{0}' in storage account: '{1}' with blob prefix: '{2}' failed with error: '{3}'", + "loc.messages.AFC_UploadFileSuccessful": "Uploaded files successfully from source path: '{0}' to storage account: '{1}' in container: '{2}' with blob prefix: '{3}'", + "loc.messages.AFC_IncorrectTags": "Tags have been incorrectly specified. They have to be in the format Role:Web,DB;Location:East US;Dept.:Finance,HR", + "loc.messages.AFC_MachineDoesNotExist": "The following machines either do not exist in the resource group or their names have not been specified correctly: {0}. Provide the exact same machine names present in the resource group. Use comma to separate multiple machine names.", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "Unable to get {0} for all resources in ResourceGroup : '{1}'", + "loc.messages.AFC_MachineNameFromIdError": "Unable to get {0} for '{1}' resources in ResourceGroup : '{2}'", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "Unable to find the resource '{1}' using selected service connection '{0}'. Selected service connection '{0}' supports classic resources only (Service Management model).", + "loc.messages.AFC_NoClassicVMResources": "No machine exists under resource group: '{0}' for copy. Selected service connection '{1}' supports Virtual Machines of Azure Classic type only.", + "loc.messages.AFC_NoARMVMResources": "No machine exists under resource group: '{0}' for copy. Selected service connection '{1}' supports Virtual Machines of Azure Resource Manager type only.", + "loc.messages.AFC_NoGenericVMResources": "No machine exists under resource group: '{0}' for copy.", + "loc.messages.AFC_FilteringNoVMResources": "No machine exists under resource group: '{0}' with the following {1} '{2}'.", + "loc.messages.AFC_CopyStarted": "Copy started for machine: '{0}'", + "loc.messages.AFC_CopyCompleted": "Copy status for machine '{0}' : '{1}'", + "loc.messages.AFC_WinRMHelpMessage": "To fix WinRM service connection related issues, select the 'Enable Copy Prerequisites' option in the task. If set already, and the target Virtual Machines are backed by a Load balancer, ensure Inbound NAT rules are configured for target port (5986). Applicable only for ARM VMs.", + "loc.messages.AFC_CopyFailed": "Copy failed on machine '{0}'. Refer logs for more details.", + "loc.messages.AFC_ParallelCopyFailed": "Copy to one or more machines failed. Refer logs for more details.", + "loc.messages.AFC_CopySuccessful": "Copied files from source path: '{0}' to target azure VMs in resource group: '{1}' successfully", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "Setting the custom script extension '{0}' for virtual machine '{1}' failed with error : {2}", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "Failed to add the network security rule: {0}", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "Unable to set the custom script extension '{0}' for virtual machine '{1}': {2}", + "loc.messages.AFC_CopyPrereqsFailed": "Failed to enable copy prerequisites. {0}", + "loc.messages.AFC_BlobStorageNotFound": "Storage account: {0} not found. Please specify existing storage account", + "loc.messages.AFC_RootContainerAndDirectory": "'/S' option is not valid for $root containers.", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "The HTTP response code: '{0}' is not a valid redirect status code", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "Redirect response location header is null.", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "AzCopy.exe exited with non-zero exit code while uploading files to blob storage.", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "Unable to fetch storage account key. Error: '{0}'", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "Uninstall WinRM custom script manually and retry deployment.", + "loc.messages.ExpiredServicePrincipal": "Could not fetch access token for Azure. Verify if the Service Principal used is valid and not expired.", + "loc.messages.UnsupportedAuthScheme": "Unsupported authentication scheme '{0}' for endpoint.", + "loc.messages.ServicePrincipalError": "There was an error with the service principal used for the deployment.", + "loc.messages.AzModuleNotFound": "Could not find the modules: 'Az.Accounts'. If the module was recently installed, retry after restarting the Azure Pipelines task agent." +} \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Strings/resources.resjson/es-ES/resources.resjson b/Tasks/AzureFileCopyV6/Strings/resources.resjson/es-ES/resources.resjson new file mode 100644 index 000000000000..30ba52347712 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Strings/resources.resjson/es-ES/resources.resjson @@ -0,0 +1,94 @@ +{ + "loc.friendlyName": "Copia de archivos de Azure", + "loc.helpMarkDown": "[Obtener más información acerca de esta tarea](https://aka.ms/azurefilecopyreadme)", + "loc.description": "Copiar archivos en Azure Blob Storage o en máquinas virtuales", + "loc.instanceNameFormat": "Copia de archivo $(Destination)", + "loc.releaseNotes": "Novedades de la versión 5.0:
   Compatibilidad con AzCopy.exe versión 10.12.2", + "loc.input.label.SourcePath": "Origen", + "loc.input.help.SourcePath": "Ruta de acceso absoluta de la carpeta de origen, archivo en la máquina local o recurso compartido UNC. La expresión debe devolver un único archivo o carpeta. El uso del símbolo de comodín (*) se admite en cualquier parte de la ruta de acceso del archivo o del nombre de este.", + "loc.input.label.ConnectedServiceNameARM": "Suscripción a Azure", + "loc.input.help.ConnectedServiceNameARM": "Suscripción de Azure Resource Manager de destino para la copia de los archivos.", + "loc.input.label.Destination": "Tipo de destino", + "loc.input.help.Destination": "Seleccione un destino, ya sea un blob de Azure o máquinas virtuales de Azure.", + "loc.input.label.StorageAccountRM": "Cuenta de almacenamiento del Administrador de recursos", + "loc.input.help.StorageAccountRM": "Especifique una cuenta de almacenamiento de ARM preexistente. Se utiliza también como agente intermedio para copiar archivos a máquinas virtuales de Azure.", + "loc.input.label.ContainerName": "Nombre del contenedor", + "loc.input.help.ContainerName": "Nombre del contenedor para cargar los archivos. Si no existe un contenedor con el nombre especificado en la cuenta de almacenamiento especificada, se creará automáticamente.
Si necesita crear un directorio virtual dentro del contenedor, use la entrada de prefijo de blob siguiente.
Ejemplo: Si la ubicación de destino es https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/, especifique mycontainer como nombre de contenedor y vd1/vd2/ como prefijo de blob.", + "loc.input.label.BlobPrefix": "Prefijo de blob", + "loc.input.help.BlobPrefix": "Es útil para filtrar archivos, por ejemplo, anexar el número de compilación a todos los blobs para descargar solo los archivos de esa compilación. Ejemplo: Si especifica el prefijo de blob como myvd1/, se creará un directorio virtual con este nombre dentro del contenedor. El prefijo de blob con un \"/\" final se considerará un directorio virtual. De lo contrario, se tratará como un archivo, a menos que el elemento que se copia sea en sí una carpeta. Los archivos de origen se copiarán en https://myaccount.blob.core.windows.net/mycontainer/myvd1/.", + "loc.input.label.EnvironmentNameRM": "Grupo de recursos", + "loc.input.help.EnvironmentNameRM": "Nombre del Grupo de recursos de destino en el que copiar los archivos.", + "loc.input.label.ResourceFilteringMethod": "Seleccionar máquinas por", + "loc.input.help.ResourceFilteringMethod": "También puede seleccionar un subconjunto de máquinas virtuales del grupo de recursos si proporciona las etiquetas o el nombre de host de las máquinas virtuales. Las [etiquetas](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/) solo son compatibles con los recursos creados mediante Azure Resource Manager.", + "loc.input.label.MachineNames": "Criterios de filtro", + "loc.input.help.MachineNames": "Proporcione una lista de nombres de host de las máquinas virtuales, como ffweb o ffdb, o etiquetas, como Role:DB, Web; OS:Win8.1. Tenga en cuenta que los delimitadores usados para las etiquetas son ,(coma), :(dos puntos) y ;(punto y coma). Si se proporcionan varias etiquetas, la tarea se ejecutará en todas las máquinas virtuales que tengan las etiquetas especificadas. La opción predeterminada es ejecutar la tarea en todas las máquinas virtuales.", + "loc.input.label.vmsAdminUserName": "Inicio de sesión del administrador", + "loc.input.help.vmsAdminUserName": "Nombre de usuario del administrador de las máquinas virtuales.", + "loc.input.label.vmsAdminPassword": "Contraseña", + "loc.input.help.vmsAdminPassword": "La contraseña del administrador de las máquinas virtuales.
Puede aceptar una variable definida en las canalizaciones de compilación o versión como '$(passwordVariable)'.
Marque el tipo de variable como 'secret' para protegerlo.", + "loc.input.label.TargetPath": "Carpeta de destino", + "loc.input.help.TargetPath": "La ruta de acceso local de las máquinas de destino para copiar los archivos del origen. Puede usarse una variable de entorno, por ejemplo, $env:windir\\BudgetIT\\Web.", + "loc.input.label.AdditionalArgumentsForBlobCopy": "Argumentos opcionales (para cargar archivos en el blob)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "Argumentos opcionales de AzCopy.exe que se aplicarán al cargar en blob, como --check-length=true. Si no se especifican argumentos opcionales aquí, se agregarán los siguientes de forma predeterminada.
--log-level=INFO (si la canalización se ejecuta en modo de depuración, establezca --log-level=DEBUG);
--recursive (solo si el nombre del contenedor no es $root);
--blob-type=PageBlob (solo si la cuenta de almacenamiento especificada es una cuenta Premium)", + "loc.input.label.AdditionalArgumentsForVMCopy": "Argumentos opcionales (para descargar archivos en la máquina virtual)", + "loc.input.help.AdditionalArgumentsForVMCopy": "Argumentos opcionales de AzCopy.exe que se aplicarán al descargar en una instancia de VM, como --check-length=true. Si no se especifican argumentos opcionales aquí, se agregarán los siguientes de forma predeterminada.
--log-level=INFO (si la canalización se ejecuta en modo de depuración, establezca --log-level=DEBUG);
--recursive", + "loc.input.label.sasTokenTimeOutInMinutes": "Período de expiración del token de SAS en minutos", + "loc.input.help.sasTokenTimeOutInMinutes": "Especifique el tiempo, en minutos, transcurrido el cual expirará el token de SAS del contenedor. De forma predeterminada, este token expira después de 4 horas.", + "loc.input.label.enableCopyPrerequisites": "Habilitar los requisitos previos de copia", + "loc.input.help.enableCopyPrerequisites": "Al habilitar esta opción, se configura el agente de escucha de Administración remota de Windows (WinRM) a través del protocolo HTTPS en el puerto 5986, mediante un certificado autofirmado. Esta configuración es necesaria para realizar operaciones de copia en máquinas de Azure. Si las máquinas virtuales de destino están respaldadas por un equilibrador de carga, asegúrese de que haya reglas NAT de entrada configuradas para el puerto de destino (5986). Solo se aplica a máquinas virtuales de ARM.", + "loc.input.label.CopyFilesInParallel": "Copiar en paralelo", + "loc.input.help.CopyFilesInParallel": "Si se establece en true, copiará los archivos en paralelo en las máquinas de destino.", + "loc.input.label.CleanTargetBeforeCopy": "Limpiar destino", + "loc.input.help.CleanTargetBeforeCopy": "Si se establece en true, limpiará la carpeta de destino antes de copiar los archivos.", + "loc.input.label.skipCACheck": "Certificado de prueba", + "loc.input.help.skipCACheck": "Si esta opción está seleccionada, el cliente omite la validación relativa a si el certificado del servidor está firmado por una entidad de certificación de confianza al conectar a través del Protocolo de transferencia de hipertexto con cifrado de Capa de sockets seguros (HTTPS).", + "loc.messages.AFC_StorageAccountNotFound": "No se encontró la cuenta de almacenamiento {0}. La conexión de servicio seleccionada 'Entidad de servicio' admite solo cuentas de almacenamiento del tipo Azure Resource Manager.", + "loc.messages.AFC_ResourceGroupNotFound": "El grupo de recursos proporcionado '{0}' no existe.", + "loc.messages.AFC_GetVMStatus": "[Llamada de Azure] Obteniendo el estado de la máquina virtual '{0}'", + "loc.messages.AFC_GetVMStatusComplete": "[Llamada de Azure] Se ha obtenido el estado de la máquina virtual '{0}'", + "loc.messages.AFC_GetCustomScriptExtension": "[Llamada de Azure] Obteniendo la extensión de script personalizado '{0}' para la máquina virtual '{1}'", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Llamada de Azure] Se ha obtenido la extensión de script personalizado '{0}' para la máquina virtual '{1}'", + "loc.messages.AFC_SetCustomScriptExtension": "[Llamada de Azure] Estableciendo la extensión de script personalizado '{0}' para la máquina virtual '{1}'", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Llamada de Azure] Establecer la extensión de script personalizado '{0}' para la máquina virtual '{1}'", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Llamada de Azure] Quitando la extensión de script personalizado '{0}' para la máquina virtual '{1}'", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Llamada de Azure]Se ha quitado la extensión de script personalizado '{0}' para la máquina virtual '{1}'", + "loc.messages.AFC_NoNetworkInterface": "[Llamada de Azure] No se encontró ninguna interfaz de red con el identificador de máquina virtual {0} en el grupo de recursos {1}", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Llamada de Azure] El nombre del grupo de recursos y el id. de máquina virtual no deben ser un valor nulo ni quedarse vacíos", + "loc.messages.AFC_AzurePSNotInstalled": "No está instalada la versión mínima requerida {0} de los cmdlets de Azure PowerShell. Puede seguir las instrucciones de https://azure.microsoft.com/en-in/documentation/articles/powershell-install-configure/ para obtener la versión más reciente de Azure PowerShell", + "loc.messages.AFC_ClassicStorageAccountNotFound": "No se encontró la cuenta de almacenamiento {0}. La conexión de servicio seleccionada 'Certificate' admite solo cuentas de almacenamiento del tipo Azure clásico.", + "loc.messages.AFC_GenericStorageAccountNotFound": "No se encontró la cuenta de almacenamiento: {0}. Especifique una cuenta de almacenamiento existente.", + "loc.messages.AFC_AzureFileCopyMoreHelp": "Para más información, consulte {0}", + "loc.messages.AFC_UploadFilesStorageAccount": "Cargando archivos de la ruta de acceso de origen '{0}' en el contenedor '{1}' de la cuenta de almacenamiento '{2}' con el prefijo de blob '{3}'", + "loc.messages.AFC_UploadContainerStorageAccount": "No se pudo realizar la carga en el contenedor '{0}' de la cuenta de almacenamiento '{1}' con el prefijo de blob '{2}' debido al siguiente error: '{3}'", + "loc.messages.AFC_UploadFileSuccessful": "Los archivos se cargaron correctamente de la ruta de acceso de origen '{0}' a la cuenta de almacenamiento '{1}' en el contenedor '{2}' con el prefijo de blob '{3}'", + "loc.messages.AFC_IncorrectTags": "Las etiquetas se han especificado incorrectamente. Tienen que estar en el formato Role:Web,DB;Location:East US;Dept.:Finance,HR", + "loc.messages.AFC_MachineDoesNotExist": "Las siguientes máquinas no existen en el grupo de recursos o sus nombres no se han especificado correctamente: {0}. Especifique los nombres exactos de las máquinas tal como están en el grupo de recursos, separados por comas.", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "No se pueden obtener {0} para todos los recursos de ResourceGroup: '{1}'", + "loc.messages.AFC_MachineNameFromIdError": "No se puede obtener {0} para '{1}' recursos en ResourceGroup: '{2}'", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "No se encuentra el recurso '{1}' mediante la conexión de servicio seleccionada '{0}'. La conexión de servicio seleccionada '{0}' solo admite recursos clásicos (modelo de administración de servicios).", + "loc.messages.AFC_NoClassicVMResources": "No hay ninguna máquina en el grupo de recursos '{0}' para copiar. La conexión de servicio '{1}' seleccionada admite solo máquinas virtuales de tipo Azure clásico.", + "loc.messages.AFC_NoARMVMResources": "No hay ninguna máquina en el grupo de recursos '{0}' para copiar. La conexión de servicio '{1}' seleccionada admite solo máquinas virtuales de tipo Azure Resource Manager.", + "loc.messages.AFC_NoGenericVMResources": "No existe ninguna máquina en el grupo de recursos: '{0}' para la copia.", + "loc.messages.AFC_FilteringNoVMResources": "No existe ninguna máquina en el grupo de recursos: '{0}' con el siguiente {1} '{2}'.", + "loc.messages.AFC_CopyStarted": "Copia iniciada para la máquina: '{0}'", + "loc.messages.AFC_CopyCompleted": "Estado de copia de la máquina '{0}': '{1}'", + "loc.messages.AFC_WinRMHelpMessage": "Para solucionar problemas relacionados con la conexión de servicio de WinRM, seleccione la opción 'Habilitar los requisitos previos de copia' en la tarea. Si ya están establecidos, y las máquinas virtuales de destino están respaldadas por un equilibrador de carga, asegúrese de que las reglas NAT de entrada están configuradas para el puerto de destino (5986). Solo es aplicable a las máquinas virtuales de ARM.", + "loc.messages.AFC_CopyFailed": "No se pudo copiar en la máquina '{0}'. Consulte los registros para obtener más detalles.", + "loc.messages.AFC_ParallelCopyFailed": "No se pudo copiar en una o varias máquinas. Consulte los registros para obtener más detalles.", + "loc.messages.AFC_CopySuccessful": "Archivos copiados correctamente desde la ruta de origen '{0}' a las máquinas virtuales de Azure de destino en el grupo de recursos: '{1}'", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "No se pudo establecer la extensión de script personalizado '{0}' para la máquina virtual '{1}'. Error: {2}", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "No se pudo agregar la regla de seguridad de red: {0}", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "No se puede establecer la extensión de script personalizado '{0}' para la máquina virtual '{1}': {2}", + "loc.messages.AFC_CopyPrereqsFailed": "No se pudieron habilitar los requisitos previos de copia. {0}", + "loc.messages.AFC_BlobStorageNotFound": "No se encontró la cuenta de almacenamiento: {0}. Especifique una cuenta de almacenamiento existente.", + "loc.messages.AFC_RootContainerAndDirectory": "La opción '/S' no es válida para contenedores de $root.", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "El código de respuesta HTTP '{0}' no es un código de estado de redireccionamiento válido", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "El encabezado de ubicación de la respuesta de redireccionamiento es NULL.", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "AzCopy.exe terminó con el código de salida distinto de cero al cargar archivos en el almacenamiento de blobs.", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "No se puede recuperar la clave de la cuenta de almacenamiento. Error: '{0}'", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "Desinstale el script personalizado de WinRM de forma manual y reintente la implementación.", + "loc.messages.ExpiredServicePrincipal": "No se pudo capturar el token de acceso de Azure. Compruebe que la entidad de servicio usada es válida y no ha expirado.", + "loc.messages.UnsupportedAuthScheme": "Esquema de autenticación no admitido '{0}' para el punto de conexión.", + "loc.messages.ServicePrincipalError": "Error con la entidad de servicio que se usó para la implementación.", + "loc.messages.AzModuleNotFound": "No se pudieron encontrar los módulos: 'Az.Accounts'. Si el módulo se instaló recientemente, vuelva a intentarlo después de reiniciar el agente de tareas de Azure Pipelines." +} \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Strings/resources.resjson/fr-FR/resources.resjson b/Tasks/AzureFileCopyV6/Strings/resources.resjson/fr-FR/resources.resjson new file mode 100644 index 000000000000..c4cb43f509da --- /dev/null +++ b/Tasks/AzureFileCopyV6/Strings/resources.resjson/fr-FR/resources.resjson @@ -0,0 +1,94 @@ +{ + "loc.friendlyName": "Copie de fichiers Azure", + "loc.helpMarkDown": "[En savoir plus sur cette tâche](https://aka.ms/azurefilecopyreadme)", + "loc.description": "Copier des fichiers sur le Stockage Blob Azure ou des machines virtuelles", + "loc.instanceNameFormat": "Copie de fichiers $(Destination)", + "loc.releaseNotes": "Nouveautés de la version 5.0 :
   Prise en charge d'AzCopy.exe version 10.12.2", + "loc.input.label.SourcePath": "Source", + "loc.input.help.SourcePath": "Chemin absolu du dossier ou fichier source sur la machine locale, ou partage UNC. L'expression doit retourner un seul dossier ou fichier. Le symbole de caractère générique (*) est pris en charge n'importe où dans le chemin ou le nom de fichier.", + "loc.input.label.ConnectedServiceNameARM": "Abonnement Azure", + "loc.input.help.ConnectedServiceNameARM": "Abonnement Azure Resource Manager à cibler pour la copie des fichiers.", + "loc.input.label.Destination": "Type de destination", + "loc.input.help.Destination": "Sélectionnez la destination, objet blob ou machines virtuelles Azure.", + "loc.input.label.StorageAccountRM": "Compte de stockage RM", + "loc.input.help.StorageAccountRM": "Spécifiez un compte de stockage ARM préexistant. Il sert également d'intermédiaire pour la copie de fichiers vers des machines virtuelles Azure", + "loc.input.label.ContainerName": "Nom du conteneur", + "loc.input.help.ContainerName": "Nom du conteneur pour le chargement des fichiers. Si un conteneur portant le nom indiqué n'existe pas dans le compte de stockage spécifié, il est automatiquement créé.
Si vous devez créer un répertoire virtuel dans le conteneur, utilisez l'entrée de préfixe d'objet blob ci-dessous.
Exemple : Si votre emplacement cible est https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/, spécifiez mycontainer comme nom de conteneur et vd1/vd2 comme préfixe d’objet blob.", + "loc.input.label.BlobPrefix": "Préfixe d’objet blob", + "loc.input.help.BlobPrefix": "Utile pour filtrer les fichiers, par exemple, ajouter le numéro de build à tous les objets blob pour télécharger les fichiers à partir de cette build uniquement. Exemple : si vous spécifiez le préfixe d’objet blob myvd1/, un répertoire virtuel portant ce nom est créé dans le conteneur. Le préfixe d’objet blob avec un '/' de fin sera considéré comme un répertoire virtuel. Sinon, il sera traité comme un fichier, sauf si l’élément en cours de copie est lui-même un dossier. Les fichiers sources seront copiés dans https://myaccount.blob.core.windows.net/mycontainer/myvd1/.", + "loc.input.label.EnvironmentNameRM": "Groupe de ressources", + "loc.input.help.EnvironmentNameRM": "Nom du groupe de ressources cible où copier les fichiers.", + "loc.input.label.ResourceFilteringMethod": "Sélectionner les machines par", + "loc.input.help.ResourceFilteringMethod": "Vous pouvez également sélectionner un sous-ensemble de machines virtuelles dans le groupe de ressources, en indiquant les noms d’hôtes ou les balises des machines virtuelles. Les [balises](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/) sont prises en charge pour les ressources créées via Azure Resource Manager uniquement.", + "loc.input.label.MachineNames": "Critères de filtre", + "loc.input.help.MachineNames": "Indiquez une liste de noms d'hôtes de machines virtuelles, par exemple ffweb, ffdb, ou des balises telles que Role:DB, Web; OS:Win8.1. Notez que les délimiteurs employés pour les balises sont ,(virgule), :(deux-points) et ;(point-virgule). Si plusieurs balises sont fournies, la tâche s'exécute sur toutes les machines virtuelles correspondant aux balises spécifiées. Par défaut, la tâche s'exécute sur toutes les machines virtuelles.", + "loc.input.label.vmsAdminUserName": "Connexion d'administrateur", + "loc.input.help.vmsAdminUserName": "Nom d'utilisateur d'administrateur des machines virtuelles.", + "loc.input.label.vmsAdminPassword": "Mot de passe", + "loc.input.help.vmsAdminPassword": "Mot de passe d'administrateur des machines virtuelles.
Il peut accepter une variable définie dans les pipelines de build ou de mise en production sous la forme '$(passwordVariable)'.
Vous pouvez marquer la variable comme étant de type 'secret' pour la sécuriser.", + "loc.input.label.TargetPath": "Dossier de destination", + "loc.input.help.TargetPath": "Chemin d'accès local sur les machines cibles pour la copie des fichiers à partir de la source. Une variable d'environnement peut être utilisée, par ex., $env:windir\\BudgetIT\\Web.", + "loc.input.label.AdditionalArgumentsForBlobCopy": "Arguments facultatifs (pour le chargement des fichiers vers un objet blob)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "Arguments AzCopy.exe facultatifs copiés durant le chargement dans l'objet blob, par exemple --check-length=true. Si aucun argument facultatif n'est spécifié ici, les arguments facultatifs suivants sont ajoutés par défaut.
--log-level=INFO (si le pipeline s'exécute en mode de débogage défini --log-level=DEBUG),
--recursive (uniquement si le nom du conteneur n'est pas $root),
--blob-type=PageBlob (uniquement si le compte de stockage spécifié est un compte premium).", + "loc.input.label.AdditionalArgumentsForVMCopy": "Arguments facultatifs (pour le téléchargement des fichiers sur une machine virtuelle)", + "loc.input.help.AdditionalArgumentsForVMCopy": "Arguments AzCopy.exe facultatifs appliqués durant le téléchargement sur une machine virtuelle, par exemple --check-length=true. Si aucun argument facultatif n'est spécifié ici, les arguments facultatifs suivants sont ajoutés par défaut.
--log-level=INFO (si le pipeline s'exécute en mode de débogage défini --log-level=DEBUG),
--recursive", + "loc.input.label.sasTokenTimeOutInMinutes": "Délai d'expiration du jeton SAP en minutes", + "loc.input.help.sasTokenTimeOutInMinutes": "Indiquez la durée en minutes à partir de laquelle le jeton SAS du conteneur doit expirer. Par défaut, ce jeton expire au bout de 4 heures.", + "loc.input.label.enableCopyPrerequisites": "Activer les conditions préalables à la copie", + "loc.input.help.enableCopyPrerequisites": "L'activation de cette option configure l'écouteur Windows Remote Management (WinRM) via le protocole HTTPS sur le port 5986, à l'aide d'un certificat auto-signé. Cette configuration est obligatoire pour effectuer une opération de copie sur des machines Azure. Si les machines virtuelles cibles sont associées à un équilibreur de charge, vérifiez que des règles NAT de trafic entrant sont configurées pour le port cible (5986). S'applique uniquement aux machines virtuelles ARM.", + "loc.input.label.CopyFilesInParallel": "Copier en parallèle", + "loc.input.help.CopyFilesInParallel": "Si la valeur est true, les fichiers sont copiés en parallèle sur les machines cibles.", + "loc.input.label.CleanTargetBeforeCopy": "Nettoyer la cible", + "loc.input.help.CleanTargetBeforeCopy": "Si la valeur est true, le dossier de destination est nettoyé avant la copie des fichiers.", + "loc.input.label.skipCACheck": "Certificat de test", + "loc.input.help.skipCACheck": "Si cette option est sélectionnée, le client ignore la validation permettant de vérifier que le certificat du serveur est signé par une autorité de certification approuvée lors de la connexion via HTTP ou Secure Socket Layer (HTTPS).", + "loc.messages.AFC_StorageAccountNotFound": "Le compte de stockage {0} est introuvable. La connexion de service sélectionnée, 'Principal du service', prend uniquement en charge les comptes de stockage de type Azure Resource Manager.", + "loc.messages.AFC_ResourceGroupNotFound": "Le groupe de ressources indiqué '{0}' n'existe pas.", + "loc.messages.AFC_GetVMStatus": "[Appel Azure]Obtention de l'état de la machine virtuelle '{0}'", + "loc.messages.AFC_GetVMStatusComplete": "[Appel Azure]Obtention de l'état de la machine virtuelle '{0}'", + "loc.messages.AFC_GetCustomScriptExtension": "[Appel Azure]Obtention de l'extension de script personnalisé '{0}' pour la machine virtuelle '{1}'", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Appel Azure]Obtention réussie de l'extension de script personnalisé '{1}' pour la machine virtuelle '{0}'", + "loc.messages.AFC_SetCustomScriptExtension": "[Appel Azure]Définition de l'extension de script personnalisé '{0}' pour la machine virtuelle '{1}'", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Appel Azure]Définition de l'extension de script personnalisé '{0}' pour la machine virtuelle '{1}'", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Appel Azure]Suppression de l'extension de script personnalisé '{0}' pour la machine virtuelle '{1}'", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Appel Azure]Suppression réussie de l'extension de script personnalisé '{0}' pour la machine virtuelle '{1}'", + "loc.messages.AFC_NoNetworkInterface": "[Appel Azure]Interface réseau introuvable pour l'ID de machine virtuelle {0} dans le groupe de ressources {1}", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Appel Azure]Le nom du groupe de ressources et l'ID de machine virtuelle ne doivent pas avoir la valeur nul ou être vides", + "loc.messages.AFC_AzurePSNotInstalled": "La version minimale nécessaire {0} pour les applets de commande Azure PowerShell n'est pas installée. Vous pouvez suivre les instructions fournies sur https://azure.microsoft.com/fr-fr/documentation/articles/powershell-install-configure/ pour obtenir la dernière version d'Azure PowerShell", + "loc.messages.AFC_ClassicStorageAccountNotFound": "Le compte de stockage {0} est introuvable. La connexion de service sélectionnée, 'Certificat', prend uniquement en charge les comptes de stockage de type Azure Classic.", + "loc.messages.AFC_GenericStorageAccountNotFound": "Le compte de stockage {0} est introuvable. Spécifiez un compte de stockage existant", + "loc.messages.AFC_AzureFileCopyMoreHelp": "Pour plus d'informations, consultez {0}", + "loc.messages.AFC_UploadFilesStorageAccount": "Chargement des fichiers à partir du chemin source '{0}' vers le compte de stockage '{1}' dans le conteneur '{2}' ayant pour préfixe blob '{3}'", + "loc.messages.AFC_UploadContainerStorageAccount": "Échec du chargement vers le conteneur '{0}' dans le compte de stockage '{1}' ayant pour préfixe blob '{2}'. Erreur : '{3}'", + "loc.messages.AFC_UploadFileSuccessful": "Les fichiers ont été chargés correctement du chemin source '{0}' vers le compte de stockage '{1}' dans le conteneur '{2}' ayant pour préfixe blob '{3}'", + "loc.messages.AFC_IncorrectTags": "Les étiquettes ont été spécifiées de manière incorrecte. Elles doivent être au format Role:Web,DB;Location:East US;Dept.:Finance,HR", + "loc.messages.AFC_MachineDoesNotExist": "Les machines suivantes n'existent pas dans le groupe de ressources, ou leurs noms n'ont pas été spécifiés correctement : {0}. Indiquez le nom exact des machines présentes dans le groupe de ressources. Utilisez une virgule pour séparer plusieurs noms de machines.", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "Impossible d'obtenir {0} pour l'ensemble des ressources dans ResourceGroup : '{1}'", + "loc.messages.AFC_MachineNameFromIdError": "Impossible d'obtenir {0} pour les ressources '{1}' dans le ResourceGroup '{2}'", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "La ressource '{1}' est introuvable à l'aide de la connexion de service sélectionnée '{0}'. La connexion de service sélectionnée '{0}' prend en charge uniquement les ressources classiques (modèle de management des services).", + "loc.messages.AFC_NoClassicVMResources": "Il n'existe aucune machine à copier dans le groupe de ressources '{0}'. La connexion de service sélectionnée '{1}' prend uniquement en charge les machines virtuelles de type Azure Classic.", + "loc.messages.AFC_NoARMVMResources": "Il n'existe aucune machine à copier dans le groupe de ressources '{0}'. La connexion de service sélectionnée '{1}' prend uniquement en charge les machines virtuelles de type Azure Resource Manager.", + "loc.messages.AFC_NoGenericVMResources": "Il n'existe aucune machine à copier dans le groupe de ressources '{0}'.", + "loc.messages.AFC_FilteringNoVMResources": "Il n'existe aucune machine dans le groupe de ressources '{0}' avec pour {1} '{2}'.", + "loc.messages.AFC_CopyStarted": "Copie démarrée pour la machine '{0}'", + "loc.messages.AFC_CopyCompleted": "État de la copie pour la machine '{0}' : '{1}'", + "loc.messages.AFC_WinRMHelpMessage": "Pour corriger les problèmes de connexion de service de WinRM, sélectionnez la tâche 'Activer les conditions préalables à la copie' dans la tâche. Si cela est déjà fait, et si les machines virtuelles cibles sont associées à un équilibreur de charge, vérifiez que des règles NAT de trafic entrant sont configurées pour le port cible (5986). Ceci est applicable uniquement aux machines virtuelles ARM.", + "loc.messages.AFC_CopyFailed": "Échec de la copie sur la machine '{0}'. Pour plus d'informations, consultez les journaux.", + "loc.messages.AFC_ParallelCopyFailed": "Échec de la copie vers une ou plusieurs machines. Pour plus d'informations, consultez les journaux.", + "loc.messages.AFC_CopySuccessful": "Fichiers correctement copiés du chemin source '{0}' vers les machines virtuelles Azure cibles du groupe de ressources '{1}'", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "Échec de la définition de l'extension de script personnalisé '{0}' pour la machine virtuelle '{1}'. Erreur : {2}", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "Échec de l'ajout de la règle de sécurité réseau : {0}", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "Impossible de définir l'extension de script personnalisé '{0}' pour la machine virtuelle '{1}' : {2}", + "loc.messages.AFC_CopyPrereqsFailed": "Échec de l'activation des conditions préalables de copie. {0}", + "loc.messages.AFC_BlobStorageNotFound": "Le compte de stockage {0} est introuvable. Spécifiez un compte de stockage existant", + "loc.messages.AFC_RootContainerAndDirectory": "L'option '/S' est non valide pour les conteneurs $root.", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "Le code de réponse HTTP '{0}' n’est pas un code d’état de redirection valide", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "L'en-tête d'emplacement pour la réponse de redirection a une valeur nul.", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "AzCopy.exe s'est arrêté avec un code de sortie différent de zéro durant le chargement des fichiers vers le Stockage Blob.", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "Impossible de récupérer (fetch) la clé du compte de stockage. Erreur : '{0}'", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "Désinstallez manuellement le script personnalisé WinRM, puis réessayez d'effectuer le déploiement.", + "loc.messages.ExpiredServicePrincipal": "Impossible de récupérer (fetch) le jeton d'accès pour Azure. Vérifiez si le principal de service utilisé est valide et s'il n'a pas expiré.", + "loc.messages.UnsupportedAuthScheme": "Schéma d'authentification '{0}' non pris en charge pour le point de terminaison.", + "loc.messages.ServicePrincipalError": "Erreur liée au principal du service utilisé pour le déploiement.", + "loc.messages.AzModuleNotFound": "Les modules 'Az.Accounts' sont introuvables. Si le module a été installé récemment, réessayez l'opération après avoir redémarré l'agent de tâche Azure Pipelines." +} \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Strings/resources.resjson/it-IT/resources.resjson b/Tasks/AzureFileCopyV6/Strings/resources.resjson/it-IT/resources.resjson new file mode 100644 index 000000000000..6655b79b0087 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Strings/resources.resjson/it-IT/resources.resjson @@ -0,0 +1,94 @@ +{ + "loc.friendlyName": "Copia dei file di Azure", + "loc.helpMarkDown": "[Altre informazioni su questa attività](https://aka.ms/azurefilecopyreadme)", + "loc.description": "Copia i file in Archiviazione BLOB di Azure nelle macchine virtuali", + "loc.instanceNameFormat": "Copia dei file $(Destination)", + "loc.releaseNotes": "Novità della versione 5.0:
   Supporto di AzCopy.exe versione10.12.2", + "loc.input.label.SourcePath": "Origine", + "loc.input.help.SourcePath": "Percorso assoluto della cartella o del file di origine nel computer locale oppure condivisione UNC. L'espressione deve restituire una sola cartella o file. Il simbolo del carattere jolly (*) è supportato in qualsiasi punto del percorso o del nome file.", + "loc.input.label.ConnectedServiceNameARM": "Sottoscrizione di Azure", + "loc.input.help.ConnectedServiceNameARM": "Sottoscrizione di Azure Resource Manager usata come destinazione per la copia dei file.", + "loc.input.label.Destination": "Tipo di destinazione", + "loc.input.help.Destination": "Consente di selezionare la destinazione, nel BLOB o nelle macchine virtuali di Azure.", + "loc.input.label.StorageAccountRM": "Account di archiviazione di Gestione risorse", + "loc.input.help.StorageAccountRM": "Consente di specificare un account di archiviazione di ARM preesistente. Viene usato anche come intermediario per la copia dei file nelle macchine virtuali di Azure", + "loc.input.label.ContainerName": "Nome contenitore", + "loc.input.help.ContainerName": "Nome del contenitore per il caricamento dei file. Se nell'account di archiviazione non esiste un contenitore con il nome specificato, verrà creato automaticamente.
Se è necessario creare una directory virtuale all'interno del contenitore, usare il valore di input seguente come prefisso BLOB.
Esempio: se il percorso di destinazione è https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/, specificare contenitore come nome del contenitore e vd1/vd2/ come prefisso BLOB.", + "loc.input.label.BlobPrefix": "Prefisso BLOB", + "loc.input.help.BlobPrefix": "Utile per filtrare i file, ad esempio aggiungere il numero di build a tutti i BLOB per scaricare i file solo da quella build. Esempio: se si specifica il prefisso BLOB come myvd1/, all'interno del contenitore verrà creata una directory virtuale con questo nome. Il prefisso BLOB con '/' finale verrà considerato una directory virtuale. In caso contrario, verrà considerato come file, a meno che l'elemento da copiare non sia di per sé una cartella. I file di origine verranno copiati in https://myaccount.blob.core.windows.net/mycontainer/myvd1/.", + "loc.input.label.EnvironmentNameRM": "Gruppo di risorse", + "loc.input.help.EnvironmentNameRM": "Nome del gruppo di risorse di destinazione in cui copiare i file.", + "loc.input.label.ResourceFilteringMethod": "Seleziona computer per", + "loc.input.help.ResourceFilteringMethod": "Facoltativamente, selezionare un sottoinsieme di macchine virtuali nel gruppo di risorse specificando il nome host o i tag delle macchine virtuali. I [tag](https://learn.microsoft.com/it-it/azure/virtual-machines/tag-template/) sono supportati solo per le risorse create tramite Azure Resource Manager.", + "loc.input.label.MachineNames": "Criteri di filtro", + "loc.input.help.MachineNames": "Consente di specificare un elenco di nomi host di macchine virtuali, come ffweb, ffdb o tag come Role:DB, Web; OS:Win8.1. Nota: i delimitatori usati per i tag sono ,(virgola), :(due punti) e ;(punto e virgola). Se si specificano più tag, l'attività verrà eseguita in tutte le macchine virtuali con i tag specificati. Per impostazione predefinita, l'attività viene eseguita in tutte le macchine virtuali.", + "loc.input.label.vmsAdminUserName": "Account di accesso amministratore", + "loc.input.help.vmsAdminUserName": "Nome utente dell'amministratore delle macchine virtuali.", + "loc.input.label.vmsAdminPassword": "Password", + "loc.input.help.vmsAdminPassword": "Password dell'amministratore per le macchine virtuali.
Può accettare la variabile definita nelle pipeline di compilazione o versione come '$(passwordVariable)'.
Per proteggere la variabile, è possibile contrassegnarla come 'secret'.", + "loc.input.label.TargetPath": "Cartella di destinazione", + "loc.input.help.TargetPath": "Percorso locale nei computer di destinazione per la copia dei file dall'origine. È possibile usare una variabile di ambiente come $env:windir\\BudgetIT\\Web.", + "loc.input.label.AdditionalArgumentsForBlobCopy": "Argomenti facoltativi (per il caricamento dei file nel BLOB)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "Argomenti facoltativi di AzCopy.exe, come --check-length=true, che verranno applicati durante il caricamento nel BLOB. Se non si specifica alcun argomento facoltativo, gli argomenti facoltativi seguenti verranno aggiunti per impostazione predefinita.
--log-level=INFO (se la pipeline è in esecuzione nella modalità di debug impostata --log-level=DEBUG)
--recursive (solo se il nome del contenitore non è $root)
--blob-type=PageBlob (solo se l'account di archiviazione specificato è un account Premium).", + "loc.input.label.AdditionalArgumentsForVMCopy": "Argomenti facoltativi (per il download dei file nella macchina virtuale)", + "loc.input.help.AdditionalArgumentsForVMCopy": "Argomenti facoltativi di AzCopy.exe, come --check-length=true, che verranno applicati durante il download nella macchina virtuale. Se non si specifica alcun argomento facoltativo, gli argomenti facoltativi seguenti verranno aggiunti per impostazione predefinita.
--log-level=INFO (se la pipeline è in esecuzione nella modalità di debug impostata --log-level=DEBUG)
--recursive", + "loc.input.label.sasTokenTimeOutInMinutes": "Periodo di scadenza del token di firma di accesso condiviso in minuti", + "loc.input.help.sasTokenTimeOutInMinutes": "Specificare il tempo in minuti dopo il quale il token di firma di accesso condiviso per il contenitore scadrà. Per impostazione predefinita, questo token scade dopo 4 ore.", + "loc.input.label.enableCopyPrerequisites": "Abilita prerequisiti di copia", + "loc.input.help.enableCopyPrerequisites": "Se si abilita questa opzione, il listener di Gestione remota Windows (WinRM) verrà configurato con il protocollo HTTPS sulla porta 5986 usando un certificato autofirmato. Questa configurazione è necessaria per eseguire l'operazione di copia su computer Azure. Se le macchine virtuali di destinazione sono supportate da un servizio Load Balancer, assicurarsi che le regole NAT in ingresso siano configurate per la porta di destinazione (5986). Applicabile solo per le macchine virtuali ARM.", + "loc.input.label.CopyFilesInParallel": "Copia in parallelo", + "loc.input.help.CopyFilesInParallel": "Se è impostato su true, i file verranno copiati in parallelo nei computer di destinazione.", + "loc.input.label.CleanTargetBeforeCopy": "Pulisci destinazione", + "loc.input.help.CleanTargetBeforeCopy": "Se è impostato su true, la cartella di destinazione verrà pulita prima della copia dei file.", + "loc.input.label.skipCACheck": "Certificato di test", + "loc.input.help.skipCACheck": "Se questa opzione è selezionata, il client non esegue la convalida per verificare che il certificato server sia firmato da un'Autorità di certificazione (CA) attendibile quando si connette tramite il protocollo HTTPS (Hypertext Transfer Protocol over Secure Socket Layer).", + "loc.messages.AFC_StorageAccountNotFound": "L'account di archiviazione {0} non è stato trovato. La connessione al servizio selezionata 'Entità servizio' supporta solo account di archiviazione di tipo Azure Resource Manager.", + "loc.messages.AFC_ResourceGroupNotFound": "Il gruppo di risorse specificato '{0}' non esiste.", + "loc.messages.AFC_GetVMStatus": "[Chiamata di Azure]Recupero dello stato per la macchina virtuale '{0}'", + "loc.messages.AFC_GetVMStatusComplete": "[Chiamata di Azure]Lo stato della macchina virtuale '{0}' è stato recuperato", + "loc.messages.AFC_GetCustomScriptExtension": "[Chiamata di Azure]Recupero dell'estensione per script personalizzati '{0}' per la macchina virtuale '{1}'", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Chiamata di Azure]L'estensione per script personalizzati '{0}' per la macchina virtuale '{1}' è stata recuperata", + "loc.messages.AFC_SetCustomScriptExtension": "[Chiamata di Azure]Impostazione dell'estensione per script personalizzati '{0}' per la macchina virtuale '{1}'", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Chiamata di Azure]L'estensione per script personalizzati '{0}' per la macchina virtuale '{1}' è stata impostata", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Chiamata di Azure]Rimozione dell'estensione per script personalizzati '{0}' per la macchina virtuale '{1}'", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Chiamata di Azure]L'estensione per script personalizzati {0}' per la macchina virtuale '{1}' è stata rimossa", + "loc.messages.AFC_NoNetworkInterface": "[Chiamata di Azure]Non è stata trovata alcuna interfaccia di rete con l'ID macchina virtuale {0} nel gruppo di risorse {1}", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Chiamata di Azure]Il nome del gruppo di risorse e l'ID macchina virtuale non devono essere Null o vuoti", + "loc.messages.AFC_AzurePSNotInstalled": "La versione minima richiesta {0} dei cmdlet di Azure Powershell non è installata. Per scaricare la versione più recente di Azure Powershell, seguire le istruzioni disponibili all'indirizzo https://azure.microsoft.com/it-it/documentation/articles/powershell-install-configure/", + "loc.messages.AFC_ClassicStorageAccountNotFound": "L'account di archiviazione {0} non è stato trovato. La connessione al servizio selezionata 'Certificato' supporta solo account di archiviazione di tipo Azure classico.", + "loc.messages.AFC_GenericStorageAccountNotFound": "L'account di archiviazione {0} non è stato trovato. Specificarne uno esistente", + "loc.messages.AFC_AzureFileCopyMoreHelp": "Per altre informazioni, vedere {0}", + "loc.messages.AFC_UploadFilesStorageAccount": "Il caricamento dei file dal percorso di origine '{0}' nell'account di archiviazione '{1}' nel contenitore '{2}' con prefisso BLOB '{3}' è in corso", + "loc.messages.AFC_UploadContainerStorageAccount": "Il caricamento nel contenitore '{0}' nell'account di archiviazione '{1}' con prefisso BLOB '{2}' non è riuscito. Errore: '{3}'", + "loc.messages.AFC_UploadFileSuccessful": "Il caricamento dei file dal percorso di origine '{0}' nell'account di archiviazione '{1}' nel contenitore '{2}' con prefisso BLOB '{3}' è stato completato", + "loc.messages.AFC_IncorrectTags": "I tag specificati non sono corretti. Specificarli nel formato Ruolo:Web,DB;Località:Stati Uniti orientali;Reparto:Finanza,HR", + "loc.messages.AFC_MachineDoesNotExist": "I computer seguenti non esistono nel gruppo di risorse oppure i relativi nomi non sono stati specificati correttamente: {0}. Specificare gli stessi nomi di computer presenti nel gruppo di risorse e usare la virgola come delimitatore tra più nomi di computer.", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "Non è possibile ottenere {0} per tutte le risorse nel gruppo di risorse '{1}'", + "loc.messages.AFC_MachineNameFromIdError": "Non è possibile ottenere {0} per le risorse '{1}' nel gruppo di risorse '{2}'", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "La risorsa '{1}' non è stata trovata usando la connessione al servizio selezionata '{0}'. La connessione al servizio selezionata {0}' supporta solo risorse classiche (modello di gestione servizi).", + "loc.messages.AFC_NoClassicVMResources": "Nel gruppo di risorse '{0}' non esistono computer per la copia. La connessione al servizio selezionata '{1}' supporta solo macchine virtuali di tipo Azure classico.", + "loc.messages.AFC_NoARMVMResources": "Nel gruppo di risorse '{0}' non esistono computer per la copia. La connessione al servizio selezionata '{1}' supporta solo macchine virtuali di tipo Azure Resource Manager.", + "loc.messages.AFC_NoGenericVMResources": "Nel gruppo di risorse '{0}' non esiste alcun computer per la copia.", + "loc.messages.AFC_FilteringNoVMResources": "Nel gruppo di risorse '{0}' non esiste alcun computer con l'elemento {1} '{2}'.", + "loc.messages.AFC_CopyStarted": "Copia avviata per il computer: '{0}'", + "loc.messages.AFC_CopyCompleted": "Stato della copia per il computer '{0}': '{1}'", + "loc.messages.AFC_WinRMHelpMessage": "Per risolvere i problemi correlati alla connessione al servizio WinRM, selezionare l'opzione 'Abilita prerequisiti di copia' nell'attività. Se l'opzione è già impostata e le macchine virtuali di destinazione sono supportate da un servizio di bilanciamento del carico, assicurarsi che le regole NAT in ingresso siano configurate per la porta di destinazione (5986). Applicabile solo per le macchine virtuali ARM.", + "loc.messages.AFC_CopyFailed": "La copia nel computer '{0}' non è riuscita. Per maggiori dettagli, vedere i log.", + "loc.messages.AFC_ParallelCopyFailed": "La copia in uno o più computer non è riuscita. Per maggiori dettagli, vedere i log.", + "loc.messages.AFC_CopySuccessful": "La copia dei file dal percorso di origine '{0}' alle macchine virtuali di Azure di destinazione nel gruppo di risorse '{1}' è stata completata", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "L'impostazione dell'estensione per script personalizzati '{0}' per la macchina virtuale '{1}' non è riuscita. Errore: {2}", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "Non è stato possibile aggiungere la regola di sicurezza di rete: {0}", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "Non è possibile impostare l'estensione per script personalizzati '{0}' per la macchina virtuale '{1}': {2}", + "loc.messages.AFC_CopyPrereqsFailed": "Non è stato possibile abilitare i prerequisiti di copia. {0}", + "loc.messages.AFC_BlobStorageNotFound": "L'account di archiviazione {0} non è stato trovato. Specificarne uno esistente", + "loc.messages.AFC_RootContainerAndDirectory": "L'opzione '/S' non è valida per i contenitori $root.", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "Il codice di risposta HTTP '{0}' non è un codice di stato di reindirizzamento valido", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "L'intestazione del percorso della risposta di reindirizzamento è Null.", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "AzCopy.exe è stato terminato con il codice di uscita diverso da zero durante il caricamento dei file nell'archivio BLOB.", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "Non è possibile recuperare la chiave dell'account di archiviazione. Errore: '{0}'", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "Disinstallare manualmente lo script personalizzato di WinRM e ripetere la distribuzione.", + "loc.messages.ExpiredServicePrincipal": "Non è stato possibile recuperare il token di accesso per Azure. Verificare che l'entità servizio usata sia valida e non sia scaduta.", + "loc.messages.UnsupportedAuthScheme": "Lo schema di autenticazione '{0}' non è supportato per l'endpoint.", + "loc.messages.ServicePrincipalError": "Si è verificato un errore con l'entità servizio usata per la distribuzione.", + "loc.messages.AzModuleNotFound": "Non è stato possibile trovare i moduli 'Az.Accounts'. Se il modulo è stato installato di recente, riprovare dopo aver riavviato l'agente delle attività Azure Pipelines." +} \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Strings/resources.resjson/ja-JP/resources.resjson b/Tasks/AzureFileCopyV6/Strings/resources.resjson/ja-JP/resources.resjson new file mode 100644 index 000000000000..5a729f25484c --- /dev/null +++ b/Tasks/AzureFileCopyV6/Strings/resources.resjson/ja-JP/resources.resjson @@ -0,0 +1,94 @@ +{ + "loc.friendlyName": "Azure ファイル コピー", + "loc.helpMarkDown": "[このタスクに関する詳細](https://aka.ms/azurefilecopyreadme)", + "loc.description": "Azure Blob Storage または仮想マシンにファイルをコピーします", + "loc.instanceNameFormat": "$(Destination) ファイル コピー", + "loc.releaseNotes": "バージョン 5.0 の新機能:
   AzCopy.exe バージョン 10.12.2 のサポート", + "loc.input.label.SourcePath": "ソース", + "loc.input.help.SourcePath": "ソース フォルダーまたはローカル コンピューター上のファイルの絶対パス、もしくは UNC 共有。式は単一のフォルダーまたはファイルを返す必要があります。ワイルド カード記号 (*) はファイル パスまたはファイル名の任意の場所で使用できます。", + "loc.input.label.ConnectedServiceNameARM": "Azure サブスクリプション", + "loc.input.help.ConnectedServiceNameARM": "ファイルをコピーする対象の Azure Resource Manager サブスクリプション。", + "loc.input.label.Destination": "コピー先のタイプ", + "loc.input.help.Destination": "Azure BLOB または Azure VM のいずれかをコピー先として選択します。", + "loc.input.label.StorageAccountRM": "RM ストレージ アカウント", + "loc.input.help.StorageAccountRM": "既存の ARM ストレージ アカウントを指定します。Azure VM にファイルをコピーするための仲介役としても使用されます", + "loc.input.label.ContainerName": "コンテナー名", + "loc.input.help.ContainerName": "ファイルをアップロードするためのコンテナーの名前です。指定した名前のコンテナーが指定したストレージ アカウントに存在しない場合、自動的に作成されます。
そのコンテナー内に仮想ディレクトリを作成する必要がある場合は、BLOB プレフィックスの入力を以下のように使用します。
例: 対象の場所が https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/ であれば、コンテナー名を mycontainer と指定し、BLOB プレフィックスを vd1/vd2/ と指定します。", + "loc.input.label.BlobPrefix": "BLOB プレフィックス", + "loc.input.help.BlobPrefix": "ファイルをフィルター処理する場合に便利です。たとえば、すべての BLOB にビルド番号を追加して、そのビルドのみからファイルをダウンロードします。例: BLOB プレフィックスを myvd1/ として指定すると、この名前の仮想ディレクトリがコンテナー内に作成されます。末尾に '/' が付いた BLOB プレフィックスは、仮想ディレクトリとみなされます。それ以外の場合、コピーするアイテム自体がフォルダーでない限り、ファイルとして取り扱われます。ソース ファイルは https://myaccount.blob.core.windows.net/mycontainer/myvd1/ にコピーされます。", + "loc.input.label.EnvironmentNameRM": "リソース グループ", + "loc.input.help.EnvironmentNameRM": "ファイルのコピー先のターゲット リソース グループの名前。", + "loc.input.label.ResourceFilteringMethod": "以下の条件でコンピューターを選択", + "loc.input.help.ResourceFilteringMethod": "必要に応じて、VM ホスト名またはタグを指定してリソース グループ内での VM のサブセットを選びます。[タグ](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/) は、Azure Resource Manager を通して作成されたリソースでのみサポートされています。", + "loc.input.label.MachineNames": "フィルター条件", + "loc.input.help.MachineNames": "VM ホスト名 (ffweb, ffdb) またはタグ (Role:DB, Web; OS:Win8.1) のリストをご指定ください。タグに使用される区切り文字が ,(コンマ)、:(コロン) および ;(セミコロン) であることにご注意ください。複数のタグが指定されている場合、指定されたタグを含むすべての VM でタスクが実行されます。既定値ではすべての VM でタスクが実行されます。", + "loc.input.label.vmsAdminUserName": "管理者ログイン", + "loc.input.help.vmsAdminUserName": "VM の管理者ユーザー名。", + "loc.input.label.vmsAdminPassword": "パスワード", + "loc.input.help.vmsAdminPassword": "VM の管理者パスワード。
ビルドまたはリリース パイプラインで '$(passwordVariable)' として定義された変数を入力することができます。
変数を 'シークレット' とマークしてセキュリティで保護することもできます。", + "loc.input.label.TargetPath": "コピー先フォルダー", + "loc.input.help.TargetPath": "ソースからのファイルのコピー先となるターゲット コンピューター上のローカル パス。$env:windir\\BudgetIT\\Web のように、環境変更を使用できます。", + "loc.input.label.AdditionalArgumentsForBlobCopy": "オプションの引数 (BLOB へのファイルのアップロード用)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "BLOB にアップロードするときに適用される、 --check-length=true などのオプションの AzCopy.exe 引数です。ここでオプション引数を指定しない場合、既定で、次のオプション引数が追加されます。
--log-level=INFO (パイプラインがデバッグ モードで実行されている場合は、--log-level=DEBUG が設定されます)
--recursive (コンテナー名が $root 以外の場合のみ)
--blob-type=PageBlob (指定されたストレージ アカウントが Premium アカウントの場合のみ)。", + "loc.input.label.AdditionalArgumentsForVMCopy": "オプションの引数 (VM へのファイルのダウンロード用)", + "loc.input.help.AdditionalArgumentsForVMCopy": "VM にダウンロードするときに適用される、 --check-length=true などのオプションの AzCopy.exe 引数です。ここでオプション引数を指定しない場合、既定で、次のオプション引数が追加されます。
--log-level=INFO (パイプラインがデバッグ モードで実行されている場合は、--log-level=DEBUG が設定されます)
--recursive", + "loc.input.label.sasTokenTimeOutInMinutes": "SAS トークンの有効期間 (分)", + "loc.input.help.sasTokenTimeOutInMinutes": "コンテナーの SAS トークンの有効期限が切れるまでの時間を分単位で指定します。既定では、このトークンは 4 時間後に有効期限が切れます。", + "loc.input.label.enableCopyPrerequisites": "コピーの前提条件を有効にする", + "loc.input.help.enableCopyPrerequisites": "このオプションを有効にすると、自己署名証明書を使って、Windows リモート管理 (WinRM) リスナーをポート 5986 の HTTPS プロトコル経由で構成できます。この構成は Azure コンピューター上でコピー操作を実行するために必要です。ターゲットの仮想マシンがロード バランサーでバックアップされている場合は、インバウンド NAT 規則がターゲット ポート (5986) に対して構成されていることを確認します。ARM VM にのみ適用されます。", + "loc.input.label.CopyFilesInParallel": "並列でコピー", + "loc.input.help.CopyFilesInParallel": "true に設定すると、ファイルを並列でターゲット コンピューターにコピーします。", + "loc.input.label.CleanTargetBeforeCopy": "ターゲットをクリーンにする", + "loc.input.help.CleanTargetBeforeCopy": "true に設定すると、ファイルをコピーする前にコピー先フォルダーの内容を消去します。", + "loc.input.label.skipCACheck": "テスト証明書", + "loc.input.help.skipCACheck": "このオプションを選ぶと、クライアントは HTTPS (Hypertext Transfer Protocol over Secure Socket Layer) を介して接続するときに、サーバー証明書が信頼できる証明機関 (CA) によって署名されていることの検証をスキップします。", + "loc.messages.AFC_StorageAccountNotFound": "ストレージ アカウント: {0} は見つかりません。選択されたサービス接続 'Service Principal' は、種類が Azure Resource Manager のストレージ アカウントのみをサポートします。", + "loc.messages.AFC_ResourceGroupNotFound": "指定されたリソース グループ '{0}' は存在しません。", + "loc.messages.AFC_GetVMStatus": "[Azure の呼び出し]VM '{0}' の状態を取得しています", + "loc.messages.AFC_GetVMStatusComplete": "[Azure の呼び出し]VM '{0}' の状態を取得しました", + "loc.messages.AFC_GetCustomScriptExtension": "[Azure の呼び出し]VM '{1}' のカスタム スクリプト拡張機能 '{0}' を取得しています", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Azure の呼び出し]VM '{1}' のカスタム スクリプト拡張機能 '{0}' を取得しました", + "loc.messages.AFC_SetCustomScriptExtension": "[Azure の呼び出し]VM '{1}' のカスタム スクリプト拡張機能 '{0}' を設定しています", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Azure の呼び出し]VM '{1}' のカスタム スクリプト拡張機能 '{0}' を設定しました", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Azure の呼び出し]VM '{1}' のカスタム スクリプト拡張機能 '{0}' を削除しています", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Azure の呼び出し]VM '{1}' のカスタム スクリプト拡張機能 '{0}' を削除しました", + "loc.messages.AFC_NoNetworkInterface": "[Azure の呼び出し]リソース グループ {1} の下に仮想マシン ID が {0} のネットワーク インターフェイスが見つかりませんでした", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Azure の呼び出し]リソース グループ名と仮想マシン ID を null または空白にすることはできません", + "loc.messages.AFC_AzurePSNotInstalled": "Azure PowerShell コマンドレットの必須の最小バージョン {0} がインストールされていません。https://azure.microsoft.com/ja-jp/documentation/articles/powershell-install-configure/ にある指示に従って、最新の Azure PowerShell を入手できます", + "loc.messages.AFC_ClassicStorageAccountNotFound": "ストレージ アカウント: {0} 見つかりません。選択したサービス接続 'Certificate' では、Azure クラシック タイプのストレージ アカウントのみがサポートされます。", + "loc.messages.AFC_GenericStorageAccountNotFound": "ストレージ アカウント {0} が見つかりません。既存のストレージ アカウントを指定してください", + "loc.messages.AFC_AzureFileCopyMoreHelp": "詳細については、{0} を参照してください", + "loc.messages.AFC_UploadFilesStorageAccount": "ソース パス '{0}' からコンテナー: '{2}' 内のストレージ アカウント: '{1}' に BLOB プレフィックス: '{3}' でファイルをアップロードしています:", + "loc.messages.AFC_UploadContainerStorageAccount": "ストレージ アカウント: '{1}'(BLOB プレフィックス: '{2}') のコンテナー '{0}' へのアップロードは、エラー: '{3}' で失敗しました", + "loc.messages.AFC_UploadFileSuccessful": "ソース パス '{0}' からコンテナー: '{2}' のストレージ アカウント: '{1}' にファイルが BLOB プレフィックス: '{3}' で正常にアップロードされました", + "loc.messages.AFC_IncorrectTags": "タグが正しく指定されていません。次の形式にする必要があります: Role:Web,DB;Location:East US;Dept.:Finance,HR", + "loc.messages.AFC_MachineDoesNotExist": "次のコンピューターが、リソース グループ内に見つからないか、名前の指定が正しくありません: {0}。リソース グループ内に存在するコンピューター名と正確に同じコンピューター名を指定してください。複数のコンピューター名を区切るにはコンマを使用します。", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "ResourceGroup '{1}' のすべてのリソースに対して {0} を取得できません", + "loc.messages.AFC_MachineNameFromIdError": "ResourceGroup '{2}' の '{1}' つのリソースに対して {0} を取得できません", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "選択されたサービス接続 '{0}' を使用して、リソース '{1}' を見つけることができません。選択されたサービス接続 '{0}' は、クラシック リソース (サービス管理モデル) のみをサポートします。", + "loc.messages.AFC_NoClassicVMResources": "リソース グループ '{0}' の下にコピー対象のマシンは存在しません。選択したサービス接続 '{1}' は Azure クラシック タイプの仮想マシンのみをサポートしています。", + "loc.messages.AFC_NoARMVMResources": "リソース グループ '{0}' にコピー用のマシンが存在しません。選択したサービス接続 '{1}' では、Azure Resource Manager タイプの Virtual Machines のみがサポートされます。", + "loc.messages.AFC_NoGenericVMResources": "リソース グループ '{0}' にコピー用のマシンが存在しません。", + "loc.messages.AFC_FilteringNoVMResources": "リソース グループ '{0}' に次の {1} '{2}' を持つマシンが存在しません。", + "loc.messages.AFC_CopyStarted": "コンピューター: '{0}' のコピーが開始されました", + "loc.messages.AFC_CopyCompleted": "コンピューター '{0}' のコピーの状態: '{1}'", + "loc.messages.AFC_WinRMHelpMessage": "WinRM サービス接続に関連する問題を修正するには、タスクで [コピーの前提条件を有効にする] オプションを選びます。既に設定されており、対象の Virtual Machines がロード バランサーの対象となっている場合は、インバウンド NAT 規則がターゲット ポート (5986) 用に構成されていることを確認してください。ARM VM にのみ適用されます。", + "loc.messages.AFC_CopyFailed": "マシン '{0}' でコピーに失敗しました。詳細についてはログを参照してください。", + "loc.messages.AFC_ParallelCopyFailed": "1 台または複数のマシンへのコピーが失敗しました。詳細についてはログを参照してください。", + "loc.messages.AFC_CopySuccessful": "ソース パス '{0}' からリソース グループ '{1}' 内のターゲット Azure VM へのファイルのコピーが正常に完了しました", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "仮想マシン '{1}' のカスタム スクリプト拡張機能 '{0}' を設定できませんでした。エラー: {2}", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "ネットワークのセキュリティ規則を追加できませんでした: {0}", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "仮想マシン '{1}' のカスタム スクリプト拡張機能 '{0}' を設定できません: {2}", + "loc.messages.AFC_CopyPrereqsFailed": "コピーの前提条件を有効にすることができませんでした。{0}", + "loc.messages.AFC_BlobStorageNotFound": "ストレージ アカウント {0} が見つかりません。既存のストレージ アカウントを指定してください", + "loc.messages.AFC_RootContainerAndDirectory": "$root コンテナーには、'/S' オプションは無効です。", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "HTTP 応答コード: '{0}' は無効なリダイレクト状態コードです。", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "リダイレクト応答の場所ヘッダーが null です。", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "AzCopy.exe が Blob Storage にファイルをアップロードしている間に、ゼロ以外の終了コードで終了しました。", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "ストレージ アカウント キーをフェッチできません。エラー: '{0}'", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "WinRM カスタム スクリプトを手動でアンインストールしてから、デプロイを再試行してください。", + "loc.messages.ExpiredServicePrincipal": "Azure のアクセス トークンをフェッチできませんでした。使用されているサービス プリンシパルが有効であり、有効期限が切れていないことを確認してください。", + "loc.messages.UnsupportedAuthScheme": "'{0}' はエンドポイントではサポートされていない認証スキームです。", + "loc.messages.ServicePrincipalError": "デプロイに使用されたサービス プリンシパルにエラーがありました。", + "loc.messages.AzModuleNotFound": "モジュール 'Az.Accounts' が見つかりませんでした。モジュールが最近インストールされた場合は、Azure Pipelines タスク エージェントを再起動してから再試行してください。" +} \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Strings/resources.resjson/ko-KR/resources.resjson b/Tasks/AzureFileCopyV6/Strings/resources.resjson/ko-KR/resources.resjson new file mode 100644 index 000000000000..3a3942bd8693 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Strings/resources.resjson/ko-KR/resources.resjson @@ -0,0 +1,94 @@ +{ + "loc.friendlyName": "Azure 파일 복사", + "loc.helpMarkDown": "[이 작업에 대한 자세한 정보](https://aka.ms/azurefilecopyreadme)", + "loc.description": "Azure Blob Storage 또는 가상 머신에 파일을 복사합니다.", + "loc.instanceNameFormat": "$(Destination) 파일 복사", + "loc.releaseNotes": "버전 5.0의 새로운 기능:
   AzCopy.exe 버전 10.12.2 지원", + "loc.input.label.SourcePath": "원본", + "loc.input.help.SourcePath": "소스 폴더, 로컬 머신의 파일 또는 UNC 공유에 대한 절대 경로입니다. 식은 단일 폴더 또는 파일을 반환해야 합니다. 와일드카드 기호(*)는 파일 경로 또는 파일 이름의 모든 위치에서 지원됩니다.", + "loc.input.label.ConnectedServiceNameARM": "Azure 구독", + "loc.input.help.ConnectedServiceNameARM": "파일 복사를 위한 대상으로 지정할 Azure Resource Manager 구독입니다.", + "loc.input.label.Destination": "대상 유형", + "loc.input.help.Destination": "대상으로 Azure Blob 또는 Azure VM 중 하나를 선택합니다.", + "loc.input.label.StorageAccountRM": "RM 저장소 계정", + "loc.input.help.StorageAccountRM": "기존 ARM 저장소 계정을 지정합니다. 파일을 Azure VM에 복사하기 위한 중간자로도 사용됩니다.", + "loc.input.label.ContainerName": "컨테이너 이름", + "loc.input.help.ContainerName": "파일을 업로드하기 위한 컨테이너의 이름입니다. 지정한 스토리지 계정에 지정된 이름을 가진 컨테이너가 없을 경우 자동으로 만들어집니다.
컨테이너 안에 가상 디렉터리를 만들어야 하는 경우 아래 Blob 접두사 입력을 사용하세요.
예: 대상 위치가 https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/인 경우 mycontainer를 컨테이너 이름으로, vd1/vd2/를 Blob 접두사로 지정하세요.", + "loc.input.label.BlobPrefix": "Blob 접두사", + "loc.input.help.BlobPrefix": "파일을 필터링하는 데 유용합니다. 예를 들어 모든 Blob에 빌드 번호를 추가하여 해당 빌드에서만 파일을 다운로드할 수 있습니다. 예: Blob 접두사를 myvd1/로 지정하면 이 이름의 가상 디렉터리가 컨테이너 내부에 만들어집니다. 후행 '/'가 있는 Blob 접두사는 가상 디렉터리로 간주됩니다. 후행 '/'가 없으면 복사되는 항목 자체가 폴더가 아니라면 파일로 처리됩니다. 원본 파일이 https://myaccount.blob.core.windows.net/mycontainer/myvd1/로 복사됩니다.", + "loc.input.label.EnvironmentNameRM": "리소스 그룹", + "loc.input.help.EnvironmentNameRM": "파일을 복사할 대상 리소스 그룹의 이름입니다.", + "loc.input.label.ResourceFilteringMethod": "컴퓨터 선택 기준", + "loc.input.help.ResourceFilteringMethod": "필요한 경우 VM 호스트 이름이나 태그를 제공하여 리소스 그룹에서 VM의 하위 집합을 선택합니다. [태그](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/)는 Azure Resource Manager를 통해 만든 리소스에만 지원됩니다.", + "loc.input.label.MachineNames": "필터 조건", + "loc.input.help.MachineNames": "ffweb, ffdb 등과 같은 VMs 호스트 이름이나 Role:DB, Web; OS:Win8.1 등과 같은 태그의 목록을 지정하세요. 태그에 사용되는 구분 기호는 ,(쉼표), :(콜론) 및 ;(세미콜론)입니다. 여러 태그를 지정하는 경우 작업이 지정된 태그가 있는 모든 VM에서 실행됩니다. 기본값은 모든 VM에서 작업을 실행하는 것입니다.", + "loc.input.label.vmsAdminUserName": "관리자 로그인", + "loc.input.help.vmsAdminUserName": "VM의 관리자 사용자 이름입니다.", + "loc.input.label.vmsAdminPassword": "암호", + "loc.input.help.vmsAdminPassword": "VM의 관리자 암호입니다.
빌드 또는 릴리스 파이프라인에서 '$(passwordVariable)'(으)로 정의된 변수를 사용할 수 있습니다.
변수를 'secret'으로 표시하여 보호할 수도 있습니다.", + "loc.input.label.TargetPath": "대상 폴더", + "loc.input.help.TargetPath": "소스에서 파일을 복사하기 위한 대상 컴퓨터의 로컬 경로입니다. $env:windir\\BudgetIT\\Web과 같은 환경 변수를 사용할 수 있습니다.", + "loc.input.label.AdditionalArgumentsForBlobCopy": "선택적 인수(Blob에 파일을 업로드하는 경우)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "Blob으로 업로드할 때 적용되는 선택적 AzCopy.exe 인수(예: --check-length=true)입니다. 여기에서 선택적 인수를 지정하지 않으면 다음과 같은 선택적 인수가 기본적으로 추가됩니다.
--log-level=INFO(파이프라인이 디버그 모드에서 실행되는 경우 --log-level=DEBUG 설정),
--recursive(컨테이너 이름이 $root가 아닌 경우에만),
--blob-type=PageBlob(지정한 스토리지 계정이 프리미엄 계정인 경우에만)", + "loc.input.label.AdditionalArgumentsForVMCopy": "선택적 인수(VM에 파일을 다운로드하는 경우)", + "loc.input.help.AdditionalArgumentsForVMCopy": "VM으로 다운로드할 때 적용되는 선택적 AzCopy.exe 인수(예: --check-length=true)입니다. 여기에서 선택적 인수를 지정하지 않으면 다음과 같은 선택적 인수가 기본적으로 추가됩니다.
--log-level=INFO(파이프라인이 디버그 모드에서 실행되는 경우 --log-level=DEBUG 설정),
--recursive", + "loc.input.label.sasTokenTimeOutInMinutes": "SAS 토큰 만료 기간(분)", + "loc.input.help.sasTokenTimeOutInMinutes": "컨테이너에 대한 SAS 토큰이 만료되기까지의 시간(분)을 제공합니다. 기본적으로 이 토큰은 4시간 후에 만료됩니다.", + "loc.input.label.enableCopyPrerequisites": "복사 필수 구성 요소 사용", + "loc.input.help.enableCopyPrerequisites": "이 옵션을 사용하도록 설정하면 자체 서명된 인증서를 사용하여 포트 5986의 HTTP 프로토콜에서 WinRM(Windows 원격 관리) 수신기가 구성됩니다. 이 구성은 Azure 컴퓨터에서 복사 작업을 수행하는 데 필요합니다. 대상 가상 머신이 Load Balancer에서 지원되는 경우 인바운드 NAT 규칙이 대상 포트(5986)에 대해 구성되었는지 확인하세요. ARM VM에 대해서만 적용할 수 있습니다.", + "loc.input.label.CopyFilesInParallel": "동시 복사", + "loc.input.help.CopyFilesInParallel": "true로 설정하면 파일이 대상 컴퓨터에 동시에 복사됩니다.", + "loc.input.label.CleanTargetBeforeCopy": "클린 대상", + "loc.input.help.CleanTargetBeforeCopy": "true로 설정하면 파일을 복사하기 전에 대상 폴더가 정리됩니다.", + "loc.input.label.skipCACheck": "테스트 인증서", + "loc.input.help.skipCACheck": "이 옵션을 선택하면 클라이언트에서 HTTPS(Hypertext Transfer Protocol over Secure Socket Layer)를 통해 연결할 때 서버 인증서에 신뢰할 수 있는 CA(인증 기관)의 서명이 있는지 확인하는 단계를 건너뜁니다.", + "loc.messages.AFC_StorageAccountNotFound": "스토리지 계정 {0}을(를) 찾을 수 없습니다. 선택한 서비스 연결 'Service Principal'은 Azure Resource Manager 유형의 스토리지 계정만 지원합니다.", + "loc.messages.AFC_ResourceGroupNotFound": "제공된 리소스 그룹 '{0}'이(가) 없습니다.", + "loc.messages.AFC_GetVMStatus": "[Azure 호출]VM '{0}'의 상태를 가져오는 중", + "loc.messages.AFC_GetVMStatusComplete": "[Azure 호출]VM '{0}'의 상태를 가져왔습니다.", + "loc.messages.AFC_GetCustomScriptExtension": "[Azure 호출]VM '{1}'의 사용자 지정 스크립트 확장 '{0}'을(를) 가져오는 중", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Azure 호출]VM '{1}'의 사용자 지정 스크립트 확장 '{0}'을(를) 가져왔습니다.", + "loc.messages.AFC_SetCustomScriptExtension": "[Azure 호출]VM '{1}'의 사용자 지정 스크립트 확장 '{0}'을(를) 설정하는 중", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Azure 호출]VM '{1}'의 사용자 지정 스크립트 확장 '{0}'을(를) 설정했습니다.", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Azure 호출]VM '{1}'의 사용자 지정 스크립트 확장 '{0}'을(를) 제거하는 중", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Azure 호출]VM '{1}'의 사용자 지정 스크립트 확장 '{0}'을(를) 제거했습니다.", + "loc.messages.AFC_NoNetworkInterface": "[Azure 호출]리소스 그룹 {1}에 가상 머신 ID가 {0}인 네트워크 인터페이스가 없습니다.", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Azure 호출]리소스 그룹 이름 및 가상 머신 ID는 null이거나 비워 둘 수 없습니다.", + "loc.messages.AFC_AzurePSNotInstalled": "필요한 Azure PowerShell Cmdlet의 최소 버전 {0}이(가) 설치되어 있지 않습니다. https://azure.microsoft.com/ko-kr/documentation/articles/powershell-install-configure/의 지침에 따라 최신 Azure PowerShell을 다운로드할 수 있습니다.", + "loc.messages.AFC_ClassicStorageAccountNotFound": "스토리지 계정 {0}을(를) 찾을 수 없습니다. 선택한 서비스 연결 'Certificate'는 Azure 클래식 유형의 스토리지 계정만 지원합니다.", + "loc.messages.AFC_GenericStorageAccountNotFound": "저장소 계정 {0}을(를) 찾을 수 없습니다. 기존 저장소 계정을 지정하세요.", + "loc.messages.AFC_AzureFileCopyMoreHelp": "자세한 내용은 {0}을(를) 참조하세요.", + "loc.messages.AFC_UploadFilesStorageAccount": "Blob 접두사 '{3}'(으)로 소스 경로 '{0}'의 파일을 '{2}' 컨테이너의 저장소 계정 '{1}'에 업로드하는 중", + "loc.messages.AFC_UploadContainerStorageAccount": "Blob 접두사 '{2}'(으)로 저장소 계정 '{1}'에 '{0}' 컨테이너를 업로드하지 못했습니다. 오류: '{3}'", + "loc.messages.AFC_UploadFileSuccessful": "Blob 접두사 '{3}'(으)로 소스 경로 '{0}'의 파일을 '{2}' 컨테이너의 저장소 계정 '{1}'에 업로드했습니다.", + "loc.messages.AFC_IncorrectTags": "태그가 잘못 지정되었습니다. 태그는 Role:Web,DB;Location:East US;Dept.:Finance,HR 형식이어야 합니다.", + "loc.messages.AFC_MachineDoesNotExist": "다음 컴퓨터는 리소스 그룹에 없거나 해당 이름이 올바르게 지정되지 않았습니다. {0}. 리소스 그룹에 있는 그대로 정확하게 같은 컴퓨터 이름을 제공하세요. 여러 컴퓨터 이름을 구분하려면 쉼표를 사용하세요.", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "ResourceGroup '{1}'에서 모든 리소스에 대한 {0}을(를) 가져올 수 없습니다.", + "loc.messages.AFC_MachineNameFromIdError": "ResourceGroup '{2}'에서 '{1}' 리소스에 대한 {0}을(를) 가져올 수 없습니다.", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "선택한 서비스 연결 '{0}'을(를) 사용하여 '{1}' 리소스를 찾을 수 없습니다. 선택한 서비스 연결 '{0}'은(는) 클래식 리소스만 지원합니다(서비스 관리 모델).", + "loc.messages.AFC_NoClassicVMResources": "복사에 사용할 머신이 리소스 그룹 '{0}'에 없습니다. 선택한 서비스 연결 '{1}'은(는) Azure 클래식 유형의 Virtual Machines만 지원합니다.", + "loc.messages.AFC_NoARMVMResources": "복사에 사용할 머신이 리소스 그룹 '{0}'에 없습니다. 선택한 서비스 연결 '{1}'은(는) Azure Resource Manager 유형의 Virtual Machines만 지원합니다.", + "loc.messages.AFC_NoGenericVMResources": "복사에 사용할 컴퓨터가 리소스 그룹 '{0}'에 없습니다.", + "loc.messages.AFC_FilteringNoVMResources": "다음의 {1} '{2}'을(를) 포함하는 컴퓨터가 리소스 그룹 '{0}'에 없습니다.", + "loc.messages.AFC_CopyStarted": "다음 컴퓨터에 대한 복사 시작됨: '{0}'", + "loc.messages.AFC_CopyCompleted": "'{0}' 컴퓨터의 상태 복사: '{1}'", + "loc.messages.AFC_WinRMHelpMessage": "WinRM 서비스 연결 관련 문제를 해결하려면 작업에서 '복사 필수 구성 요소 사용' 옵션을 선택하세요. 이미 설정되어 있고 대상 가상 머신이 부하 분산 장치로 지원되면 대상 포트(5986)에 대해 인바운드 NAT 규칙이 구성되어 있는지 확인합니다. ARM VM에만 적용됩니다.", + "loc.messages.AFC_CopyFailed": "'{0}' 머신에 복사하지 못했습니다. 자세한 내용은 로그를 참조하세요.", + "loc.messages.AFC_ParallelCopyFailed": "하나 이상의 머신에 복사하지 못했습니다. 자세한 내용은 로그를 참조하세요.", + "loc.messages.AFC_CopySuccessful": "소스 경로 '{0}'의 파일을 리소스 그룹의 대상 Azure VM '{1}'에 복사했습니다.", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "가상 머신 '{1}'의 사용자 지정 스크립트 확장 '{0}'을(를) 설정하지 못했습니다. 오류: {2}", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "네트워크 보안 규칙 {0}을(를) 추가하지 못했습니다.", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "가상 머신 '{1}'의 사용자 지정 스크립트 확장 '{0}'을(를) 설정할 수 없습니다. {2}", + "loc.messages.AFC_CopyPrereqsFailed": "복사 필수 구성 요소를 사용하도록 설정하지 못했습니다. {0}", + "loc.messages.AFC_BlobStorageNotFound": "저장소 계정 {0}을(를) 찾을 수 없습니다. 기존 저장소 계정을 지정하세요.", + "loc.messages.AFC_RootContainerAndDirectory": "$root 컨테이너에 대해 '/S' 옵션이 잘못되었습니다.", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "HTTP 응답 코드: '{0}'은(는) 유효한 리디렉션 상태 코드가 아닙니다.", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "리디렉션 응답 위치 헤더가 null입니다.", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "Blob Storage에 파일을 업로드하는 중 AzCopy.exe가 0이 아닌 종료 코드로 종료되었습니다.", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "스토리지 계정 키를 페치할 수 없습니다. 오류: '{0}'", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "WinRM 사용자 지정 스크립트를 수동으로 제거하고 배포를 다시 시도하세요.", + "loc.messages.ExpiredServicePrincipal": "Azure의 액세스 토큰을 페치할 수 없습니다. 사용한 서비스 주체가 유효하고 만료되지 않았는지 확인하세요.", + "loc.messages.UnsupportedAuthScheme": "엔드포인트에 대해 인증 체계 '{0}'은(는) 지원되지 않습니다.", + "loc.messages.ServicePrincipalError": "배포에 사용되는 서비스 사용자에 오류가 발생했습니다.", + "loc.messages.AzModuleNotFound": "'Az.Accounts' 모듈을 찾을 수 없습니다. 모듈이 최근에 설치된 경우 Azure Pipelines 작업 에이전트를 다시 시작한 후 다시 시도하세요." +} \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Strings/resources.resjson/ru-RU/resources.resjson b/Tasks/AzureFileCopyV6/Strings/resources.resjson/ru-RU/resources.resjson new file mode 100644 index 000000000000..19fb9e0370f3 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Strings/resources.resjson/ru-RU/resources.resjson @@ -0,0 +1,94 @@ +{ + "loc.friendlyName": "Копирование файлов Azure", + "loc.helpMarkDown": "[См. дополнительные сведения об этой задаче](https://aka.ms/azurefilecopyreadme)", + "loc.description": "Копировать файлы в хранилище BLOB-объектов Azure или виртуальные машины", + "loc.instanceNameFormat": "Копирование файлов $(Destination)", + "loc.releaseNotes": "Новые возможности версии 5.0:
   поддержка AzCopy.exe версии 10.12.2", + "loc.input.label.SourcePath": "Источник", + "loc.input.help.SourcePath": "Абсолютный путь к исходной папке или файлу на локальном компьютере или общему ресурсу UNC. Выражение должно возвращать одну папку или один файл. Подстановочный знак (*) поддерживается в любом месте пути к файлу или имени файла.", + "loc.input.label.ConnectedServiceNameARM": "Подписка Azure", + "loc.input.help.ConnectedServiceNameARM": "Подписка на Azure Resource Manager, предназначенная для копирования файлов.", + "loc.input.label.Destination": "Целевой тип", + "loc.input.help.Destination": "Выберите назначение: BLOB-объект Azure или виртуальные машины Azure.", + "loc.input.label.StorageAccountRM": "Учетная запись хранения Диспетчера ресурсов", + "loc.input.help.StorageAccountRM": "Укажите существующую учетную запись хранения ARM. Она также используется в качестве промежуточной для копирования файлов на виртуальные машины Azure", + "loc.input.label.ContainerName": "Имя контейнера", + "loc.input.help.ContainerName": "Имя контейнера для отправки файлов. Если контейнер с данным именем не существует в указанной учетной записи хранения, он будет создан автоматически.
Для создания виртуального каталога внутри контейнера используйте приведенный ниже входной префикс BLOB-объекта.
Пример. Если конечным расположением является https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/, укажите mycontainer в качестве имени контейнера и vd1/vd2/ в качестве префикса BLOB-объекта.", + "loc.input.label.BlobPrefix": "Префикс BLOB-объекта", + "loc.input.help.BlobPrefix": "Удобно для фильтрации файлов, например добавьте номер сборки ко всем BLOB-объектам для скачивания файлов только из этой сборки. Пример. Если префикс BLOB-объекта указан как myvd1/, в контейнере будет создан виртуальный каталог с таким именем. Префикс BLOB-объекта с конечным \"/\" будет считаться виртуальным каталогом. В противном случае он будет рассматриваться как файл, если копируемый элемент не является папкой. Исходные файлы будут скопированы в https://myaccount.blob.core.windows.net/mycontainer/myvd1/.", + "loc.input.label.EnvironmentNameRM": "Группа ресурсов", + "loc.input.help.EnvironmentNameRM": "Название целевой группы ресурсов, в которую копируются файлы.", + "loc.input.label.ResourceFilteringMethod": "Выбор компьютеров по", + "loc.input.help.ResourceFilteringMethod": "Можно также выбрать подмножество виртуальных машин в группе ресурсов, указав имя узла виртуальных машин или теги. [Теги](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/) поддерживаются только для ресурсов, созданных в Azure Resource Manager.", + "loc.input.label.MachineNames": "Условия фильтра", + "loc.input.help.MachineNames": "Укажите список имен узлов виртуальных машин (например, ffweb, ffdb) или тегов (например, Role:DB, Web; OS:Win8.1). Для тегов используются следующие разделители: , (запятая), : (двоеточие) и ; (точка с запятой). Если указывается несколько тегов, задача будет обрабатывать все виртуальные машины с указанными тегами. По умолчанию задача запускается на всех виртуальных машинах.", + "loc.input.label.vmsAdminUserName": "Имя для входа администратора", + "loc.input.help.vmsAdminUserName": "Имя администратора виртуальных машин.", + "loc.input.label.vmsAdminPassword": "Пароль", + "loc.input.help.vmsAdminPassword": "Пароль администратора для виртуальных машин.
Допустимы переменные, заданные в конвейерах сборки или выпуска как \"$(passwordVariable)\".
Чтобы защитить переменную, пометьте ее как secret.", + "loc.input.label.TargetPath": "Целевая папка", + "loc.input.help.TargetPath": "Локальный путь на целевых компьютерах для копирования файлов из источника. Переменную среды можно использовать как $env:windir\\BudgetIT\\Web.", + "loc.input.label.AdditionalArgumentsForBlobCopy": "Необязательные аргументы (для отправки файлов в большой двоичный объект)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "Необязательные аргументы AzCopy.exe, которые будут применены при отправке в BLOB-объект, например --check-length=true. Если здесь не указаны дополнительные аргументы, по умолчанию будут добавлены указанные ниже необязательные аргументы.
--log-level=INFO (если конвейер находится в режиме отладки, укажите --log-level=DEBUG),
--recursive (только если имя контейнера отличается от $root),
--blob-type=PageBlob (только если указанная учетная запись хранения относится к ценовой категории \"Премиум\").", + "loc.input.label.AdditionalArgumentsForVMCopy": "Необязательные аргументы (для скачивания файлов в виртуальную машину)", + "loc.input.help.AdditionalArgumentsForVMCopy": "Необязательные аргументы AzCopy.exe, которые будут применены при скачивании на виртуальную машину, например --check-length=true. Если здесь не указаны дополнительные аргументы, по умолчанию будут добавлены указанные ниже необязательные аргументы.
--log-level=INFO (если конвейер находится в режиме отладки, укажите --log-level=DEBUG),
--recursive", + "loc.input.label.sasTokenTimeOutInMinutes": "Период истечения срока действия маркера SAS в минутах", + "loc.input.help.sasTokenTimeOutInMinutes": "Укажите время в минутах, по истечении которого закончится срок действия маркера SAS для контейнера. По умолчанию срок действия маркера истекает через 4 часа.", + "loc.input.label.enableCopyPrerequisites": "Включить необходимые компоненты для копирования", + "loc.input.help.enableCopyPrerequisites": "При включении этого параметра выполняется настройка прослушивателя службы удаленного управления Windows (WinRM) по протоколу HTTPS на порте 5986 с использованием самозаверяющего сертификата. Эта конфигурация требуется для выполнения копирования на виртуальных машинах Azure. Если средства Load Balancer поддерживают целевые виртуальные машины, убедитесь, что правила NAT для входящего трафика настроены для целевого порта (5986). Применимо только для виртуальных машин ARM.", + "loc.input.label.CopyFilesInParallel": "Копировать параллельно", + "loc.input.help.CopyFilesInParallel": "Если задано значение \"true\", будет выполнено параллельное копирование файлов на целевые компьютеры.", + "loc.input.label.CleanTargetBeforeCopy": "Очистить целевой объект", + "loc.input.help.CleanTargetBeforeCopy": "Если задано значение \"true\", конечная папка будет очищена до копирования файлов.", + "loc.input.label.skipCACheck": "Тестовый сертификат", + "loc.input.help.skipCACheck": "Если выбрать этот параметр, клиент пропускает проверку того, подписан ли сертификат сервера доверенным центром сертификации при подключении по протоколу HTTP через SSL (HTTPS).", + "loc.messages.AFC_StorageAccountNotFound": "Учетная запись хранения \"{0}\" не найдена. Выбранное подключение к службе \"Субъект-служба\" поддерживает учетные записи хранения только типа Azure Resource Manager.", + "loc.messages.AFC_ResourceGroupNotFound": "Указанная группа ресурсов \"{0}\" не существует.", + "loc.messages.AFC_GetVMStatus": "[Вызов Azure] Выполняется получение состояния виртуальной машины \"{0}\"", + "loc.messages.AFC_GetVMStatusComplete": "[Вызов Azure] Состояние виртуальной машины \"{0}\" получено", + "loc.messages.AFC_GetCustomScriptExtension": "[Вызов Azure] Идет получение расширения пользовательских скриптов \"{0}\" для виртуальной машины \"{1}\"", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Вызов Azure] Расширение пользовательских скриптов \"{0}\" для виртуальной машины \"{1}\" получено", + "loc.messages.AFC_SetCustomScriptExtension": "[Вызов Azure] Выполняется задание расширения пользовательских скриптов \"{0}\" для виртуальной машины \"{1}\"", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Вызов Azure] Расширение пользовательских скриптов \"{0}\" для виртуальной машины \"{1}\" задано", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Вызов Azure] Идет удаление расширения пользовательских скриптов \"{0}\" для виртуальной машины \"{1}\"", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Вызов Azure] Расширение пользовательских скриптов \"{0}\" для виртуальной машины \"{1}\" удалено", + "loc.messages.AFC_NoNetworkInterface": "[Вызов Azure] Сетевые интерфейсы с идентификатором виртуальной машины {0} не найдены в группе ресурсов {1}", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Вызов Azure] ИД виртуальной машины и имя группы ресурсов не должны иметь значение NULL или быть пустыми", + "loc.messages.AFC_AzurePSNotInstalled": "Минимальная требуемая версия ({0}) командлетов Azure PowerShell не установлена. Для получения последней версии Azure PowerShell можно выполнить инструкции на странице https://azure.microsoft.com/ru-ru/documentation/articles/powershell-install-configure/.", + "loc.messages.AFC_ClassicStorageAccountNotFound": "Учетная запись хранения \"{0}\" не найдена. Выбранное подключение к службе \"Сертификат\" поддерживает учетные записи хранения только типа \"классическая Azure\".", + "loc.messages.AFC_GenericStorageAccountNotFound": "Учетная запись хранения \"{0}\" не найдена. Укажите существующую учетную запись хранения", + "loc.messages.AFC_AzureFileCopyMoreHelp": "Дополнительные сведения см. в {0}", + "loc.messages.AFC_UploadFilesStorageAccount": "Идет отправка файлов из исходного пути \"{0}\" в учетную запись хранения \"{1}\" в контейнере \"{2}\" с префиксом BLOB-объекта \"{3}\"", + "loc.messages.AFC_UploadContainerStorageAccount": "Сбой отправки в контейнер \"{0}\" в учетной записи хранения \"{1}\" с префиксом BLOB-объекта \"{2}\". Ошибка: \"{3}\"", + "loc.messages.AFC_UploadFileSuccessful": "Файлы успешно отправлены из исходного пути \"{0}\" в учетную запись хранения \"{1}\" в контейнере \"{2}\" с префиксом BLOB-объекта \"{3}\"", + "loc.messages.AFC_IncorrectTags": "Теги указаны неверно. Они должны быть в следующем формате: Role:Web,DB;Location:East US;Dept.:Finance,HR", + "loc.messages.AFC_MachineDoesNotExist": "Следующие компьютеры не существуют в группе ресурсов, или их имена указаны неправильно: {0}. Укажите именно те имена компьютеров, которые содержатся в группе ресурсов. Используйте запятые для разделения нескольких имен.", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "Не удается получить {0} для всех ресурсов в группе ресурсов: \"{1}\"", + "loc.messages.AFC_MachineNameFromIdError": "Не удается получить {0} для ресурсов \"{1}\" в группе ресурсов: \"{2}\"", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "Не удается найти ресурс \"{1}\", используя выбранное подключение к службе (\"{0}\"). Выбранное подключение к службе (\"{0}\") поддерживает только классические ресурсы (модель управления службами).", + "loc.messages.AFC_NoClassicVMResources": "В группе ресурсов \"{0}\" нет компьютеров для копирования. Выбранное подключение к службе, \"{1}\", поддерживает виртуальные машины только типа \"классическая Azure\".", + "loc.messages.AFC_NoARMVMResources": "В группе ресурсов \"{0}\" нет компьютеров для копирования. Выбранное подключение к службе, \"{1}\", поддерживает виртуальные машины только типа Azure Resource Manager.", + "loc.messages.AFC_NoGenericVMResources": "В группе ресурсов \"{0}\" нет компьютеров для копирования.", + "loc.messages.AFC_FilteringNoVMResources": "В группе ресурсов \"{0}\" нет компьютеров со следующим: {1} \"{2}\".", + "loc.messages.AFC_CopyStarted": "Началось копирование для компьютера: \"{0}\"", + "loc.messages.AFC_CopyCompleted": "Копирование состояния для компьютера \"{0}\": \"{1}\"", + "loc.messages.AFC_WinRMHelpMessage": "Чтобы исправить проблемы, связанные с подключением к службе WinRM, выберите в задаче параметр \"Включить необходимые компоненты для копирования\". Если этот параметр уже задан и балансировщик нагрузки поддерживает целевые виртуальные машины, необходимо настроить правила NAT для входящего трафика для целевого порта (5986). Применимо только к виртуальным машинам ARM.", + "loc.messages.AFC_CopyFailed": "Сбой копирования на компьютере \"{0}\". Дополнительные сведения см. в журналах.", + "loc.messages.AFC_ParallelCopyFailed": "Сбой копирования на один или несколько компьютеров. Дополнительные сведения см. в журналах.", + "loc.messages.AFC_CopySuccessful": "Файлы успешно скопированы из исходного пути \"{0}\" на целевые виртуальные машины Azure в группе ресурсов \"{1}\"", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "Сбой задания расширения пользовательских скриптов \"{0}\" для виртуальной машины \"{1}\" с ошибкой: \"{2}\".", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "Не удалось добавить правило безопасности сети: {0}", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "Не удается задать расширение пользовательских скриптов \"{0}\" для виртуальной машины \"{1}\": {2}", + "loc.messages.AFC_CopyPrereqsFailed": "Не удалось включить необходимые компоненты для копирования. {0}", + "loc.messages.AFC_BlobStorageNotFound": "Учетная запись хранения \"{0}\" не найдена. Укажите существующую учетную запись хранения", + "loc.messages.AFC_RootContainerAndDirectory": "Параметр \"/S\" является недопустимым для контейнеров $root.", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "Код ответа HTTP \"{0}\" не является допустимым кодом состояния перенаправления", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "Заголовок расположения ответа перенаправления равен NULL.", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "Программа AzCopy.exe завершила работу с ненулевым кодом выхода при отправке файлов в хранилище BLOB-объектов.", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "Не удалось получить ключ учетной записи хранения. Ошибка: \"{0}\"", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "Удалите пользовательский скрипт WinRM вручную и повторите попытку развертывания.", + "loc.messages.ExpiredServicePrincipal": "Не удалось получить маркер доступа для Azure. Убедитесь, что используемый субъект-служба является допустимым, а срок его действия не истек.", + "loc.messages.UnsupportedAuthScheme": "Схема проверки подлинности \"{0}\" не поддерживается для конечной точки.", + "loc.messages.ServicePrincipalError": "Произошла ошибка с субъектом-службой, используемой для развертывания.", + "loc.messages.AzModuleNotFound": "Не удалось найти модули \"Az.Accounts\". Если модуль был установлен недавно, повторите попытку, перезапустив агент задач Azure Pipelines." +} \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Strings/resources.resjson/zh-CN/resources.resjson b/Tasks/AzureFileCopyV6/Strings/resources.resjson/zh-CN/resources.resjson new file mode 100644 index 000000000000..242a01d9fff6 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Strings/resources.resjson/zh-CN/resources.resjson @@ -0,0 +1,94 @@ +{ + "loc.friendlyName": "Azure 文件复制", + "loc.helpMarkDown": "[了解有关此任务的详细信息](https://aka.ms/azurefilecopyreadme)", + "loc.description": "将文件复制到 Azure Blob 存储或虚拟机", + "loc.instanceNameFormat": "$(Destination) 文件复制", + "loc.releaseNotes": "版本 5.0 中的新增功能:
    支持 AzCopy.exe 版本 10.12.2", + "loc.input.label.SourcePath": "源", + "loc.input.help.SourcePath": "源文件夹、本地计算机上的文件或 UNC 共享的绝对路径。表达式应返回单个文件夹或文件。支持在文件路径或文件名的任何位置使用通配符(*)。", + "loc.input.label.ConnectedServiceNameARM": "Azure 订阅", + "loc.input.help.ConnectedServiceNameARM": "用于复制文件的目标帐户的 Azure 资源管理器订阅。", + "loc.input.label.Destination": "目标类型", + "loc.input.help.Destination": "选择目标,即 Azure Blob 或 Azure VM。", + "loc.input.label.StorageAccountRM": "RM 存储帐户", + "loc.input.help.StorageAccountRM": "指定预先存在的 ARM 存储帐户。它还用作将文件复制到 Azure VM 的中间帐户", + "loc.input.label.ContainerName": "容器名", + "loc.input.help.ContainerName": "用于上载文件的容器的名称。如果指定存储帐户中不存在具有给定名称的容器,将自动创建该容器。
如果需要在容器中创建虚拟目录,请使用下面的 blob 前缀输入。
示例: 如果目标位置是 https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/,则指定 mycontainer 作为容器名称,vd1/vd2/ 作为 blob 前缀。", + "loc.input.label.BlobPrefix": "Blob 前缀", + "loc.input.help.BlobPrefix": "用于筛选文件,例如,将生成号追加到所有 blob 以仅从该生成下载文件。示例: 如果将 blob 前缀指定为 myvd1/,则将在容器内创建具有此名称的虚拟目录。带有尾随“/”的 Blob 前缀将被视为虚拟目录。否则,除非要复制的项本身是文件夹,否则它将被视为文件。源文件将被复制到 https://myaccount.blob.core.windows.net/mycontainer/myvd1/。", + "loc.input.label.EnvironmentNameRM": "资源组", + "loc.input.help.EnvironmentNameRM": "要将文件复制到的目标资源组的名称。", + "loc.input.label.ResourceFilteringMethod": "计算机选择依据", + "loc.input.help.ResourceFilteringMethod": "(可选)通过提供 VM 主机名或标记选择资源组中 VM 的子集。仅通过 Azure 资源管理器创建的资源支持 [标记](https://learn.microsoft.com/zh-cn/azure/virtual-machines/tag-template/)。", + "loc.input.label.MachineNames": "筛选条件", + "loc.input.help.MachineNames": "提供 VM 主机名(ffweb、ffdb等)或标记(Role:DB、Web; OS:Win8.1等)的列表。请注意,标记所用的分隔符为 ,(冒号)、:(句点)和 ;(分号)。如果提供了多个标记,则任务将使用指定标记在所有 VM 中运行。默认为在所有 VM 中运行任务。", + "loc.input.label.vmsAdminUserName": "管理员登录名", + "loc.input.help.vmsAdminUserName": "VM 的管理员用户名。", + "loc.input.label.vmsAdminPassword": "密码", + "loc.input.help.vmsAdminPassword": "VM 的管理员密码。
可接受在生成/发布管道中定义为 \"$(passwordVariable)\" 的变量。
可将变量类型标记为“机密”来保护它。", + "loc.input.label.TargetPath": "目标文件夹", + "loc.input.help.TargetPath": "用于从源复制文件的目标计算机上的本地路径。可以使用环境变量,如 $env: windir\\BudgetIT\\Web。", + "loc.input.label.AdditionalArgumentsForBlobCopy": "可选参数(用于将文件上载到 blob)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "上传到 blob 时将应用的可选 AzCopy.exe 参数,如 --check-length=true。如果此处未指定任何可选参数,将默认添加以下可选参数。
--log-level=INFO (如果管道以调试模式运行,则设为 --log-level=DEBUG)、
--recursive (仅当容器名称不是 $root 时)、
--blob-type=PageBlob (仅当指定的存储帐户为高级帐户时)。", + "loc.input.label.AdditionalArgumentsForVMCopy": "可选参数(用于将文件下载到 VM)", + "loc.input.help.AdditionalArgumentsForVMCopy": "下载到 VM 时将应用的可选 AzCopy.exe 参数,如 --check-length=true。如果此处未指定任何可选参数,将默认添加以下可选参数。
--log-level=INFO (如果管道以调试模式运行,则设为 --log-level=DEBUG)、
--recursive", + "loc.input.label.sasTokenTimeOutInMinutes": "SAS 令牌有效期(分钟)", + "loc.input.help.sasTokenTimeOutInMinutes": "提供容器的 SAS 令牌过期前的时间(分钟)。默认情况下,此令牌将在 4 小时后过期。", + "loc.input.label.enableCopyPrerequisites": "启用复制先决条件", + "loc.input.help.enableCopyPrerequisites": "使用自签名证书启用此选项将在端口 5986 上配置针对 HTTPS 协议的 Windows 远程管理(WinRM)侦听器。需要此配置才能在 Azure 计算机上执行复制操作。如果目标虚拟机受 Load Balancer 支持,请确保为目标端口(5986)配置了入站 NAT 规则。仅适用于 ARM VM。", + "loc.input.label.CopyFilesInParallel": "并行复制", + "loc.input.help.CopyFilesInParallel": "将其设置为 true 会将文件并行复制到目标计算机。", + "loc.input.label.CleanTargetBeforeCopy": "清理目标", + "loc.input.help.CleanTargetBeforeCopy": "将其设置为 true 会在复制文件之前清理目标文件夹。", + "loc.input.label.skipCACheck": "测试证书", + "loc.input.help.skipCACheck": "如果选择了此选项,则在通过安全套接字层超文本传输协议(HTTPS)连接时,客户端将跳过验证服务器证书是否由受信任的证书颁发机构(CA)签署这一步骤。", + "loc.messages.AFC_StorageAccountNotFound": "未找到存储帐户 {0}。选定的服务连接“服务主体”仅支持 Azure 资源管理器类型的存储帐户。", + "loc.messages.AFC_ResourceGroupNotFound": "提供的资源组“{0}”不存在。", + "loc.messages.AFC_GetVMStatus": "[Azure Call]正在获取 VM“{0}”的状态", + "loc.messages.AFC_GetVMStatusComplete": "[Azure Call]已获得 VM“{0}”的状态", + "loc.messages.AFC_GetCustomScriptExtension": "[Azure Call]正在获取 VM“{1}”的自定义脚本扩展“{0}”", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Azure Call]已获得 VM“{1}”的自定义脚本扩展“{0}”", + "loc.messages.AFC_SetCustomScriptExtension": "[Azure Call]正在设置 VM“{1}”的自定义脚本扩展“{0}”", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Azure Call]已设置 VM“{1}”的自定义脚本扩展“{0}”", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Azure Call]正在删除 VM“{1}”的自定义脚本扩展“{0}”", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Azure Call]已删除 VM“{1}”的自定义脚本扩展“{0}”", + "loc.messages.AFC_NoNetworkInterface": "[Azure Call]在资源组 {1} 下,未找到虚拟机 ID 为 {0} 的网络接口", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Azure Call]资源组名称和虚拟机 ID 不应为 null 或空", + "loc.messages.AFC_AzurePSNotInstalled": "未安装 Azure Powershell Cmdlet 所需的最低版本 {0}。可以按照 https://azure.microsoft.com/en-in/documentation/articles/powershell-install-configure/ 中的说明进行操作,以获得最新的 Azure Powershell", + "loc.messages.AFC_ClassicStorageAccountNotFound": "未找到存储帐户 {0}。选定的服务连接“证书”仅支持 Azure 经典类型的存储帐户。", + "loc.messages.AFC_GenericStorageAccountNotFound": "未找到存储帐户 {0}。请指定现有的存储帐户", + "loc.messages.AFC_AzureFileCopyMoreHelp": "有关详细信息,请参阅 {0}", + "loc.messages.AFC_UploadFilesStorageAccount": "正在将文件从源路径“{0}”上传到具有 blob 前缀“{3}”的容器“{2}”中的存储帐户“{1}”", + "loc.messages.AFC_UploadContainerStorageAccount": "上传到存储帐户“{1}”中具有 blob 前缀“{2}”的容器“{0}”失败,出现错误:“{3}”", + "loc.messages.AFC_UploadFileSuccessful": "已成功将文件从源路径“{0}”上传到具有 blob 前缀“{3}”的容器“{2}”中的存储帐户“{1}”", + "loc.messages.AFC_IncorrectTags": "错误地指定了标记。其格式必须为 Role:Web,DB;Location:East US;Dept.:Finance,HR", + "loc.messages.AFC_MachineDoesNotExist": "以下计算机未出现在资源组中,或它们的名称指定错误: {0}。请提供资源组中显示的确实相同的计算机名称。使用逗号将多个计算机名称分隔开。", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "无法获得资源组“{1}”中所有资源的 {0}", + "loc.messages.AFC_MachineNameFromIdError": "无法获得资源组“{2}”中“{1}”资源的 {0}", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "无法使用选定的服务连接“{1}”找到资源“{0}”。选定的服务连接“{0}”仅支持经典资源(服务管理模型)。", + "loc.messages.AFC_NoClassicVMResources": "资源组“{0}”下不存在要复制的计算机。选定的服务连接“{1}”仅支持 Azure 经典类型的虚拟机。", + "loc.messages.AFC_NoARMVMResources": "资源组“{0}”下不存在要复制的计算机。选定的服务连接“{1}”仅支持 Azure 资源管理器类型的虚拟机。", + "loc.messages.AFC_NoGenericVMResources": "资源组“{0}”下不存在要复制的计算机。", + "loc.messages.AFC_FilteringNoVMResources": "具有以下 {1}“{2}”的资源组“{0}”下不存在计算机。", + "loc.messages.AFC_CopyStarted": "计算机“{0}”的复制已开始", + "loc.messages.AFC_CopyCompleted": "复制计算机“{0}”的状态:“{1}”", + "loc.messages.AFC_WinRMHelpMessage": "若要修复 WinRM 服务连接相关的问题,请在任务中选择“启用复制先决条件”选项。如果已经设置,且目标虚拟机由负载均衡器提供支持,请确保为目标端口(5986)配置入站 NAT 规则。仅适用于 ARM VM。", + "loc.messages.AFC_CopyFailed": "在计算机“{0}”上复制失败。有关详细信息,请参阅日志。", + "loc.messages.AFC_ParallelCopyFailed": "复制到一个或多个计算机失败。有关详细信息,请参阅日志。", + "loc.messages.AFC_CopySuccessful": "已成功将文件从源路径“{0}”复制到了资源组“{1}”中的目标 Azure VM", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "对虚拟机“{1}”的自定义脚本扩展“{0}”的设置失败,错误: {2}", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "未能添加网络安全规则: {0}", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "无法设置虚拟机“{1}”的自定义脚本扩展“{0}”: {2}", + "loc.messages.AFC_CopyPrereqsFailed": "无法启用复制先决条件。{0}", + "loc.messages.AFC_BlobStorageNotFound": "未找到存储帐户 {0}。请指定现有的存储帐户", + "loc.messages.AFC_RootContainerAndDirectory": "\"/S\" 选项对 $root 容器无效。", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "HTTP 响应代码:“{0}”不是有效的重定向状态代码", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "重定向响应位置标头为 null。", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "将文件上传到 blob 存储时,AzCopy.exe 以非零退出代码退出。", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "无法提取存储帐户密钥。错误: “{0}”", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "请手动卸载 WinRM 自定义脚本,然后重试部署。", + "loc.messages.ExpiredServicePrincipal": "无法提取 Azure 的访问令牌。请确保使用的服务主体有效且未过期。", + "loc.messages.UnsupportedAuthScheme": "终结点不支持的身份验证方案 \"{0}\"。", + "loc.messages.ServicePrincipalError": "用于部署的服务主体有错。", + "loc.messages.AzModuleNotFound": "找不到版本为 'Az.Accounts' 的模块。如果最近安装了该模块,请在重启 Azure Pipelines 任务代理后重试。" +} \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Strings/resources.resjson/zh-TW/resources.resjson b/Tasks/AzureFileCopyV6/Strings/resources.resjson/zh-TW/resources.resjson new file mode 100644 index 000000000000..f92e913fee03 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Strings/resources.resjson/zh-TW/resources.resjson @@ -0,0 +1,94 @@ +{ + "loc.friendlyName": "Azure 檔案複製", + "loc.helpMarkDown": "[深入了解此工作](https://aka.ms/azurefilecopyreadme) (英文)", + "loc.description": "將檔案複製到 Azure Blob 儲存體或虛擬機器", + "loc.instanceNameFormat": "$(Destination) 檔案複製", + "loc.releaseNotes": "5.0 版的新功能:
   支援 AzCopy.exe 10.12.2 版", + "loc.input.label.SourcePath": "來源", + "loc.input.help.SourcePath": "來源資料夾、本機電腦檔案或 UNC 共用的絕對路徑。運算式應該傳回單一資料夾或檔案。支援在檔案路徑或檔案名稱的任何位置使用萬用字元符號 (*)。", + "loc.input.label.ConnectedServiceNameARM": "Azure 訂用帳戶", + "loc.input.help.ConnectedServiceNameARM": "要作為複製檔案目標的 Azure Resource Manager 訂用帳戶。", + "loc.input.label.Destination": "目的地類型", + "loc.input.help.Destination": "選取目的地,可以是 Azure Blob 或 Azure VM。", + "loc.input.label.StorageAccountRM": "RM 儲存體帳戶", + "loc.input.help.StorageAccountRM": "指定預先存在的 ARM 儲存體帳戶。其也作為將檔案複製到 Azure VM 的中繼項目", + "loc.input.label.ContainerName": "容器名稱", + "loc.input.help.ContainerName": "用於上傳檔案的容器名稱。如果具有指定名稱的容器不存在於指定的儲存體帳戶中,會自動予以建立。
如需在容器內建立虛擬目錄,請使用以下 Blob 前置詞輸入。
範例: 如果您的目標位置是 https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/,則指定 mycontainer 作為容器名稱及指定 vd1/vd2/ 作為 Blob 前置詞。", + "loc.input.label.BlobPrefix": "Blob 前置詞", + "loc.input.help.BlobPrefix": "適用於篩選檔案,例如將組建編號附加到所有 Blob,以只從該組建下載檔案。範例: 如果您將 Blob 前置詞指定為 myvd1,會在容器內建立具有此名稱的虛擬目錄。尾端為 '/' 的 Blob 前置詞會被視為虛擬目錄。否則,除非要複製的項目本身是資料夾,否則它會被視為檔案。來源檔案會複製到 https://myaccount.blob.core.windows.net/mycontainer/myvd1/。", + "loc.input.label.EnvironmentNameRM": "資源群組", + "loc.input.help.EnvironmentNameRM": "要將檔案複製到其中的目標資源群組名稱。", + "loc.input.label.ResourceFilteringMethod": "選取電腦依據", + "loc.input.help.ResourceFilteringMethod": "您也可以提供 VM 主機名稱或標記,選擇是否要從資源群組中選取一組 VM。只有透過 Azure Resource Manager 建立的群組才支援 [標記](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/)。", + "loc.input.label.MachineNames": "篩選準則", + "loc.input.help.MachineNames": "提供 VM 主機名稱 (例如 ffweb、ffdb) 或標記 (例如 Role:DB、Web; OS:Win8.1) 的清單。請注意,標記可使用的分隔符號為 , (逗號)、: (冒號) 及 ; (分號)。如有提供多個標記,工作將會在所有具有指定標籤的 VM 上執行。根據預設,將會在所有的 VM 上執行工作。", + "loc.input.label.vmsAdminUserName": "系統管理員登入", + "loc.input.help.vmsAdminUserName": "VM 的系統管理員使用者名稱。", + "loc.input.label.vmsAdminPassword": "密碼", + "loc.input.help.vmsAdminPassword": "VM 的系統管理員密碼。
其可接受組建或發行管線中定義的變數為 '$(passwordVariable)'。
您可將變數標記為 'secret' 來加以保護。", + "loc.input.label.TargetPath": "目的地資料夾", + "loc.input.help.TargetPath": "從來源複製檔案時,目標電腦上所需的本機路徑。可使用環境變數,例如 $env:windir\\BudgetIT\\Web。", + "loc.input.label.AdditionalArgumentsForBlobCopy": "選擇性引數 (用於將檔案上傳到 Blob)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "上傳至 Blob 要套用的選用 AzCopy.exe 引數,例如 --check-length=true。根據預設,如未在此處指定任何選用引數,即會新增下列選用引數。
--log-level=INFO (如果管線正在偵錯模式中執行,請設定 --log-level=DEBUG),
--recursive (只有當容器名稱不是 $root 時),
--blob-type=PageBlob (只有當指定的儲存體帳戶為進階帳戶時)。", + "loc.input.label.AdditionalArgumentsForVMCopy": "選擇性引數 (用於將檔案下載到 VM)", + "loc.input.help.AdditionalArgumentsForVMCopy": "下載到 VM 時要套用的選用 AzCopy.exe 引數,例如 --check-length=true。根據預設,如未在此處指定任何選用引數,即會新增下列選用引數。
--log-level=INFO (如果管線正在偵錯模式中執行,請設定 --log-level=DEBUG),
--recursive", + "loc.input.label.sasTokenTimeOutInMinutes": "SAS 權杖到期期限 (分鐘)", + "loc.input.help.sasTokenTimeOutInMinutes": "提供容器 SAS 權杖到期前經過的分鐘數。根據預設,此權杖會在 4 小時後到期。", + "loc.input.label.enableCopyPrerequisites": "啟用複製必要條件", + "loc.input.help.enableCopyPrerequisites": "啟用此選項即可使用自我簽署憑證,透過連接埠 5986 上的 HTTPS 通訊協定來設定 Windows 遠端管理 (WinRM) 接聽程式。必須要有此設定,才能在 Azure 機器上執行複製作業。若目標虛擬機器受 Load Balancer 支援,請確認已設定目標連接埠 (5986) 的輸入 NAT 規則。僅適用於 ARM VM。", + "loc.input.label.CopyFilesInParallel": "平行複製", + "loc.input.help.CopyFilesInParallel": "若將其設定為 Ture,檔案會平行複製到目標電腦。", + "loc.input.label.CleanTargetBeforeCopy": "清除目標", + "loc.input.help.CleanTargetBeforeCopy": "若將其設定為 Ture,將會在複製檔案前先清除目的地資料夾。", + "loc.input.label.skipCACheck": "測試憑證", + "loc.input.help.skipCACheck": "若選取此選項,用戶端會在透過超文字安全傳輸通訊協定 (HTTPS) 連線時,略過驗證伺服器憑證是否已經由信任的憑證授權單位 (CA) 簽署。", + "loc.messages.AFC_StorageAccountNotFound": "找不到儲存體帳戶: {0}。選取的服務連線 'Service Principal' 僅支援 Azure Resource Manager 類型的儲存體帳戶。", + "loc.messages.AFC_ResourceGroupNotFound": "提供的資源群組 '{0}' 不存在。", + "loc.messages.AFC_GetVMStatus": "[Azure 呼叫]正在取得 VM '{0}' 的狀態", + "loc.messages.AFC_GetVMStatusComplete": "[Azure 呼叫]已取得 VM '{0}' 的狀態", + "loc.messages.AFC_GetCustomScriptExtension": "[Azure 呼叫]正在取得 VM '{1}' 的自訂指令碼延伸模組 '{0}'", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Azure 呼叫]已取得 VM '{1}' 的自訂指令碼延伸模組 '{0}'", + "loc.messages.AFC_SetCustomScriptExtension": "[Azure 呼叫]正在設定 VM '{1}' 的自訂指令碼延伸模組 '{0}'", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Azure 呼叫]設定 VM '{1}' 的自訂指令碼延伸模組 '{0}'", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Azure 呼叫]正在移除 VM '{1}' 的自訂指令碼延伸模組 '{0}'", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Azure 呼叫]已移除 VM '{1}' 的自訂指令碼延伸模組 '{0}'", + "loc.messages.AFC_NoNetworkInterface": "[Azure 呼叫]資源群組 {1} 下找不到虛擬機器識別碼為 {0} 的網路介面", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Azure 呼叫]資源群組名稱及虛擬機器識別碼不應為 null 或空白", + "loc.messages.AFC_AzurePSNotInstalled": "未安裝 Azure Powershell Cmdlet 要求的最低版本 {0}。您可以遵循下方網址中的指示取得最新 Azure Powershell: https://azure.microsoft.com/zh-tw/documentation/articles/powershell-install-configure/ (英文)", + "loc.messages.AFC_ClassicStorageAccountNotFound": "找不到儲存體帳戶: {0}。選取的服務連線 'Certificate' 僅支援 Azure 傳統類型的儲存體帳戶。", + "loc.messages.AFC_GenericStorageAccountNotFound": "找不到儲存體帳戶: {0}。請指定現有的儲存體帳戶", + "loc.messages.AFC_AzureFileCopyMoreHelp": "如需詳細資訊,請參閱 {0}", + "loc.messages.AFC_UploadFilesStorageAccount": "正在將檔案從來源路徑 '{0}' 上傳到儲存體帳戶 '{1}' 之 Blob 前置詞為 '{3}' 的容器 '{2}' 中", + "loc.messages.AFC_UploadContainerStorageAccount": "上傳到儲存體帳戶 '{0}' 中 Blob 前置詞為 '{2}' 的容器 '{1}' 失敗。錯誤: '{3}'", + "loc.messages.AFC_UploadFileSuccessful": "已成功將檔案從來源路徑 '{0}' 上傳到儲存體帳戶 '{1}' 之 Blob 前置詞為 '{3}' 的容器 '{2}' 中", + "loc.messages.AFC_IncorrectTags": "未正確指定標記。標記的格式必須為 Role:Web,DB;Location:East US;Dept.:Finance,HR", + "loc.messages.AFC_MachineDoesNotExist": "下列機器不存在於資源群組中,或未正確指定其名稱: {0}。請提供與資源群組中所顯示的機器名稱完全相同者。請使用逗號分隔多個機器名稱。", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "無法為 ResourceGroup 中的所有資源取得 {0}: '{1}'", + "loc.messages.AFC_MachineNameFromIdError": "無法為 ResourceGroup 中的 '{1}' 項資源取得 {0}: '{2}'", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "使用選取的服務連線 '{1}' 找不到資源 '{0}'。選取的服務連線 '{0}' 僅支援傳統資源 (服務管理模型)。", + "loc.messages.AFC_NoClassicVMResources": "資源群組 '{0}' 下沒有任何機器可複製。選取的服務連線 '{1}' 僅支援 Azure 傳統類型的虛擬機器。", + "loc.messages.AFC_NoARMVMResources": "資源群組 '{0}' 下沒有任何機器可複製。選取的服務連線 '{1}' 僅支援 Azure Resource Manager 類型的虛擬機器。", + "loc.messages.AFC_NoGenericVMResources": "資源群組: '{0}' 下沒有任何機器可複製。", + "loc.messages.AFC_FilteringNoVMResources": "資源群組: '{0}' 下沒有任何機器具有下列 {1} '{2}'。", + "loc.messages.AFC_CopyStarted": "已開始電腦的複製: '{0}'", + "loc.messages.AFC_CopyCompleted": "複製電腦 '{0}' 的狀態: '{1}'", + "loc.messages.AFC_WinRMHelpMessage": "若要修正 WinRM 服務連線相關問題,請在工作中選取 [啟用複製必要條件] 選項。若已設定,且負載平衡器支援目標虛擬機器,請確認已為目標連接埠 (5986) 設定輸入 NAT 規則。僅適用於 ARM VM。", + "loc.messages.AFC_CopyFailed": "機器 '{0}' 上的複製失敗。如需詳細資料,請參閱記錄檔。", + "loc.messages.AFC_ParallelCopyFailed": "無法複製到一或多部機器。如需詳細資料,請參閱記錄檔。", + "loc.messages.AFC_CopySuccessful": "已成功從來源路徑 '{0}' 將檔案複製到資源群組 '{1}' 中的目標 Azure VM", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "為虛擬機器 '{1}' 設定自訂指令碼延伸模組 '{0}' 失敗,發生錯誤: {2}", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "無法新增網路安全性規則: {0}", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "無法為虛擬機器 '{2}' 設定自訂指令碼延伸模組 '{0}': {1}", + "loc.messages.AFC_CopyPrereqsFailed": "無法啟用複製必要條件。{0}", + "loc.messages.AFC_BlobStorageNotFound": "找不到儲存體帳戶: {0}。請指定現有的儲存體帳戶", + "loc.messages.AFC_RootContainerAndDirectory": "'/S' 選項對 $root 容器而言無效。", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "HTTP 回應碼: '{0}' 不是有效的重新導向狀態碼", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "重新導向回應位置標頭為 null。", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "將檔案上傳至 Blob 儲存體時 AzCopy.exe 已結束,結束代碼不為零。", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "無法擷取儲存體帳戶金鑰。錯誤: '{0}'", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "請手動將 WinRM 自訂指令碼解除安裝,並重試部署。", + "loc.messages.ExpiredServicePrincipal": "無法擷取 Azure 的存取權杖。請驗證使用的服務主體是否有效且未過期。", + "loc.messages.UnsupportedAuthScheme": "端點不支援驗證配置 '{0}'。", + "loc.messages.ServicePrincipalError": "部署用的服務主體有錯誤。", + "loc.messages.AzModuleNotFound": "找不到模組 'Az.Accounts'。若最近才安裝該模組,請重新啟動 Azure Pipelines 工作代理程式,然後重試。" +} \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Tests/L0.ts b/Tasks/AzureFileCopyV6/Tests/L0.ts new file mode 100644 index 000000000000..9f90f2cdb066 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0.ts @@ -0,0 +1,103 @@ +/// +/// +/// + +import Q = require('q'); +import assert = require('assert'); +import path = require('path'); + +var psm = require('../../../Tests/lib/psRunner'); +var psr = null; + +describe('AzureFileCopy Suite', function () { + this.timeout(parseInt(process.env.TASK_TEST_TIMEOUT) || 20000); + + before((done) => { + if (psm.testSupported()) { + psr = new psm.PSRunner(); + psr.start(); + } + done(); + }); + + after(function () { + if (psr) { + psr.kill(); + } + }); + + if (psm.testSupported()) { + it('Validate AzureFileCopy.Utility Get-AzureUtility', (done) => { + psr.run(path.join(__dirname, 'L0GetAzureUtility.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Validate-AzurePowershellVersion', (done) => { + psr.run(path.join(__dirname, 'L0ValidateAzurePSVersion.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-StorageKey', (done) => { + psr.run(path.join(__dirname, 'L0GetStorageKey.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-StorageAccountType', (done) => { + psr.run(path.join(__dirname, 'L0GetStorageAccountType.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-blobStorageEndpoint', (done) => { + psr.run(path.join(__dirname, 'L0GetblobStorageEndpoint.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-StorageKey', (done) => { + psr.run(path.join(__dirname, 'L0UtilityThrowError.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Does-AzureVMMatchTagFilterCriteria', (done) => { + psr.run(path.join(__dirname, 'L0DoesAzureVMMatchTagFilter.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-TagBasedFilteredAzureVMs', (done) => { + psr.run(path.join(__dirname, 'L0GetTagBasedFilteredAzureVMs.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-MachineBasedFilteredAzureVMs', (done) => { + psr.run(path.join(__dirname, 'L0GetMachineBasedFilteredAzureVMs.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-FilteredAzureVMsInResourceGroup', (done) => { + psr.run(path.join(__dirname, 'L0GetFilteredAzureVmsInResourceGroup.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-FilteredAzureRMVMsInResourceGroup', (done) => { + psr.run(path.join(__dirname, 'L0GetFilteredAzureRMVmsInResourceGroup.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-MachineNameFromId', (done) => { + psr.run(path.join(__dirname, 'L0GetMachineNameFromId.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-MachinesFqdnsForLB', (done) => { + psr.run(path.join(__dirname, 'L0GetMachinesFqdnForLB.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-FrontEndPorts', (done) => { + psr.run(path.join(__dirname, 'L0GetFrontEndPorts.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-AzureRMVMsConnectionDetailsInResourceGroup', (done) => { + psr.run(path.join(__dirname, 'L0GetRMVMConnectionDetailsInRG.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-AzureVMResourcesProperties', (done) => { + psr.run(path.join(__dirname, 'L0GetAzureVMResourcesProperties.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-AzureVMsCredentials', (done) => { + psr.run(path.join(__dirname, 'L0GetAzureVMsCredentials.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Copy-FilesParallelyToAzureVMs', (done) => { + psr.run(path.join(__dirname, 'L0CopyFilesParallelyToAzureVMs.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Copy-FilesToAzureVMsFromStorageContainer', (done) => { + psr.run(path.join(__dirname, 'L0CopyFilesToAzureVMsFromStorageContainer.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Validate-CustomScriptExecutionStatus', (done) => { + psr.run(path.join(__dirname, 'L0ValidateCustomScriptExecutionStatus.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Add-AzureVMCustomScriptExtension', (done) => { + psr.run(path.join(__dirname, 'L0AddAzureVMCustomScriptExtension.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Is-WinRMCustomScriptExtensionExists', (done) => { + psr.run(path.join(__dirname, 'L0IsWinRMCustomScriptExtensionExists.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Copy-FilesSequentiallyToAzureVMs', (done) => { + psr.run(path.join(__dirname, 'L0CopyFilesSequentiallyToAzureVMs.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Check-ContainerNameAndArgs', (done) => { + psr.run(path.join(__dirname, 'L0CheckContainerNameAndArgs.ps1'), done); + }); + } +}); diff --git a/Tasks/AzureFileCopyV6/Tests/L0AddAzureVMCustomScriptExtension.ps1 b/Tasks/AzureFileCopyV6/Tests/L0AddAzureVMCustomScriptExtension.ps1 new file mode 100644 index 000000000000..807b1a875a4b --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0AddAzureVMCustomScriptExtension.ps1 @@ -0,0 +1,68 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +Register-Mock Write-Telemetry { } +Register-Mock Get-TargetUriFromFwdLink { "http://externalFile" } + +# Test 1 "Should throw Resource group name is null" +Assert-Throws { + Add-AzureVMCustomScriptExtension -resourceGroupName $null -vmName $vm0Name -dnsName $azurevmFqdn -location $location -connectedServiceName $connectedServiceName +} -MessagePattern "AFC_CopyPrereqsFailed *" + + +# Test 2 "Should throw when VM name is null" +Assert-Throws { + Add-AzureVMCustomScriptExtension -resourceGroupName $validRG -vmName $null -dnsName $azurevmFqdn -location $location -connectedServiceName $connectedServiceName +} -MessagePattern "AFC_CopyPrereqsFailed *" + +# Test 3 "should throw when VM name is invalid" +Register-Mock Get-Endpoint {} +Assert-Throws { + Add-AzureVMCustomScriptExtension -resourceGroupName $validRG -vmName $invalidMachineName -dnsName $azurevmFqdn -location $location -connectedServiceName $connectedServiceName +} -MessagePattern "AFC_CopyPrereqsFailed AFC_UnableToSetCustomScriptExtension *" + +# Test 4 "Should fail to provision winrm custom script extension and remove the failed extension" +$extensionName="WinRMCustomScriptExtension" +Register-Mock Set-AzureMachineCustomScriptExtension { + return Set-AzureMachineCustomScriptExtension -resourceGroupName $resourceGroupName -vmName $vmName -name $extensionName -fileUri $configWinRMScriptFile, $makeCertFile -run $invalidCustomScriptName -argument $dnsName -location $location +} -ParametersEvaluator { $run -eq $scriptToRun } + +Assert-Throws { + Add-AzureVMCustomScriptExtension -resourceGroupName $validRG -vmName $vm0Name -dnsName $azurevmFqdn -location $location -connectedServiceName $connectedServiceName +} -MessagePattern "AFC_CopyPrereqsFailed *" + +Assert-AreEqual 0 $vmInstanceViews[$vm0Name]["Extensions"].Count + +# Test 5 "Should fail to deploy winrm custom script extension and remove the failed extension" +$extensionName="WinRMCustomScriptExtension" +Unregister-Mock Set-AzureMachineCustomScriptExtension +Register-Mock Set-AzureMachineCustomScriptExtension { + return Set-AzureMachineCustomScriptExtension -resourceGroupName $resourceGroupName -vmName $vmName -name $extensionName -fileUri $configWinRMScriptFile, $makeCertFile -run $invalidCustomScriptName -argument $dnsName -location $location +} -ParametersEvaluator { $run -eq $scriptToRun } + +Assert-Throws { + Add-AzureVMCustomScriptExtension -resourceGroupName $validRG -vmName $vm0Name -dnsName $azurevmFqdn -location $location -connectedServiceName $connectedServiceName +} -MessagePattern "AFC_CopyPrereqsFailed *" + +Assert-AreEqual 0 $vmInstanceViews[$vm0Name]["Extensions"].Count + +# Test 6 "Should configure winrm successfully on target azure vm for valid Input" +Unregister-Mock Set-AzureMachineCustomScriptExtension +Add-AzureVMCustomScriptExtension -resourceGroupName $validRG -vmName $vm0Name -dnsName $azurevmFqdn -location $location -connectedServiceName $connectedServiceName +$tempStatus = Get-AzureMachineStatus -resourceGroupName $validRG -name $vm0Name +$tempStatus.Extensions.Statuses.DisplayStatus.Contains("Provisioning succeeded"); + +# Test 7 "Should skip configuring winrm on target azure vm" +Register-Mock Set-AzureMachineCustomScriptExtension { return $null } +Register-Mock Is-WinRMCustomScriptExtensionExists { return $true } +Add-AzureVMCustomScriptExtension -resourceGroupName $validRG -vmName $vm0Name -dnsName $azurevmFqdn -location $location -connectedServiceName $connectedServiceName + +Assert-WasCalled Set-AzureMachineCustomScriptExtension -Times 0 + +#Clean the extension +$vmInstanceViews[$vm0Name]["Extensions"]=@() \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Tests/L0CheckContainerNameAndArgs.ps1 b/Tasks/AzureFileCopyV6/Tests/L0CheckContainerNameAndArgs.ps1 new file mode 100644 index 000000000000..0b00285d6200 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0CheckContainerNameAndArgs.ps1 @@ -0,0 +1,15 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\..\Utility.ps1 + +Register-Mock Write-Warning { } + +Check-ContainerNameAndArgs -containerName '$root' -additionalArguments " --recursive " +Check-ContainerNameAndArgs -containerName '$root' -additionalArguments " --recursive --log-level=ERROR " +Check-ContainerNameAndArgs -containerName '$root' -additionalArguments " --recursive --log-level=ERROR" + +Assert-WasCalled Write-Warning -Times 3 + +Unregister-Mock Write-Warning \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Tests/L0CopyFilesParallelyToAzureVMs.ps1 b/Tasks/AzureFileCopyV6/Tests/L0CopyFilesParallelyToAzureVMs.ps1 new file mode 100644 index 000000000000..2f35bd2e381b --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0CopyFilesParallelyToAzureVMs.ps1 @@ -0,0 +1,34 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$vmName = "myVM0" +$vmfqdn = "lbipac2b71e2680c44fd987d.westus.cloudapp.azure.com" +$vmWinRMHttpsPort1 = '40001' +$vmWinRMHttpsPort2 = '40003' +$vmWinRMHttpsPort3 = '40005' +$azureVMsProperties = Get-AzureVMResourcesProperties -resourceGroupName $validRG -resourceFilteringMethod 'tags' +$azureVMCredntials = Get-AzureVMsCredentials -vmsAdminUserName $validInputVmsAdminUserName -vmsAdminPassword $validInputVmsAdminPassword + +Register-Mock ConvertTo-SecureString { return $securedMockPassword } +$invokeRemoteScriptParams = Get-InvokeRemoteScriptParameters -azureVMResourcesProperties $azureVMsProperties -networkCredentials $azureVMCredntials + +# Test 1 "Should throw if failed on one vm and passed on other vm" + +Register-Mock Invoke-RemoteScript { return $invokeRemoteScriptOnePassOneFailResponse } + +Assert-Throws { + Copy-FilesParallellyToAzureVMs -targetMachineNames $invokeRemoteScriptParams.targetMachineNames -credential $invokeRemoteScriptParams.credential -protocol $invokeRemoteScriptParams.protocol -sessionName "AFCCopyToVMs" -remoteScriptJobArguments @{} -sessionOption $invokeRemoteScriptParams.sessionOption +} -MessagePattern "AFC_ParallelCopyFailed*" + +# Test 2 "Should not throw if copy passed on both vms" + +Unregister-Mock Invoke-RemoteScript +Register-Mock Invoke-RemoteScript { return $invokeRemoteScriptAllPassedResponse } + +Copy-FilesParallellyToAzureVMs -targetMachineNames $invokeRemoteScriptParams.targetMachineNames -credential $invokeRemoteScriptParams.credential -protocol $invokeRemoteScriptParams.protocol -sessionName "AFCCopyToVMs" -remoteScriptJobArguments @{} -sessionOption $invokeRemoteScriptParams.sessionOption diff --git a/Tasks/AzureFileCopyV6/Tests/L0CopyFilesSequentiallyToAzureVMs.ps1 b/Tasks/AzureFileCopyV6/Tests/L0CopyFilesSequentiallyToAzureVMs.ps1 new file mode 100644 index 000000000000..5f5cdb928f8f --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0CopyFilesSequentiallyToAzureVMs.ps1 @@ -0,0 +1,30 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$vmName = "myVM0" +$vmfqdn = "lbipac2b71e2680c44fd987d.westus.cloudapp.azure.com" +$vmWinRMHttpsPort = '40003' +$azureVMsProperties = Get-AzureVMResourcesProperties -resourceGroupName $validRG -resourceFilteringMethod 'tags' +$azureVMCredntials = Get-AzureVMsCredentials -vmsAdminUserName $validInputVmsAdminUserName -vmsAdminPassword $validInputVmsAdminPassword + +Register-Mock ConvertTo-SecureString { return $securedMockPassword } +$invokeRemoteScriptParams = Get-InvokeRemoteScriptParameters -azureVMResourcesProperties $azureVMsProperties -networkCredentials $azureVMCredntials + +Register-Mock Invoke-RemoteScript { return $invokeRemoteScriptFailedResponse } + +# Test 1 "Should throw if failed on one vm" +Assert-Throws { + Copy-FilesSequentiallyToAzureVMs -targetMachineNames $invokeRemoteScriptParams.targetMachineNames -credential $invokeRemoteScriptParams.credential -protocol $invokeRemoteScriptParams.protocol -sessionName "AFCCopyToVMs" -remoteScriptJobArguments @{} -sessionOption $invokeRemoteScriptParams.sessionOption +} -MessagePattern "AFC_CopyFailed $vmfqdn`:$vmWinRMHttpsPort AFC_AzureFileCopyMoreHelp*" + +# Test 2 "Should not throw if copy succeded on both vms" +Unregister-Mock Invoke-RemoteScript +Register-Mock Invoke-RemoteScript { return $invokeRemoteScriptPassedResponse } + +Copy-FilesSequentiallyToAzureVMs -targetMachineNames $invokeRemoteScriptParams.targetMachineNames -credential $invokeRemoteScriptParams.credential -protocol $invokeRemoteScriptParams.protocol -sessionName "AFCCopyToVMs" -remoteScriptJobArguments @{} -sessionOption $invokeRemoteScriptParams.sessionOption \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Tests/L0CopyFilesToAzureVMsFromStorageContainer.ps1 b/Tasks/AzureFileCopyV6/Tests/L0CopyFilesToAzureVMsFromStorageContainer.ps1 new file mode 100644 index 000000000000..290e7b4ee467 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0CopyFilesToAzureVMsFromStorageContainer.ps1 @@ -0,0 +1,61 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\..\AzureFileCopyRemoteJob.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$azureVMsProperties = Get-AzureVMResourcesProperties -resourceGroupName $validRG -resourceFilteringMethod 'tags' +$azureVMCredntials = Get-AzureVMsCredentials -vmsAdminUserName $validInputVmsAdminUserName -vmsAdminPassword $validInputVmsAdminPassword + +Register-Mock Get-ChildItem { } + +Register-Mock Copy-FilesParallellyToAzureVMs { } +Register-Mock Copy-FilesSequentiallyToAzureVMs { } + +Register-Mock ConvertTo-SecureString { return $securedMockPassword } +$invokeRemoteScriptParams = Get-InvokeRemoteScriptParameters -azureVMResourcesProperties $azureVMsProperties -networkCredentials $azureVMCredntials + +# Test 1 "Should Call Copy-FilesParallellyToAzureVMs for parallel option" +Copy-FilesToAzureVMsFromStorageContainer -targetMachineNames $invokeRemoteScriptParams.targetMachineNames -credential $invokeRemoteScriptParams.credential ` + -protocol $invokeRemoteScriptParams.protocol ` + -sessionOption $invokeRemoteScriptParams.sessionOption ` + -blobStorageEndpoint $validBlobStorageEndpoint ` + -containerName $validInputContainerName ` + -containerSasToken $validSasToken ` + -targetPath $validInputTargetPath ` + -cleanTargetBeforeCopy $false ` + -copyFilesInParallel $true ` + -additionalArguments "" ` + -azCopyToolLocation "AzCopy" ` + -fileCopyJobScript $AzureFileCopyRemoteJob ` + -enableDetailedLogging $false + + +Assert-WasCalled Copy-FilesParallellyToAzureVMs -Times 1 +Assert-WasCalled Copy-FilesSequentiallyToAzureVMs -Times 0 + + +# Test 2 "should call Copy-FilesSequentiallyToAzureVMs for sequential option" +Copy-FilesToAzureVMsFromStorageContainer -targetMachineNames $invokeRemoteScriptParams.targetMachineNames -credential $invokeRemoteScriptParams.credential ` + -protocol $invokeRemoteScriptParams.protocol ` + -sessionOption $invokeRemoteScriptParams.sessionOption ` + -blobStorageEndpoint $validBlobStorageEndpoint ` + -containerName $validInputContainerName ` + -containerSasToken $validSasToken ` + -targetPath $validInputTargetPath ` + -cleanTargetBeforeCopy $false ` + -copyFilesInParallel $false ` + -additionalArguments "" ` + -azCopyToolLocation "AzCopy" ` + -fileCopyJobScript $AzureFileCopyRemoteJob ` + -enableDetailedLogging $false + + +Unregister-Mock Copy-FilesParallellyToAzureVMs +Register-Mock Copy-FilesParallellyToAzureVMs { } + +Assert-WasCalled Copy-FilesParallellyToAzureVMs -Times 0 +Assert-WasCalled Copy-FilesSequentiallyToAzureVMs -Times 1 \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Tests/L0DoesAzureVMMatchTagFilter.ps1 b/Tasks/AzureFileCopyV6/Tests/L0DoesAzureVMMatchTagFilter.ps1 new file mode 100644 index 000000000000..a9debca28daa --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0DoesAzureVMMatchTagFilter.ps1 @@ -0,0 +1,33 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +Register-Mock Write-Telemetry { } +Register-Mock Switch-AzureMode { } + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$azureRMVMResources = Get-AzureRMVMsInResourceGroup -resourceGroupName $validRG +$azureVMResource1 = $azureRMVMResources[0] +$validTagFilterForVMResource1 = "role:test" +$azureVMResource2 = $azureRMVMResources[1] + +# Test 1 "should return true if vm match tag filter criteria with case insensitive check" +$vmMatchFilterCriteria = Does-AzureVMMatchTagFilterCriteria -azureVMResource $azureVMResource1 -filter "Role:TEST, Test1" +Assert-AreEqual $true $vmMatchFilterCriteria + +# Test 2 "should return true if vm match tag filter criteria with same tag repeated twice" +$vmMatchFilterCriteria = Does-AzureVMMatchTagFilterCriteria -azureVMResource $azureVMResource2 -filter "OS:win8, win9; Role:myTEST, MYTest, Test1" +Assert-AreEqual $true $vmMatchFilterCriteria + +# Test 3 "should return false if vm does not match tag filter criteria" +$vmMatchFilterCriteria = Does-AzureVMMatchTagFilterCriteria -azureVMResource $azureVMResource2 -filter "OS:win8, win9; Role:Test5, Test2, Test1" +Assert-AreEqual $false $vmMatchFilterCriteria + +# Test 4 "Should throw if invalid tag filter format" +Assert-Throws { + Does-AzureVMMatchTagFilterCriteria -azureVMResource $azureVMResource2 -filter "OS:win8 : win9; Role:myTEST, MYTest, Test1" +} -MessagePattern "AFC_IncorrectTags" \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Tests/L0GetAzureUtility.ps1 b/Tasks/AzureFileCopyV6/Tests/L0GetAzureUtility.ps1 new file mode 100644 index 000000000000..461b266d8980 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0GetAzureUtility.ps1 @@ -0,0 +1,22 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +$azModule100 = New-Object -TypeName System.Version -ArgumentList "1.0.0" +$connectedServiceName = "DummyConnectedServiceName" + +Register-Mock Get-TypeOfConnection { return "ServicePrincipal"} + +. $PSScriptRoot\..\Utility.ps1 + +#Test 1 "Should return AzureUtilityAz1.0.ps1 if Az module is installed" +Register-Mock Get-Module { return $azModule100 } +$azureUtilityFile = Get-AzureUtility +Assert-AreEqual $azureUtilityFile "AzureUtilityAz1.0.ps1" + +#Test 2 "Should return AzureUtilityARM.ps1 Az module is not installed" +Unregister-Mock Get-Module +Register-Mock Get-Module { return } +$azureUtilityFile = Get-AzureUtility -connectedServiceName $connectedServiceName +Assert-AreEqual $azureUtilityFile "AzureUtilityARM.ps1" diff --git a/Tasks/AzureFileCopyV6/Tests/L0GetAzureVMResourcesProperties.ps1 b/Tasks/AzureFileCopyV6/Tests/L0GetAzureVMResourcesProperties.ps1 new file mode 100644 index 000000000000..da1b2c8d3d87 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0GetAzureVMResourcesProperties.ps1 @@ -0,0 +1,31 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +Register-Mock Write-Telemetry { } + +# Test 1 "should throw if no azurevm resources" +Assert-Throws { + Get-AzureVMResourcesProperties -resourceGroupName $rgWithNoVM -resourceFilteringMethod 'tags' +} -MessagePattern "AFC_NoARMVMResources*" + +# Test 2 "should return azureVM resources if valid input given" +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$vmName = "myVM0" +$vmfqdn = "lbipac2b71e2680c44fd987d.westus.cloudapp.azure.com" +$vmWinRMHttpsPort = '40001' + +$response = Get-AzureVMResourcesProperties -resourceGroupName $validRG -resourceFilteringMethod 'tags' + +Assert-IsNotNullOrEmpty $response +Assert-AreEqual 3 $response.Count + +$resource = $response[$vmName] + +Assert-AreEqual $vmName $resource.Name +Assert-AreEqual $vmfqdn $resource.fqdn +Assert-AreEqual $vmWinRMHttpsPort $resource.winRMHttpsPort \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Tests/L0GetAzureVMsCredentials.ps1 b/Tasks/AzureFileCopyV6/Tests/L0GetAzureVMsCredentials.ps1 new file mode 100644 index 000000000000..584df180c0a8 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0GetAzureVMsCredentials.ps1 @@ -0,0 +1,16 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$userName = "userName" +$password = "password" + +# Test 1 "Should return System.Net.NetworkCredential with valid values" +$result = Get-AzureVMsCredentials -vmsAdminUserName $userName -vmsAdminPassword $password +Assert-AreEqual "System.Net.NetworkCredential" $result.GetType().FullName +Assert-AreEqual $userName $result.userName +Assert-AreEqual $password $result.Password \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Tests/L0GetFilteredAzureRMVmsInResourceGroup.ps1 b/Tasks/AzureFileCopyV6/Tests/L0GetFilteredAzureRMVmsInResourceGroup.ps1 new file mode 100644 index 000000000000..73674a2f40d7 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0GetFilteredAzureRMVmsInResourceGroup.ps1 @@ -0,0 +1,19 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$azureRMVMResources = Get-AzureRMVMsInResourceGroup -resourceGroupName $validRG + +Register-Mock Get-FilteredAzureVMsInResourceGroup {} + +# Test 1 "should call Get-FilteredAzureVMsInResourceGroup with proper paramters" +Get-FilteredAzureRMVMsInResourceGroup -azureRMVMResources $azureRMVMResources -resourceFilteringMethod "tags" -filter "" +Assert-WasCalled Get-FilteredAzureVMsInResourceGroup -Times 1 -ParametersEvaluator { + $resourceFilteringMethod -eq "tags"-and $filter -eq "" -and $azureVMResources.Count -eq $azureRMVMResources.Count +} diff --git a/Tasks/AzureFileCopyV6/Tests/L0GetFilteredAzureVmsInResourceGroup.ps1 b/Tasks/AzureFileCopyV6/Tests/L0GetFilteredAzureVmsInResourceGroup.ps1 new file mode 100644 index 000000000000..987c1cbe2fac --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0GetFilteredAzureVmsInResourceGroup.ps1 @@ -0,0 +1,27 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\MockHelper.ps1 + +Register-Mock Write-Telemetry {} + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$azureRMVMResources = Get-AzureRMVMsInResourceGroup -resourceGroupName $validRG + +# Test 1 "should call tag filter if machineNames filter selected and no filter provided" +$filteredAzureVMResources = Get-FilteredAzureVMsInResourceGroup -azureVMResources $azureRMVMResources -resourceFilteringMethod "machineNames" -filter "" +Assert-AreEqual 3 $filteredAzureVMResources.Count + +# Test 2 "should call tag filter when tags filter selected and non-empty filter provided" +$filteredAzureVMResources = Get-FilteredAzureVMsInResourceGroup -azureVMResources $azureRMVMResources -resourceFilteringMethod "tags" -filter "role:web" +Assert-AreEqual 0 $filteredAzureVMResources.Count + +Register-Mock Get-MachineBasedFilteredAzureVMs { } + +# Test 3 "should call Get-MachineBasedFilteredAzureVMs for machineNames filter with non-empty filter" +$filteredAzureVMResources = Get-FilteredAzureVMsInResourceGroup -azureVMResources $azureRMVMResources -resourceFilteringMethod "machineNames" -filter "vm0" +Assert-AreEqual 0 $filteredAzureVMResources.Count diff --git a/Tasks/AzureFileCopyV6/Tests/L0GetFrontEndPorts.ps1 b/Tasks/AzureFileCopyV6/Tests/L0GetFrontEndPorts.ps1 new file mode 100644 index 000000000000..3a5fd3bcaa77 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0GetFrontEndPorts.ps1 @@ -0,0 +1,34 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$winrmPort1 = "40001" +$winrmPort2 = "40003" +$winrmPort3 = "40005" +$vmfqdn = "lbipac2b71e2680c44fd987d.westus.cloudapp.azure.com" +$azureRMVMResources = Get-AzureRMVMsInResourceGroup -resourceGroupName $validRG +$azureRGResourcesDetails = Get-AzureRMResourceGroupResourcesDetails -resourceGroupName $validRG -azureRMVMResources $azureRMVMResources +$networkInterfaceResources = $azureRGResourcesDetails["networkInterfaceResources"] +$publicIPAddressResources = $azureRGResourcesDetails["publicIPAddressResources"] +$loadBalancerResources = $azureRGResourcesDetails["loadBalancerResources"] + +# Test 1 "It should valid portList if RG deployed successfully" +[hashtable]$winRMHttpsPortMap = @{} +foreach($lbName in $loadBalancerResources.Keys){ + $lbDetails = $loadBalancerResources[$lbName] + $frontEndIPConfigs = $lbDetails["frontEndIPConfigs"] + $inboundRules = $lbDetails["inboundRules"] + $winRMHttpsPortMap = Get-FrontEndPorts -BackEndPort "5986" -PortList $winRMHttpsPortMap -networkInterfaceResources $networkInterfaceResources -inboundRules $inboundRules + + Assert-AreEqual $true $winRMHttpsPortMap.ContainsKey($azureRMVMResources[0].Id) + Assert-AreEqual $winrmPort1 $winRMHttpsPortMap[$azureRMVMResources[0].Id] + + Assert-AreEqual $true $winRMHttpsPortMap.ContainsKey($azureRMVMResources[1].Id) + Assert-AreEqual $winrmPort2 $winRMHttpsPortMap[$azureRMVMResources[1].Id] +} \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Tests/L0GetMachineBasedFilteredAzureVMs.ps1 b/Tasks/AzureFileCopyV6/Tests/L0GetMachineBasedFilteredAzureVMs.ps1 new file mode 100644 index 000000000000..694e04918a38 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0GetMachineBasedFilteredAzureVMs.ps1 @@ -0,0 +1,30 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\MockHelper.ps1 + +Register-Mock Write-Telemetry {} + +$rgWithClassicVMs = "taskplatformtesttwovm" +$classicvm0 = "vm0" +$classicvm1 = "VM1" +$azureClassicVMResources = Get-AzureClassicVMsInResourceGroup -resourceGroupName $rgWithClassicVMs + +# Test 1 "should return all vms corresponding to filter with case insensitive check" +$filteredAzureVMResources = Get-MachineBasedFilteredAzureVMs -azureVMResources $azureClassicVMResources -resourceFilteringMethod "machineNames" -filter "vM0, Vm1" +Assert-AreEqual 2 $filteredAzureVMResources.Count + +# Test 2 "should return only one vm corresponding to its filter even if filter is repeated more than once" +$filteredAzureVMResources = Get-MachineBasedFilteredAzureVMs -azureVMResources $azureClassicVMResources -resourceFilteringMethod "machineNames" -filter "vM0, VM0, vm0" +Assert-AreEqual 1 $filteredAzureVMResources.Count + +$nonExistingFilter = "vm2" + +# Test 3 "Should throw if for any filter there is not corresponding vm" +Assert-Throws { + $filteredAzureVMResources = Get-MachineBasedFilteredAzureVMs -azureVMResources $azureClassicVMResources -resourceFilteringMethod "machineNames" -filter "$nonExistingFilter, Vm1" +} -MessagePattern "AFC_MachineDoesNotExist vm2" diff --git a/Tasks/AzureFileCopyV6/Tests/L0GetMachineNameFromId.ps1 b/Tasks/AzureFileCopyV6/Tests/L0GetMachineNameFromId.ps1 new file mode 100644 index 000000000000..8e47c1e82e23 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0GetMachineNameFromId.ps1 @@ -0,0 +1,91 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$vm0Name = "myVM0" +$vm1Name = "mytestVM0" +$vm2Name = "mytestPTVM0" +$winrmPort1 = "40001" +$winrmPort2 = "40003" +$winrmPort3 = "40005" +$vmfqdn = "lbipac2b71e2680c44fd987d.westus.cloudapp.azure.com" +$azureRMVMResources = Get-AzureRMVMsInResourceGroup -resourceGroupName $validRG +$azureRGResourcesDetails = Get-AzureRMResourceGroupResourcesDetails -resourceGroupName $validRG -azureRMVMResources $azureRMVMResources +$networkInterfaceResources = $azureRGResourcesDetails["networkInterfaceResources"] +$publicIPAddressResources = $azureRGResourcesDetails["publicIPAddressResources"] +$loadBalancerResources = $azureRGResourcesDetails["loadBalancerResources"] + +[hashtable]$fqdnMap = @{} +[hashtable]$winRMHttpsPortMap = @{} +foreach($lbName in $loadBalancerResources.Keys) +{ + $lbDetails = $loadBalancerResources[$lbName] + $frontEndIPConfigs = $lbDetails["frontEndIPConfigs"] + $inboundRules = $lbDetails["inboundRules"] + + $fqdnMap = Get-MachinesFqdnsForLB -resourceGroupName $validRG -publicIPAddressResources $publicIPAddressResources -networkInterfaceResources $networkInterfaceResources -frontEndIPConfigs $frontEndIPConfigs -fqdnMap $fqdnMap + $winRMHttpsPortMap = Get-FrontEndPorts -BackEndPort "5986" -PortList $winRMHttpsPortMap -networkInterfaceResources $networkInterfaceResources -inboundRules $inboundRules +} +# Test 1 "should create valid map for map parameter FQDN" +$fqdnMap = Get-MachineNameFromId -resourceGroupName $validRG -Map $fqdnMap -MapParameter "FQDN" -azureRMVMResources $azureRMVMResources -ThrowOnTotalUnavaialbility $true + +Assert-AreEqual $true $fqdnMap.ContainsKey($vm0Name) +Assert-AreEqual $vmfqdn $fqdnMap[$vm0Name] +Assert-AreEqual $true $fqdnMap.ContainsKey($vm1Name) + +# Test 2 "should create valid map for map parameter Front End port" +$winRMHttpsPortMap = Get-MachineNameFromId -Map $winRMHttpsPortMap -MapParameter "Front End port" -azureRMVMResources $azureRMVMResources -ThrowOnTotalUnavaialbility $false + +Assert-AreEqual $true $winRMHttpsPortMap.ContainsKey($vm0Name) +Assert-AreEqual $winrmPort1 $winRMHttpsPortMap[$vm0Name] +Assert-AreEqual $true $winRMHttpsPortMap.ContainsKey($vm1Name) +Assert-AreEqual $winrmPort2 $winRMHttpsPortMap[$vm1Name] + + +# Test 3 "It should return partial map if for not all resources map is not configured properly" + +[hashtable]$fqdnMap = @{} +[hashtable]$winRMHttpsPortMap = @{} +foreach($lbName in $loadBalancerResources.Keys) +{ + $lbDetails = $loadBalancerResources[$lbName] + $frontEndIPConfigs = $lbDetails["frontEndIPConfigs"] + $inboundRules = $lbDetails["inboundRules"] + + $fqdnMap = Get-MachinesFqdnsForLB -resourceGroupName $validRG -publicIPAddressResources $publicIPAddressResources -networkInterfaceResources $networkInterfaceResources -frontEndIPConfigs $frontEndIPConfigs -fqdnMap $fqdnMap + $winRMHttpsPortMap = Get-FrontEndPorts -BackEndPort "5986" -PortList $winRMHttpsPortMap -networkInterfaceResources $networkInterfaceResources -inboundRules $inboundRules +} +$fqdnMap.Remove($azureRMVMResources[0].Id) + +$fqdnMap = Get-MachineNameFromId -resourceGroupName $validRG -Map $fqdnMap -MapParameter "FQDN" -azureRMVMResources $azureRMVMResources -ThrowOnTotalUnavaialbility $true + +Assert-AreEqual $false $fqdnMap.ContainsKey($vm0Name) +Assert-AreEqual $true $fqdnMap.ContainsKey($vm1Name) +Assert-AreEqual $vmfqdn $fqdnMap[$vm1Name] + +# Test 4 "throw error if no resource is available and ThrowOnTotalUnavailability is set to true" + +[hashtable]$fqdnMap = @{} +[hashtable]$winRMHttpsPortMap = @{} +foreach($lbName in $loadBalancerResources.Keys) +{ + $lbDetails = $loadBalancerResources[$lbName] + $frontEndIPConfigs = $lbDetails["frontEndIPConfigs"] + $inboundRules = $lbDetails["inboundRules"] + + $fqdnMap = Get-MachinesFqdnsForLB -resourceGroupName $validRG -publicIPAddressResources $publicIPAddressResources -networkInterfaceResources $networkInterfaceResources -frontEndIPConfigs $frontEndIPConfigs -fqdnMap $fqdnMap + $winRMHttpsPortMap = Get-FrontEndPorts -BackEndPort "5986" -PortList $winRMHttpsPortMap -networkInterfaceResources $networkInterfaceResources -inboundRules $inboundRules +} +$fqdnMap.Remove($azureRMVMResources[0].Id) +$fqdnMap.Remove($azureRMVMResources[1].Id) +$fqdnMap.Remove($azureRMVMResources[2].Id) + +Assert-Throws { + $fqdnMap = Get-MachineNameFromId -resourceGroupName $validRG -Map $fqdnMap -MapParameter "FQDN" -azureRMVMResources $azureRMVMResources -ThrowOnTotalUnavailability $true +} -MessagePattern "AFC_MachineNameFromIdErrorAllResources*" diff --git a/Tasks/AzureFileCopyV6/Tests/L0GetMachinesFqdnForLB.ps1 b/Tasks/AzureFileCopyV6/Tests/L0GetMachinesFqdnForLB.ps1 new file mode 100644 index 000000000000..df9b520cca4d --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0GetMachinesFqdnForLB.ps1 @@ -0,0 +1,31 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$vmfqdn = "lbipac2b71e2680c44fd987d.westus.cloudapp.azure.com" +$azureRMVMResources = Get-AzureRMVMsInResourceGroup -resourceGroupName $validRG +$azureRGResourcesDetails = Get-AzureRMResourceGroupResourcesDetails -resourceGroupName $validRG -azureRMVMResources $azureRMVMResources +$networkInterfaceResources = $azureRGResourcesDetails["networkInterfaceResources"] +$publicIPAddressResources = $azureRGResourcesDetails["publicIPAddressResources"] +$loadBalancerResources = $azureRGResourcesDetails["loadBalancerResources"] +[hashtable]$fqdnMap = @{} + +# Test 1 "It should valid fqdnMap if RG deployed successfully" +foreach($lbName in $loadBalancerResources.Keys) { + $lbDetails = $loadBalancerResources[$lbName] + $frontEndIPConfigs = $lbDetails["frontEndIPConfigs"] + $inboundRules = $lbDetails["inboundRules"] + $fqdnMap = Get-MachinesFqdnsForLB -resourceGroupName $validRG -publicIPAddressResources $publicIPAddressResources -networkInterfaceResources $networkInterfaceResources -frontEndIPConfigs $frontEndIPConfigs -fqdnMap $fqdnMap + + Assert-AreEqual $true $fqdnMap.ContainsKey($azureRMVMResources[0].Id) + Assert-AreEqual $vmfqdn $fqdnMap[$azureRMVMResources[0].Id] + + Assert-AreEqual $true $fqdnMap.ContainsKey($azureRMVMResources[1].Id) + Assert-AreEqual $vmfqdn $fqdnMap[$azureRMVMResources[1].Id] +} \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Tests/L0GetRMVMConnectionDetailsInRG.ps1 b/Tasks/AzureFileCopyV6/Tests/L0GetRMVMConnectionDetailsInRG.ps1 new file mode 100644 index 000000000000..a0f6f135b012 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0GetRMVMConnectionDetailsInRG.ps1 @@ -0,0 +1,36 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$vmName = "myVM0" +$vmfqdn = "lbipac2b71e2680c44fd987d.westus.cloudapp.azure.com" +$vmWinRMHttpsPort = '40001' +$azureRMVMResources = Get-AzureRMVMsInResourceGroup -resourceGroupName $validRG + +# Test 1 "It should return azure vm connection details for valid input" +$response = Get-AzureRMVMsConnectionDetailsInResourceGroup -resourceGroupName $validRG -azureRMVMResources $azureRMVMResources + +Assert-IsNotNullOrEmpty $response +Assert-AreEqual 3 $response.Count + +$resource = $response[$vmName] + +Assert-AreEqual $vmName $resource.Name +Assert-AreEqual $vmfqdn $resource.fqdn +Assert-AreEqual $vmWinRMHttpsPort $resource.winRMHttpsPort + +#Test 2 "It should return null if no azure vms" +$response = Get-AzureRMVMsConnectionDetailsInResourceGroup -resourceGroupName $validRG -azureRMVMResources $null + +Assert-IsNullOrEmpty $response + +$response = Get-AzureRMVMsConnectionDetailsInResourceGroup -resourceGroupName $validRG -azureRMVMResources $azureRMVMResources -connectedServiceName "connectedServiceName" +Assert-IsNotNullOrEmpty $response +Assert-AreEqual 3 $response.Count + diff --git a/Tasks/AzureFileCopyV6/Tests/L0GetStorageAccountType.ps1 b/Tasks/AzureFileCopyV6/Tests/L0GetStorageAccountType.ps1 new file mode 100644 index 000000000000..8b971336536a --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0GetStorageAccountType.ps1 @@ -0,0 +1,17 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +Register-Mock Validate-AzurePowershellVersion {} +Register-Mock Write-Telemetry { } + +$invalidRGStorage = "invalidRGStorage" + +# Test 1 "Should throw if Blob storage not found" +Assert-Throws { + Get-StorageAccountType -storageAccountName $invalidRGStorage -endpoint @{} +} -MessagePattern "Storage account: $invalidRGStorage not found." diff --git a/Tasks/AzureFileCopyV6/Tests/L0GetStorageKey.ps1 b/Tasks/AzureFileCopyV6/Tests/L0GetStorageKey.ps1 new file mode 100644 index 000000000000..9f1542d45d45 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0GetStorageKey.ps1 @@ -0,0 +1,16 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +Register-Mock Validate-AzurePowershellVersion {} +Register-Mock Write-Telemetry { } + +# Test 1 "should throw if storage not found" +$invalidRGStorage = "invalidRGStorage" +Assert-Throws { + Get-StorageKey -storageAccountName $invalidRGStorage -endpoint @{} +} -MessagePattern "Storage account: $invalidRGStorage not found. Selected Connection 'ServicePrincipal' supports storage account of Azure Resource Manager type only." diff --git a/Tasks/AzureFileCopyV6/Tests/L0GetTagBasedFilteredAzureVMs.ps1 b/Tasks/AzureFileCopyV6/Tests/L0GetTagBasedFilteredAzureVMs.ps1 new file mode 100644 index 000000000000..66522f4d90fb --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0GetTagBasedFilteredAzureVMs.ps1 @@ -0,0 +1,22 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$vm0Name = "myVM0" +$azureRMVMResources = Get-AzureRMVMsInResourceGroup -resourceGroupName $validRG + +# Test 1 "Should Call Does-AzureVMMatchTagFilterCriteria for every VM for filter criteria" +$filteredAzureVMResources = Get-TagBasedFilteredAzureVMs -azureVMResources $azureRMVMResources -filter "role:web" + +#Assert-WasCalled Does-AzureVMMatchTagFilterCriteria -Times $azureRMVMResources.Count -ParametersEvaluator {$filter -eq "role:web"} + +# Test 2 "Should return VMs that matches tag filter criteria" +$filteredAzureVMResources = Get-TagBasedFilteredAzureVMs -azureVMResources $azureRMVMResources -filter "role:test" + +Assert-AreEqual $vm0Name $filteredAzureVMResources.Name \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Tests/L0GetblobStorageEndpoint.ps1 b/Tasks/AzureFileCopyV6/Tests/L0GetblobStorageEndpoint.ps1 new file mode 100644 index 000000000000..fa7039d34934 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0GetblobStorageEndpoint.ps1 @@ -0,0 +1,17 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +Register-Mock Validate-AzurePowershellVersion {} +Register-Mock Write-Telemetry { } + +$invalidRGStorage = "invalidRGStorage" + +# Test 1 "Should throw if Blob storage not found" +Assert-Throws { + Get-blobStorageEndpoint -storageAccountName $invalidRGStorage -endpoint @{} +} -MessagePattern "Unable to find storage type $invalidRGStorage with Connection SPN" \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Tests/L0IsWinRMCustomScriptExtensionExists.ps1 b/Tasks/AzureFileCopyV6/Tests/L0IsWinRMCustomScriptExtensionExists.ps1 new file mode 100644 index 000000000000..32e300406ed5 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0IsWinRMCustomScriptExtensionExists.ps1 @@ -0,0 +1,61 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$extensionName="WinRMCustomScriptExtension" + +# Test 1 "Should not throw when Resource group us null" +$isExtensionExists = Is-WinRMCustomScriptExtensionExists -resourceGroupName $null -vmName $vm0Name -extensionName $extensionName -connectedServiceName $connectedServiceName +Assert-AreEqual $false $isExtensionExists + +# Test 2 "Should not throw when VM name is null" +$isExtensionExists = Is-WinRMCustomScriptExtensionExists -resourceGroupName $validRG -vmName $null -extensionName $extensionName -connectedServiceName $connectedServiceName +Assert-AreEqual $false $isExtensionExists + +# Test 3 "Should not throw when VM name is invalid" +$isExtensionExists = Is-WinRMCustomScriptExtensionExists -resourceGroupName $validRG -vmName $invalidMachineName -extensionName $extensionName -connectedServiceName $connectedServiceName +Assert-AreEqual $false $isExtensionExists + +# Test 4 "Should not throw Extension name is null" +$isExtensionExists = Is-WinRMCustomScriptExtensionExists -resourceGroupName $validRG -vmName $vm0Name -extensionName $null -connectedServiceName $connectedServiceName +Assert-AreEqual $false $isExtensionExists + +# Test 5 "Should not throw when Extension name is invalid" +$invalidExtensionName="InvalidWinRMCustomScriptExtension" + +$isExtensionExists = Is-WinRMCustomScriptExtensionExists -resourceGroupName $validRG -vmName $vm0Name -extensionName $invalidExtensionName -connectedServiceName $connectedServiceName +Assert-AreEqual $false $isExtensionExists + +# Test 6 "Should return true for valid values, if previous extension deployed successfully" +Register-Mock Get-AzureMachineCustomScriptExtension { return @{"ProvisioningState"="Succeeded"} } +Register-Mock Validate-CustomScriptExecutionStatus { return } +Register-Mock Remove-AzureMachineCustomScriptExtension { return @{}} +Register-Mock Get-Endpoint {} + +$isExtensionExists = Is-WinRMCustomScriptExtensionExists -resourceGroupName $validRG -vmName $vm0Name -extensionName $extensionName -connectedServiceName $connectedServiceName +Assert-AreEqual $true $isExtensionExists +Assert-WasCalled Get-AzureMachineCustomScriptExtension -Times 1 +Assert-WasCalled Validate-CustomScriptExecutionStatus -Times 1 +Assert-WasCalled Remove-AzureMachineCustomScriptExtension -Times 0 + +# Test 7 "Should return false For valid values, if previous extension failed to deploy" +Unregister-Mock Validate-CustomScriptExecutionStatus +Register-Mock Validate-CustomScriptExecutionStatus { throw "error" } + +$isExtensionExists = Is-WinRMCustomScriptExtensionExists -resourceGroupName $validRG -vmName $vm0Name -extensionName $extensionName -connectedServiceName $connectedServiceName + +Assert-AreEqual $false $isExtensionExists +Assert-WasCalled Validate-CustomScriptExecutionStatus -Times 1 + +# Test 8 "Should return false For valid values, if previous extension failed to provision" +Unregister-Mock Get-AzureMachineCustomScriptExtension +Register-Mock Get-AzureMachineCustomScriptExtension { return @{properties=@{ProvisioningState="Failed"}} } + +$isExtensionExists = Is-WinRMCustomScriptExtensionExists -resourceGroupName $validRG -vmName $vm0Name -extensionName $extensionName -connectedServiceName $connectedServiceName + +Assert-AreEqual $false $isExtensionExists +Assert-WasCalled Get-AzureMachineCustomScriptExtension -Times 2 diff --git a/Tasks/AzureFileCopyV6/Tests/L0UtilityThrowError.ps1 b/Tasks/AzureFileCopyV6/Tests/L0UtilityThrowError.ps1 new file mode 100644 index 000000000000..0736af738f66 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0UtilityThrowError.ps1 @@ -0,0 +1,12 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 + + $exceptionMessage = "Exception thrown" + +Assert-Throws { + ThrowError -errorMessage $exceptionMessage +} -MessagePattern "$exceptionMessage AFC_AzureFileCopyMoreHelp https://aka.ms/azurefilecopyreadme" diff --git a/Tasks/AzureFileCopyV6/Tests/L0ValidateAzurePSVersion.ps1 b/Tasks/AzureFileCopyV6/Tests/L0ValidateAzurePSVersion.ps1 new file mode 100644 index 000000000000..399a7e12f364 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0ValidateAzurePSVersion.ps1 @@ -0,0 +1,26 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 + +$lowerThanMinimumAzureVersion = New-Object -TypeName System.Version -ArgumentList "0.8.8" +$minimumAzureVersion = New-Object -TypeName System.Version -ArgumentList "1.1.0" +$greaterThanMinimumAzureVersion = New-Object -TypeName System.Version -ArgumentList "2.0.0" + +Register-Mock Get-AzureCmdletsVersion { return $lowerThanMinimumAzureVersion } +Register-Mock Write-Telemetry +Register-Mock Get-Module + +#Test 1 "Should throw if lower azureps version" +Assert-Throws { + Validate-AzurePowershellVersion +} -MessagePattern "*AFC_AzurePSNotInstalled*" + +#Test 2 "Should throw if lower azureps version" +Unregister-Mock Get-AzureCmdletsVersion +Register-Mock Get-AzureCmdletsVersion { return $greaterThanMinimumAzureVersion } + +Validate-AzurePowershellVersion +Assert-WasCalled -Times 1 Get-AzureCmdletsVersion diff --git a/Tasks/AzureFileCopyV6/Tests/L0ValidateCustomScriptExecutionStatus.ps1 b/Tasks/AzureFileCopyV6/Tests/L0ValidateCustomScriptExecutionStatus.ps1 new file mode 100644 index 000000000000..87807e415b4c --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/L0ValidateCustomScriptExecutionStatus.ps1 @@ -0,0 +1,66 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$extensionName="WinRMCustomScriptExtension" + +# Test 1 "Should throw Resource group name is null" +Assert-Throws { + $response = Validate-CustomScriptExecutionStatus -resourceGroupName $null -vmName $vm0Name -extensionName $extensionName +} -MessagePattern "AFC_SetCustomScriptExtensionFailed *" + +# Test 2 "Should throw when VM name is null" +Assert-Throws { + $response = Validate-CustomScriptExecutionStatus -resourceGroupName $validRG -vmName $null -extensionName $extensionName +} -MessagePattern "AFC_SetCustomScriptExtensionFailed *" + + +# Test 3 "Should throw when VM name is invalid" +Assert-Throws { + $response = Validate-CustomScriptExecutionStatus -resourceGroupName $validRG -vmName $invalidMachineName -extensionName $extensionName +} -MessagePattern "AFC_SetCustomScriptExtensionFailed *" + +# Test 4 "Should throw Extension name is null" +Assert-Throws { + $response = Validate-CustomScriptExecutionStatus -resourceGroupName $validRG -vmName $vm0Name -extensionName $null +} -MessagePattern "AFC_SetCustomScriptExtensionFailed *" + +# Test 5 "should throw when Extension name is invalid" +$invalidExtensionName="InvalidWinRMCustomScriptExtension" +Assert-Throws { + $response = Validate-CustomScriptExecutionStatus -resourceGroupName $validRG -vmName $vm0Name -extensionName $invalidExtensionName +} -MessagePattern "AFC_SetCustomScriptExtensionFailed *" + +# Test 6 "Should not throw" "For valid values, if previous extension deployed successfully" +Register-Mock Remove-AzureMachineCustomScriptExtension { return @{}} +$vmInstanceViews[$vm0Name]["Extensions"]=$extensions + +Validate-CustomScriptExecutionStatus -resourceGroupName $validRG -vmName $vm0Name -extensionName $extensionName +Assert-WasCalled Remove-AzureMachineCustomScriptExtension -Times 0 + +# Test 7 "Should throw for valid values, if previous extension failed to deploy" +$extensions[0]["SubStatuses"][1]["Message"]="Extension script execution failed." +$vmInstanceViews[$vm0Name]["Extensions"]=$extensions + +Assert-Throws { + Validate-CustomScriptExecutionStatus -resourceGroupName $validRG -vmName $vm0Name -extensionName $extensionName +} -MessagePattern "AFC_SetCustomScriptExtensionFailed *" +Assert-WasCalled Remove-AzureMachineCustomScriptExtension -Times 1 + +# Test 8 "For valid values, if previous extension failed to provision" +Unregister-Mock Remove-AzureMachineCustomScriptExtension +Register-Mock Remove-AzureMachineCustomScriptExtension { return @{}} +$extensions[0]["SubStatuses"][1]["Message"]="Failed to apply the extension." +$vmInstanceViews[$vm0Name]["Extensions"]=$extensions + +Assert-Throws { + Validate-CustomScriptExecutionStatus -resourceGroupName $validRG -vmName $vm0Name -extensionName $extensionName +} -MessagePattern "AFC_SetCustomScriptExtensionFailed *" +Assert-WasCalled Remove-AzureMachineCustomScriptExtension -Times 1 + +#Clean the extension +$vmInstanceViews[$vm0Name]["Extensions"]=@() diff --git a/Tasks/AzureFileCopyV6/Tests/MockHelper.ps1 b/Tasks/AzureFileCopyV6/Tests/MockHelper.ps1 new file mode 100644 index 000000000000..0a777d124974 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/MockHelper.ps1 @@ -0,0 +1,653 @@ +############## Constants ########## +$invalidParam = "invalidParam" +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$rgWithNoVM = "AzureFIleCopyPTRGNoVMDoNotDelete" +$rgNameWithSecurityGroup = "AzureFIleCopyPTRGWithSGDoNotDelete" +$validStorage = "azurefilecopyptsstore" +$validStorageKey = "validStorageKey" +$storageAccounts = @{} +$storageAccounts.Add($validStorage, $validStorageKey) +$validClassicStorage = "ptclassicstoredontdelete" +$validClassicStorageKey = "validClassicStorageKey" +$storageAccounts.Add($validClassicStorage, $validClassicStorageKey) + +$storageAccountsRG = @{} +$storageAccountsRG.Add($validStorage, $validRG) +$storageAccountsRG.Add($validClassicStorage, $validClassicStorageKey) + +$storageAccountsContext = @{} +$storageAccountContext = @{} +$storageAccountContext.StorageAccountName = $validStorage +$storageAccountsContext.Add($validStorage, $storageAccountContext) + +$validSasToken = 'anyValidSaasToken' + +$location = "West US" +$vm0Name = "myVM0" +$vm1Name = "mytestVM0" +$vm2Name = "mytestPTVM1" +$lbName = "myLB" +$classicvmfqdn = "taskplatformtesttwovm.cloudapp.net" +$rgWithNoClassicVms = "taskplatformtestnovm" +$rgWithClassicVMs = "taskplatformtesttwovm" +$classicvm0 = "vm0" +$classicvm1 = "VM1" +$azurevmFqdn = "azurefilecopyplatformtestsdns.westus.cloudapp.azure.com" +$winrmPort1 = "40001" +$winrmPort2 = "40003" +$winrmPort3 = "40005" +$classicWinrmPort1 = "5986" +$classicWinrmPort2 = "57148" +$classicWinrmPort3 = "57149" + +# creating resourcegroups dictionary +$resourceGroups = @{} +$resourceGroup = @{} +$resourceGroup.ResourceGroupName = $validRG +$resourceGroup.Location = $location +$resourceGroups.Add($validRG, $resourceGroup) + +$resourceGroup.ResourceGroupName = $rgWithNoVM +$resourceGroups.Add($rgWithNoVM, $resourceGroup) +$resourceGroup.ResourceGroupName = $rgWithNoClassicVms +$resourceGroups.Add($rgWithNoClassicVms, $resourceGroup) + +$validActionResponse = @{"Status" = "Succeeded"} +$VMsStatus = @{$vm0Name = "Running"; $vm1Name = "Running";$vm2Name = "Running"} + +$resourceGroups[$validRG].VMsDetails = $VMsStatus + +$vmInstanceView = @{"Statuses" = @(@{"DisplayStatus" = "Provisioning succeeded"},@{"DisplayStatus" = "VM running"}); "Extensions" = @(); "VMAgent" = @{"ExtensionHandlers" = @()}} +$vmInstanceViews = @{$vm0Name = $vmInstanceView; $vm1Name = $vmInstanceView ; $vm2Name = $vmInstanceView} +$vmResources = @(@{"Id" = "Microsoft.Compute/virtualMachines/myVM0"; "Name" = $vm0Name; "Location" = $location; "Tags" = @{"role" = "Test"}}, @{"Id" = "Microsoft.Compute/virtualMachines/mytestVM0"; "Name" = $vm1Name; "Location" = $location; "Tags" = @{"role" = "mytest"}} , @{"Id" = "Microsoft.Compute/virtualMachines/mytestPTVM1"; "Name" = $vm2Name; "Location" = $location; "Tags" = @{"role" = "mytestPT"}}) + +$virtualMachine1 = @{"Id" = "Microsoft.Compute/virtualMachines/myVM0"} +$IpConfigurations1 = @(@{"Name" = "ipconfig1"; "Id" = "Microsoft.Network/networkInterfaces/nic0/ipConfigurations/ipconfig1"; "LoadBalancerInboundNatRules" = @(@{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/RDP-VM0"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/WINRM-VM0"})}) +$networkInterface1 = @{"Name" = "nic0"; "VirtualMachine" = $virtualMachine1; "IpConfigurations" = $IpConfigurations1} + +$virtualMachine2 = @{"Id" = "Microsoft.Compute/virtualMachines/mytestVM0"} +$IpConfigurations2 = @(@{"Name" = "ipconfig2"; "Id" = "Microsoft.Network/networkInterfaces/nicN0/ipConfigurations/ipconfig2"; "LoadBalancerInboundNatRules" = @(@{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/NRDP-VM0"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/NWINRM-VM0"})}) +$networkInterface2 = @{"Name" = "nicN0"; "Id" = "Microsoft.Network/networkInterfaces/nicN0"; "VirtualMachine" = $virtualMachine2; "IpConfigurations" = $IpConfigurations2} + +$virtualMachine3 = @{"Id" = "Microsoft.Compute/virtualMachines/mytestPTVM1"} +$IpConfigurations3 = @(@{"Name" = "ipconfig3"; "Id" = "Microsoft.Network/networkInterfaces/mytestptvm0456/ipConfigurations/ipconfig3"; "LoadBalancerInboundNatRules" = @(@{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/MRDP-VM0"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/MWINRM-VM0"})}) +$networkInterface3 = @{"Name" = "mytestptvm0456"; "Id" = "Microsoft.Network/networkInterfaces/mytestptvm0456"; "VirtualMachine" = $virtualMachine3; "IpConfigurations" = $IpConfigurations3} + +$networkInterfaceResources = @($networkInterface1, $networkInterface2,$networkInterface3) + +$IpConfiguration3 = @{"Id" = "Microsoft.Network/loadBalancers/myLB/frontendIPConfigurations/LoadBalancerFrontend"} +$publicIPAddressResources = @(@{"Name" = "myPublicIP"; "Id" = "Microsoft.Network/publicIPAddresses/myPublicIP"; "IpConfiguration" = $IpConfiguration3; "IpAddress" = "40.118.129.77"; "DnsSettings" = @{"Fqdn" = "lbipac2b71e2680c44fd987d.westus.cloudapp.azure.com"}},@{"Name" = "myTestPTVM0"; "Id" = "Microsoft.Network/publicIPAddresses/myTestPTVM0"; "IpConfiguration" = $IpConfiguration3; "IpAddress" = "13.91.111.214"; "DnsSettings" = @{"Fqdn" = "lbipeca3f178ce794301af12.westus.cloudapp.azure.com"}}) + +$inboundNatRules = @(@{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/RDP-VM0"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/RDP-VM1"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/WINRM-VM0"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/WINRM-VM1"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/NRDP-VM0"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/NRDP-VM1"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/NWINRM-VM0"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/NWINRM-VM1"},@{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/MRDP-VM0"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/MRDP-VM1"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/MWINRM-VM0"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/MWINRM-VM1"}) +$frontEndIPConfigs = @(@{"Name" = "LoadBalancerFrontend"; "PublicIpAddress" = @{"Id" = "Microsoft.Network/publicIPAddresses/myPublicIP"}; "InboundNatRules" = $inboundNatRules}) + +$inboundRule1 = @{"Name" = "RDP-VM0"; "FrontendPort" = "50001"; "BackendPort" = "3389"; "BackendIPConfiguration" = @{"Id" = "Microsoft.Network/networkInterfaces/nic0/ipConfigurations/ipconfig1"}} +$inboundRule2 = @{"Name" = "RDP-VM1"; "FrontendPort" = "50002"; "BackendPort" = "3389"; "BackendIPConfiguration" = $null} +$inboundRule3 = @{"Name" = "WINRM-VM0"; "FrontendPort" = $winrmPort1; "BackendPort" = "5986"; "BackendIPConfiguration" = @{"Id" = "Microsoft.Network/networkInterfaces/nic0/ipConfigurations/ipconfig1"}} +$inboundRule4 = @{"Name" = "WINRM-VM1"; "FrontendPort" = "40002"; "BackendPort" = "5986"; "BackendIPConfiguration" = $null} +$inboundRule5 = @{"Name" = "NRDP-VM0"; "FrontendPort" = "50003"; "BackendPort" = "3389"; "BackendIPConfiguration" = @{"Id" = "Microsoft.Network/networkInterfaces/nicN0/ipConfigurations/ipconfig2"}} +$inboundRule6 = @{"Name" = "NRDP-VM1"; "FrontendPort" = "50004"; "BackendPort" = "3389"; "BackendIPConfiguration" = $null} +$inboundRule7 = @{"Name" = "NWINRM-VM0"; "FrontendPort" = "$winrmPort2"; "BackendPort" = "5986"; "BackendIPConfiguration" = @{"Id" = "Microsoft.Network/networkInterfaces/nicN0/ipConfigurations/ipconfig2"}} +$inboundRule8 = @{"Name" = "NWINRM-VM1"; "FrontendPort" = "40004"; "BackendPort" = "5986"; "BackendIPConfiguration" = $null} +$inboundRule9 = @{"Name" = "MRDP-VM0"; "FrontendPort" = "50005"; "BackendPort" = "3389"; "BackendIPConfiguration" = @{"Id" = "Microsoft.Network/networkInterfaces/mytestptvm0456/ipConfigurations/ipconfig3"}} +$inboundRule10 = @{"Name" = "MRDP-VM1"; "FrontendPort" = "50006"; "BackendPort" = "3389"; "BackendIPConfiguration" = $null} +$inboundRule11 = @{"Name" = "MWINRM-VM0"; "FrontendPort" = "$winrmPort3"; "BackendPort" = "5986"; "BackendIPConfiguration" = @{"Id" = "Microsoft.Network/networkInterfaces/mytestptvm0456/ipConfigurations/ipconfig3"}} +$inboundRule12 = @{"Name" = "MWINRM-VM1"; "FrontendPort" = "40006"; "BackendPort" = "5986"; "BackendIPConfiguration" = $null} +$inboundRules = @($inboundRule1, $inboundRule2, $inboundRule3, $inboundRule4, $inboundRule5, $inboundRule6, $inboundRule7, $inboundRule8,$inboundRule9,$inboundRule10,$inboundRule11,$inboundRule12) + +$loadBalancerDetails = @{"frontEndIPConfigs" = $frontEndIPConfigs; "inboundRules" = $inboundRules} +$loadBalancerResources = @{$lbName = $loadBalancerDetails} + +$azureResourceGroupDeploymentResponse = @{"networkInterfaceResources" = $networkInterfaceResources; "publicIPAddressResources" = $publicIPAddressResources; "loadBalancerResources" = $loadBalancerResources} + +#creating one RG deployment to be used through out test +$resourceGroupDeployments = @{} +$resourceGroupVMs = @{} +$resourceGroupDeployments.Add($validRG, $azureResourceGroupDeploymentResponse) +$resourceGroupVMs.Add($validRG, $VMsStatus) + +$cloudServices = @{} +$cloudServiceWithNoVM = @{"vms" = $null; "vmConnectionDetails" = $null} +$vmConnectionDetailsWithTwoVms = @{$classicvm0 = @{"Name" = $classicvm0; "fqdn" = $classicvmfqdn; "winRMHttpsPort" = $classicWinrmPort1}; $classicvm1 = @{"Name" = $classicvm1; "fqdn" = $classicvmfqdn; "winRMHttpsPort" = $classicWinrmPort2}} +$cloudServiceWithTwoVM = @{"vms" = @(@{"Name" = $classicvm0}, @{"Name" = $classicvm1}); "vmConnectionDetails" = $vmConnectionDetailsWithTwoVms} + +$cloudServices.Add($rgWithNoClassicVms, $cloudServiceWithNoVM) +$cloudServices.Add($rgWithClassicVMs, $cloudServiceWithTwoVM) + +#Extensions +$winRMcustomScripExtensionObject = @{} +$winRMcustomScripExtensionObject["ExtensionType"]="Microsoft.Compute.CustomScriptExtension" +$winRMcustomScripExtensionObject["Name"]="winrmcustomscriptextension" +$winRMcustomScripExtensionObject["TypeHandlerVersion"]="1.4" + +$subStatus0 = @{} +$subStatus0["Code"]="ComponentStatus/StdOut/succeeded" +$subStatus0["DisplayStatus"]="Provisioning succeeded" +$subStatus0["Level"]="Info" +$subStatus0["Message"]="Succeeded\\n\\nDeleted 1 rule(s).\\nOk.\\n\\nOk.\\n" +$subStatus0["Time"]=$null + + +$subStatus1 = @{} +$subStatus1["Code"]="ComponentStatus/StdErr/succeeded" +$subStatus1["DisplayStatus"]="Provisioning succeeded" +$subStatus1["Level"]="Info" +$subStatus1["Message"]="" +$subStatus1["Time"]=$null + +$substatuses = @() +$substatuses+=$subStatus0 +$substatuses+=$subStatus1 + +$winRMcustomScripExtensionObject["SubStatuses"]=@() +$winRMcustomScripExtensionObject["SubStatuses"]+=$substatuses + + +$status0 = @{} +$status0["Code"]="ProvisioningState/succeeded" +$status0["DisplayStatus"]="Provisioning succeeded" +$status0["Level"]="Info" +$status0["Message"]="Finished executing command" +$status0["Time"]=$null + +$statuses = @() +$statuses += $status0 + +$winRMcustomScripExtensionObject["Statuses"]=@() +$winRMcustomScripExtensionObject["Statuses"]+=$statuses + +$extensions = @() +$extensions += $winRMcustomScripExtensionObject + +$getCustomScriptExtensionResponse = @{"Status"="Succeeded"} +$setCustomScriptExtensionResponse = @{"Status"="Succeeded"} +$rgustomScriptExtensionResponse = @{"Status"="Succeeded"} +$winrmCustomScriptExtension="WinRmCustomScriptExtension" +$invalidCustomScriptName = "InvalidConfigureWinRM.ps1" + +$securityGroups = New-Object System.Collections.Generic.List[System.Object] +$securityRules = New-Object System.Collections.Generic.List[System.Object] + +$validSecurityGroupProps = @{"Name"="VMWithSG";"SecurityRules"=$securityRules} +$validSecurityGroup = New-Object PSObject -Property $validSecurityGroupProps +$securityGroups.Add($validSecurityGroup) + + +$securityGroupsRecommended = New-Object System.Collections.Generic.List[System.Object] +$securityRulesRecommended = New-Object System.Collections.Generic.List[System.Object] + +$validSecurityGroupPropsRecommended = @{"Name"="VMWithSGRecPS";"SecurityRules"=$securityRulesRecommended} +$validSecurityGroupRecommended = New-Object PSObject -Property $validSecurityGroupPropsRecommended +$securityGroupsRecommended.Add($validSecurityGroupRecommended) + +$securityGroupsLatest = New-Object System.Collections.Generic.List[System.Object] +$securityRulesLatest = New-Object System.Collections.Generic.List[System.Object] + +$validSecurityGroupPropsLatest = @{"Name"="VMWithSGHighPS";"SecurityRules"=$securityRulesLatest} +$validSecurityGroupLatest = New-Object PSObject -Property $validSecurityGroupPropsLatest +$securityGroupsLatest.Add($validSecurityGroupLatest) + +$securedMockPassword = New-Object -TypeName System.Security.SecureString + +$vmIdWhichHasSecurityGroupPrevious = "/subscriptions/c94bda7a-0577-4374-9c53-0e46a9fb0f70/resourceGroups/AzureFIleCopyPTRGWithSGDoNotDelete/providers/Microsoft.Compute/virtualMachines/VMWithSG" +$vmIdWhichHasSecurityGroupRecommended = "/subscriptions/c94bda7a-0577-4374-9c53-0e46a9fb0f70/resourceGroups/AzureFIleCopyPTRGWithSGDoNotDelete/providers/Microsoft.Compute/virtualMachines/VMWithSGRecPS" +$vmIdWhichHasSecurityGroupLatest = "/subscriptions/c94bda7a-0577-4374-9c53-0e46a9fb0f70/resourceGroups/AzureFIleCopyPTRGWithSGDoNotDelete/providers/Microsoft.Compute/virtualMachines/VMWithSGHighPS" +$vmIdWhichHasNoSecurityGroup = "/subscriptions/c94bda7a-0577-4374-9c53-0e46a9fb0f70/resourceGroups/AzureFileCopyTaskPlatformTestDoNotDelete/providers/Microsoft.Compute/virtualMachines/mytestVM0" +$duplicateRuleName = "VSO-Custom-WinRM-Https-Port-Deplicate" + +#Create Mock Object type for Hyak.Common.CloudException +$Source = @" + using System; +namespace Hyak.Common { + public class CloudException : Exception { + } +} +"@ +Add-Type -TypeDefinition $Source -Language CSharp + +function Get-AzureBlobStorageEndpointFromARM +{ + param([string]$storageAccountName) + + if(-not [string]::IsNullOrEmpty($storageAccountName)) + { + if(-not $storageAccounts.ContainsKey($storageAccountName)) + { + throw "Unable to find storage type $storageAccountName with Connection SPN" + } + + return $storageAccounts[$storageAccountName] + } +} + +function Get-AzureStorageAccountTypeFromARM +{ + param([string]$storageAccountName, + [object]$endpoint) + + if(-not [string]::IsNullOrEmpty($storageAccountName)) + { + if(-not $storageAccounts.ContainsKey($storageAccountName)) + { + throw "Storage account: $storageAccountName not found." + } + + return $storageAccounts[$storageAccountName] + } +} + +function Get-AzureStorageAccountResourceGroupName +{ + param([string]$storageAccountName) + + if (-not [string]::IsNullOrEmpty($storageAccountName)) + { + if(-not $storageAccountsRG.ContainsKey($storageAccountName)) + { + throw "Storage account: $storageAccountName not found. Selected Connection 'ServicePrincipal' supports storage account of Azure Resource Manager type only." + } + + return $storageAccountsRG[$storageAccountName] + } +} + +function Get-AzureStorageKeyFromARM +{ + param([string]$storageAccountName) + + if(-not [string]::IsNullOrEmpty($storageAccountName)) + { + if(-not $storageAccounts.ContainsKey($storageAccountName)) + { + throw "Storage account: $storageAccountName not found. Selected Connection 'ServicePrincipal' supports storage account of Azure Resource Manager type only." + } + + return $storageAccounts[$storageAccountName] + } +} + +function Create-AzureStorageContext +{ + param([string]$storageAccountName, + [string]$storageAccountKey) + + if(-not [string]::IsNullOrEmpty($storageAccountName) -and -not [string]::IsNullOrEmpty($storageAccountKey)) + { + if(-not $storageAccounts.ContainsKey($storageAccountName)) + { + return + } + + return $storageAccountsContext[$storageAccountName] + } +} + +function Get-AzureClassicVMsInResourceGroup +{ + param([string]$resourceGroupName) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and $cloudServices.ContainsKey($resourceGroupName)) + { + return $($cloudServices[$resourceGroupName])["vms"] + } +} + +function Get-AzureRMVMsInResourceGroup +{ + param([string]$resourceGroupName) + + if(-not [string]::IsNullOrEmpty($resourceGroupName)) + { + if(-not $resourceGroups.ContainsKey($resourceGroupName)) + { + throw "Provided resource group '$resourceGroupName' does not exist." + } + + if($resourceGroupDeployments.ContainsKey($resourceGroupName)) + { + return $vmResources + } + } +} + +function Get-AzureRMResourceGroupResourcesDetails +{ + param([string]$resourceGroupName, + [object]$azureRMVMResources) + + if(-not [string]::IsNullOrEmpty($resourceGroupName)) + { + if(-not $resourceGroups.ContainsKey($resourceGroupName)) + { + throw "Resource group '$resourceGroupName' could not be found." + } + + if($resourceGroupDeployments.ContainsKey($resourceGroupName)) + { + return $resourceGroupDeployments[$resourceGroupName] + } + } + + return @{} +} + +function Get-Endpoint +{ + param([string]$connectedServiceName) + + return @{ + "Data"=@{ + "EnvironmentName"="AzureStack" + } + } +} + +function Get-AzureRMResourceGroupResourcesDetailsForAzureStack +{ + param([string]$resourceGroupName, + [object]$azureRMVMResources, + [string]$connectedServiceName) + + if(-not [string]::IsNullOrEmpty($resourceGroupName)) + { + if(-not $resourceGroups.ContainsKey($resourceGroupName)) + { + throw "Resource group '$resourceGroupName' could not be found." + } + + if($resourceGroupDeployments.ContainsKey($resourceGroupName)) + { + return $resourceGroupDeployments[$resourceGroupName] + } + } + + return @{} +} + +function Generate-AzureStorageContainerSASToken +{ + param([string]$containerName, + [object]$storageContext, + [System.Int32]$tokenTimeOutInMinutes) + + if(-not [string]::IsNullOrEmpty($containerName) -and $storageContext) + { + return $validSasToken + } +} + +function Remove-AzureContainer +{ + +} + +function Get-AzureMachineStatus +{ + param([string]$resourceGroupName, + [string]$name) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($name)) + { + if(-not $resourceGroups.ContainsKey($resourceGroupName)) + { + throw "Resource group '$resourceGroupName' could not be found." + } + + $VMs = $resourceGroups[$resourceGroupName].VMsDetails + if($VMs -and $VMs.ContainsKey($name)) + { + $tempExts = $vmInstanceViews[$name]["Extensions"] + if($tempExts -and $tempExts.Count -ge 1) + { + $status = @{} + $status["Extensions"] = $tempExts + #$customScriptExtension=$tempExts[0] + } + else + { + throw "No extension exists with name '$winrmCustomScriptExtension'" + } + } + else + { + throw "The Resource 'Microsoft.Compute/virtualMachines/$name/extensions/$winrmCustomScriptExtension' under resource group '$resourceGroupName' was not found." + } + } + + return $status +} + +function Get-AzureMachineCustomScriptExtension +{ + param([string]$resourceGroupName, + [string]$vmName, + [string]$name) + + $errMsg="The Resource 'Microsoft.Compute/virtualMachines/$vmName/extensions/$name' under resource group '$resourceGroupName' was not found." + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmName)) + { + if(-not $resourceGroups.ContainsKey($resourceGroupName)) + { + throw "Resource group '$resourceGroupName' could not be found." + } + + $VMs = $resourceGroups[$resourceGroupName].VMsDetails + if($VMs -and $VMs.ContainsKey($vmName)) + { + if($name) + { + $tempExts = $vmInstanceViews[$vmName]["Extensions"] + if($tempExts -and $tempExts.Count -ge 1) + { + $response = @{} + if($tempExts[0]["SubStatuses"][1]["Message"] -and $extension[0]["SubStatuses"][1]["Message"] -ne "") + { + $response["ProvisioningState"]="Failed" + } + else + { + $response["ProvisioningState"]="Succeeded" + } + } + else + { + throw $errMsg + } + } + else + { + throw $errMsg + } + } + else + { + throw $errMsg + } + } + + return $response +} + +function Set-AzureMachineCustomScriptExtension +{ + param([string]$resourceGroupName, + [string]$vmName, + [string]$name, + [string[]]$fileUri, + [string]$run, + [string]$argument, + [string]$location) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmName) -and -not [string]::IsNullOrEmpty($name)) + { + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmName)) + { + if(-not $resourceGroups.ContainsKey($resourceGroupName)) + { + throw "Resource group '$resourceGroupName' could not be found." + } + + $VMs = $resourceGroups[$resourceGroupName].VMsDetails + if($VMs -and $VMs.ContainsKey($vmName)) + { + $response = @{} + + if(-not $fileUri) + { + throw "Cannot validate argument on parameter 'FileUri'. The argument is null or empty." + } + + if(-not $run) + { + throw "Cannot validate argument on parameter 'Run'. The argument is null or empty." + } + + if(-not $argument) + { + throw "Cannot validate argument on parameter 'Argument'. The argument is null or empty." + } + + if(-not $location) + { + throw "Cannot validate argument on parameter 'Location'. The argument is null or empty." + } + + elseif($run -eq $invalidCustomScriptName) + { + $extensions[0]["SubStatuses"][1]["Message"]="The argument '$invalidCustomScriptName' to the -File parameter does not exist. Provide the path to an existing '.ps1' file as an argument to the -File parameter." + $errorDetails = @{"Message" = "VM has reported a failure when processing extension 'WinRMCustomScriptExtension'. Error message: Finished executing command."} + $response["Error"]= $errorDetails + $response["Status"]="Failed" + } + else + { + $extensions[0]["SubStatuses"][1]["Message"]="" + $response["Status"]="Succeeded" + } + + $vmInstanceViews[$vmName]["Extensions"]=$extensions + } + else + { + throw "Can not perform requested operation on nested resource. Parent resource '$vmName' not found." + } + } + } + + return $response +} + +function Remove-AzureMachineCustomScriptExtension +{ + param([string]$resourceGroupName, + [string]$vmName, + [string]$name) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmName) -and -not [string]::IsNullOrEmpty($name)) + { + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmName)) + { + $response = @{} + $VMs = $resourceGroups[$resourceGroupName].VMsDetails + if($VMs -and $VMs.ContainsKey($vmName)) + { + $tempExts = $vmInstanceViews[$vmName]["Extensions"] + if($tempExts -and $tempExts.Count -ge 1) + { + $vmInstanceViews[$vmName]["extensions"]=@() + $response["Status"]="Succeeded" + } + else + { + $response["Status"]="Succeeded" + } + } + else + { + $response["Status"]="Succeeded" + } + } + } + + return $response +} + +function Add-AzureNetworkSecurityRuleConfig +{ +} + +function Add-NetworkSecurityRuleConfig +{ + param([string]$resourceGroupName, + [object]$securityGroups, + [string]$ruleName, + [string]$rulePriotity, + [string]$winrmHttpsPort) + + if(($securityGroups.Count -gt 0) -and (-not $securityGroups[0].SecurityRules -or $ruleName -eq $duplicateRuleName)) + { + Add-AzureNetworkSecurityRuleConfig + + $tempRulePriority = "3986" + if($ruleName -eq $duplicateRuleName) + { + $tempRulePriority = "4036" + } + + $securityRuleProps = @{"Name"=$ruleName;"Priority"=$tempRulePriority} + $securityRule = New-Object PSObject -Property $securityRuleProps + $securityGroups[0].SecurityRules += $securityRule + } + + return $securityGroups +} + +function Set-AzureNetworkSecurityGroup +{ + param([object]$NetworkSecurityGroup) + + if($NetworkSecurityGroup.Name -eq $validSecurityGroup.Name) + { + $validSecurityGroup = $NetworkSecurityGroup + } + + return $validSecurityGroup +} + +function Get-NetworkSecurityGroups +{ + param([string] $resourceGroupName, + [string] $vmId) + + if($vmId -eq $vmIdWhichHasNoSecurityGroup) + { + return @() + } + elseif($vmId -eq $vmIdWhichHasSecurityGroupPrevious) + { + return $securityGroups + } + elseif($vmId -eq $vmIdWhichHasSecurityGroupRecommended) + { + return $securityGroupsRecommended + } + elseif($vmId -eq $vmIdWhichHasSecurityGroupLatest) + { + return $securityGroupsLatest + } + else + { + throw "[Azure Call]No network interface found with virtual machine id $vmId under resource group $rgNameWithSecurityGroup" + } +} + +# Used only in test code +function Remove-NetworkSecurityRuleConfig +{ + param([object] $securityGroups, + [string] $ruleName) + + $validSecurityGroup["SecurityRules"]=@() +} \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Tests/MockVariable.ps1 b/Tasks/AzureFileCopyV6/Tests/MockVariable.ps1 new file mode 100644 index 000000000000..bfb8c213c959 --- /dev/null +++ b/Tasks/AzureFileCopyV6/Tests/MockVariable.ps1 @@ -0,0 +1,58 @@ + +$validInputSourcePath = Join-Path $env:windir "Source" +$validInputAzureBlobDestinationType = "AzureBlob" +$validInputAzureVmsDestinationType = "AzureVms" +$validInputStorageAccount = "validInputStorageAccount" +$validInputContainerName = "validContainerName" +$validInputBlobPrefix = "validBlobPrefix" +$validResourceGroupName = "validResourceGroupName" +$validInputVmsAdminUserName = "validInputVmsAdminUserName" +$validInputVmsAdminPassword = "validInputVmsAdminPassword" +$validSasToken = '?sv=2015-02-21&sr=c&sig=Ncs6hCfAhzwwWd19eP7ToJATsS3xS1laFfPmRwO90qY%3D&se=2016-01-04T18%3A13%3A12Z&sp=rwdl' + +$validStorageKey = "validsotrageKey" +$validAzCopyLocation = Join-Path $env:windir "AzCopyLocation" +$validInputTargetPath = Join-Path $env:windir "Target" + +$failedStatus = "Failed" +$failedCopyLog = "Failed Copy Operation" +$failedCopyError = $failedCopyLog +$failedDeploymentResponseForCopy = @{"MachineName" = "vm0"; "Status" = $failedStatus; "DeploymentLog" = $failedCopyLog; "ServiceLog" = $null; "Error" = @{"Message" = $failedCopyError}} + +$passedStatus = "Passed" +$successLog = "Success Logs" +$passedDeploymentResponseForCopy = @{"Status" = $passedStatus; "DeploymentLog" = $successLog; "ServiceLog" = $null; "Error" = $null} +$passedLatestDeploymentResponseForCopy = @{"Status" = $passedStatus; "DeploymentLog" = $successLog; "ServiceLog" = $null; "Error" = $null} + +$guidingMessageForAzureFileCopy = "For more info please refer to https://aka.ms/azurefilecopyreadme" +$winrmHelpMsg = "To fix WinRM connection related issues, select the 'Enable Copy Prerequisites' option in the task. If set already, and the target Virtual Machines are backed by a Load balancer, ensure Inbound NAT rules are configured for target port (5986). Applicable only for ARM VMs." + +$succeededStatus = "Succeeded" +$succeededCopyResponse = @{"Status" = $succeededStatus; "Log" = $null; "Error" = $null} + +$assembly = New-Object System.Collections.Generic.List``1[System.Object] + +$testJobs = New-Object System.Collections.Generic.List``1[System.Object] +$failedJob = @{"Id" = "1"; "Status" = "Completed"} +$passedJob = @{"Id" = "2"; "Status" = "Completed"} +$passedLatestJob = @{"Id" = "3"; "Status" = "Completed"} +$passedJob1 = @{"Id" = "1"; "Status" = "Completed"} + +$jobFailedResponse = @{"Status" = $failedStatus; "DeploymentLog" = $failedCopyLog; "ServiceLog" = $null; "Error" = $null} +$jobPassedResponse = @{"Status" = $passedStatus; "DeploymentLog" = $successLog; "ServiceLog" = $null; "Error" = $null} +$jobPassedLatestResponse = @{"Status" = $passedStatus; "DeploymentLog" = $successLog; "ServiceLog" = $null; "Error" = $null} + +$connectedServiceName = "DummyConnectedServiceName" + +$invokeRemoteScriptFailedResponse = @{ExitCode = 1} +$invokeRemoteScriptPassedResponse = @{ExitCode = 0} +$invokeRemoteScriptOnePassOneFailResponse = @($invokeRemoteScriptFailedResponse, $invokeRemoteScriptPassedResponse) +$invokeRemoteScriptAllPassedResponse = @($invokeRemoteScriptPassedResponse, $invokeRemoteScriptPassedResponse) + +$validBlobStorageEndpoint = "https://validInputStorageAccount.blob.core.windows.net" + +$spnEndpoint=@{} +$spnAuth=@{} + +$spnEndpoint.Scheme='ServicePrincipal' +$spnEndpoint.Auth =$spnEndpoint \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/ThirdPartyNotices.txt b/Tasks/AzureFileCopyV6/ThirdPartyNotices.txt new file mode 100644 index 000000000000..ea01c33dc766 --- /dev/null +++ b/Tasks/AzureFileCopyV6/ThirdPartyNotices.txt @@ -0,0 +1,1137 @@ + +THIRD-PARTY SOFTWARE NOTICES AND INFORMATION +Do Not Translate or Localize + +Azure File Copy incorporates third party material from the projects listed below. The original copyright notice and the license under which Microsoft received such third party material are set forth below. Microsoft reserves all other rights not expressly granted, whether by implication, estoppel or otherwise. + +1. balanced-match (https://github.com/juliangruber/balanced-match) +2. brace-expansion (https://github.com/juliangruber/brace-expansion) +3. buffer-equal-constant-time (https://github.com/salesforce/buffer-equal-constant-time) +4. concat-map (https://github.com/substack/node-concat-map) +5. hoek (https://github.com/hapijs/hoek) + Includes:Deep-eql +6. isemail (https://github.com/hapijs/isemail) +7. joi (https://github.com/hapijs/joi) +8. jsonwebtoken (https://github.com/auth0/node-jsonwebtoken) +9. lodash.once (https://github.com/lodash/lodash) +10. minimatch (https://github.com/isaacs/minimatch) +11. Mockery (https://github.com/mfncooper/mockery) +12. Moment (https://github.com/moment/moment) + Includes:Files with code from Closure +13. ms (https://github.com/zeit/ms) +14. Node.js (https://nodejs.org/) +15. node-ecdsa-sig-formatter (https://github.com/Brightspace/node-ecdsa-sig-formatter) +16. node-jwa (https://github.com/brianloveswords/node-jwa) +17. node-jws (https://github.com/brianloveswords/node-jws) +18. node-uuid (https://github.com/broofa/node-uuid/) +19. OpenSSL (http://www.openssl.org) +20. Q (https://github.com/kriskowal/q) +21. safe-buffer (https://github.com/feross/safe-buffer) +22. sax js (https://github.com/isaacs/sax-js) +23. semver (https://github.com/npm/node-semver/) +24. ShellJS (https://github.com/shelljs/shelljs) +25. topo (https://github.com/hapijs/topo) +26. tunnel (https://github.com/koichik/node-tunnel) +27. underscore.js (http://underscorejs.org/; https://github.com/jashkenas/underscore) +28. vso-node-api (https://github.com/Microsoft/vsts-node-api) +29. VSTS-task-lib (https://github.com/Microsoft/vsts-task-lib) +30. Xml2JS (https://github.com/Leonidas-from-XIV/node-xml2js) +31. Xmlbuilder (https://github.com/oozcitak/xmlbuilder-js) +32. xtend (https://github.com/Raynos/xtend) +33. @types/node (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git) +34. @types/q (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git) +35. @types/mocha (https://github.com/DefinitelyTyped/DefinitelyTyped.git) + + +%% balanced-match NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +(MIT) + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +========================================= +END OF balanced-match NOTICES, INFORMATION, AND LICENSE + +%% brace-expansion NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +(MIT) + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +========================================= +END OF brace-expansion NOTICES, INFORMATION, AND LICENSE + +%% buffer-equal-constant-time NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2013, GoInstant Inc., a salesforce.com company +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +* Neither the name of salesforce.com, nor GoInstant, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +========================================= +END OF buffer-equal-constant-time NOTICES, INFORMATION, AND LICENSE + +%% concat-map NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) James Halliday/substack + +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF concat-map NOTICES, INFORMATION, AND LICENSE + +%% hoek NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= + +Copyright (c) 2011-2014, Walmart and other contributors. +Copyright (c) 2011, Yahoo Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * The names of any contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + * * * + +The complete list of contributors can be found at: https://github.com/hapijs/hapi/graphs/contributors +Portions of this project were initially based on the Yahoo! Inc. Postmile project, +published at https://github.com/yahoo/postmile. +========================================= +Includes code from Deep-eql + +Copyright (c) 2013 Jake Luer jake@alogicalparadox.com + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF hoek NOTICES, INFORMATION, AND LICENSE + +%% isemail NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2008-2011, Dominic Sayers +Copyright (c) 2013-2014, GlobeSherpa +Copyright (c) 2014-2015, Eli Skeggs + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +- Neither the name of Dominic Sayers nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +========================================= +END OF isemail NOTICES, INFORMATION, AND LICENSE + +%% joi NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2012-2014, Walmart and other contributors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * The names of any contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + * * * + +The complete list of contributors can be found at: https://github.com/hapijs/joi/graphs/contributors +========================================= +END OF joi NOTICES, INFORMATION, AND LICENSE + +%% jsonwebtoken NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2015 Auth0, Inc. (http://auth0.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +========================================= +END OF jsonwebtoken NOTICES, INFORMATION, AND LICENSE + +%% lodash.once NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. +========================================= +END OF lodash.once NOTICES, INFORMATION, AND LICENSE + +%% minimatch NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +========================================= +END OF minimatch NOTICES, INFORMATION, AND LICENSE + +%% Mockery NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyrights for code authored by Yahoo! Inc. is licensed under the following +terms: + + MIT License + + Copyright (c) 2011 Yahoo! Inc. All Rights Reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +========================================= +END OF Mockery NOTICES, INFORMATION, AND LICENSE + +%% Moment NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) JS Foundation and other contributors + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. +========================================= +Files with code from Closure + +Copyright (c) 2006 The Closure Library Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +========================================= +END OF Moment NOTICES, INFORMATION, AND LICENSE + +%% ms NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +(The MIT License) + +Copyright (c) 2014 Guillermo Rauch +Copyright (c) 2016 Zeit, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the Software), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF ms NOTICES, INFORMATION, AND LICENSE + +%% Node.js NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +The Node.js license applies to all parts of Node.js that are not externally +maintained libraries. +========================================= +END OF Node.js NOTICES, INFORMATION, AND LICENSE + +%% node-ecdsa-sig-formatter NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= + Copyright 2015 D2L Corporation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +========================================= +END OF node-ecdsa-sig-formatter NOTICES, INFORMATION, AND LICENSE + +%% node-jwa NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2013 Brian J. Brennan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF node-jwa NOTICES, INFORMATION, AND LICENSE + +%% node-jws NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2013 Brian J. Brennan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF node-jws NOTICES, INFORMATION, AND LICENSE + +%% node-uuid NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2010-2012 Robert Kieffer + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF node-uuid NOTICES, INFORMATION, AND LICENSE + +%% OpenSSL NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= + LICENSE ISSUES + ============== + + The OpenSSL toolkit stays under a dual license, i.e. both the conditions of + the OpenSSL License and the original SSLeay license apply to the toolkit. + See below for the actual license texts. Actually both licenses are BSD-style + Open Source licenses. In case of any license issues related to OpenSSL + please contact openssl-core@openssl.org. + + OpenSSL License + --------------- + +/* ==================================================================== + * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/) + * + * 4. The names OpenSSL Toolkit and OpenSSL Project must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called OpenSSL + * nor may OpenSSL appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/) + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + + Original SSLeay License + ----------------------- + +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com) + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * This product includes software written by Tim Hudson (tjh@cryptsoft.com) + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] +========================================= +END OF OpenSSL NOTICES, INFORMATION, AND LICENSE + +%% Q NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright 2009�2014 Kristopher Michael Kowal. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + +The file q.js is prefaced by the following additional third-party subcomponent information: + +/*! + * + * Copyright 2009-2012 Kris Kowal under the terms of the MIT + * license found at http://github.com/kriskowal/q/raw/master/LICENSE + * + * With parts by Tyler Close + * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found + * at http://www.opensource.org/licenses/mit-license.html + * Forked at ref_send.js version: 2009-05-11 + * + * With parts by Mark Miller + * Copyright (C) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +========================================= +END OF Q NOTICES, INFORMATION, AND LICENSE + +%% safe-buffer NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +========================================= +END OF safe-buffer NOTICES, INFORMATION, AND LICENSE + +%% sax js NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +==== + +`String.fromCodePoint` by Mathias Bynens used according to terms of MIT +License, as follows: + + Copyright Mathias Bynens + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF sax js NOTICES, INFORMATION, AND LICENSE + +%% semver NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +========================================= +END OF semver NOTICES, INFORMATION, AND LICENSE + +%% ShellJS NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2012, Artur Adib +All rights reserved. + +You may use this project under the terms of the New BSD license as follows: + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Artur Adib nor the + names of the contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +========================================= +END OF ShellJS NOTICES, INFORMATION, AND LICENSE + +%% topo NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2012-2014, Walmart and other contributors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * The names of any contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + * * * + +The complete list of contributors can be found at: https://github.com/hapijs/topo/graphs/contributors +========================================= +END OF topo NOTICES, INFORMATION, AND LICENSE + +%% tunnel NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2012 Koichi Kobayashi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +========================================= +END OF tunnel NOTICES, INFORMATION, AND LICENSE + +%% underscore.js NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2009-2017 Jeremy Ashkenas, DocumentCloud and Investigative +Reporters & Editors + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +========================================= +END OF underscore.js NOTICES, INFORMATION, AND LICENSE + +%% vso-node-api NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF vso-node-api NOTICES, INFORMATION, AND LICENSE + +%% VSTS-task-lib NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) Microsoft Corporation. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +========================================= +END OF VSTS-task-lib NOTICES, INFORMATION, AND LICENSE + +%% Xml2JS NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright 2010, 2011, 2012, 2013. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +========================================= +END OF Xml2JS NOTICES, INFORMATION, AND LICENSE + +%% Xmlbuilder NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2013 Ozgur Ozcitak + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +========================================= +END OF Xmlbuilder NOTICES, INFORMATION, AND LICENSE + +%% xtend NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2012-2014 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the Software), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +========================================= +END OF xtend NOTICES, INFORMATION, AND LICENSE + +%% @types/mocha NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) Microsoft Corporation. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +========================================= +END OF @types/mocha NOTICES, INFORMATION, AND LICENSE + +%% @types/node NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +MIT License + +Copyright (c) Microsoft Corporation. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +========================================= +END OF @types/node NOTICES, INFORMATION, AND LICENSE + +%% @types/q NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +MIT License + +Copyright (c) Microsoft Corporation. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +========================================= +END OF @types/q NOTICES, INFORMATION, AND LICENSE \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/Utility.ps1 b/Tasks/AzureFileCopyV6/Utility.ps1 new file mode 100644 index 000000000000..0d8272dd3d2e --- /dev/null +++ b/Tasks/AzureFileCopyV6/Utility.ps1 @@ -0,0 +1,1387 @@ +# Utility Functions used by AzureFileCopy.ps1 (other than azure calls) # + +$ErrorActionPreference = 'Stop' +$azureStackEnvironment = "AzureStack" +$jobId = $env:SYSTEM_JOBID; + +$featureFlags = @{ + retireAzureRM = [System.Convert]::ToBoolean($env:RETIRE_AZURERM_POWERSHELL_MODULE) +} + +function Get-AzureCmdletsVersion +{ + return (Get-Module AzureRM -ListAvailable).Version +} + +function Get-AzureVersionComparison($azureVersion, $compareVersion) +{ + Write-Verbose "Compare azure versions: $azureVersion, $compareVersion" + return ($azureVersion -and $azureVersion -gt $compareVersion) +} + +function Get-AzureUtility +{ + $azureUtilityARM = "AzureUtilityARM.ps1" + $azUtilityVersion100 = "AzureUtilityAz1.0.ps1" + + if ($featureFlags.retireAzureRM) { + return $azUtilityVersion100 + } + else { + if (Get-Module Az.Accounts -ListAvailable) { + Write-Verbose "Az module is installed in the agent." + return $azUtilityVersion100 + } + Write-Warning "Az module is not installed in the agent." + return $azureUtilityARM + } +} + +function Get-Endpoint +{ + param([String] [Parameter(Mandatory=$true)] $connectedServiceName) + + $serviceEndpoint = Get-VstsEndpoint -Name "$connectedServiceName" + return $serviceEndpoint +} + +function Validate-AzurePowershellVersion +{ + Write-Verbose "Validating installed azure powershell version is greater than or equal to AzureRM 1.1.0" + if (!(Get-Module Az.Accounts -ListAvailable)){ + $currentVersion = Get-AzureCmdletsVersion + Write-Verbose "Installed Azure PowerShell version: $currentVersion" + + $minimumAzureVersion = New-Object System.Version(1, 1, 0) + $versionCompatible = Get-AzureVersionComparison -AzureVersion $currentVersion -CompareVersion $minimumAzureVersion + + if(!$versionCompatible) + { + Write-Telemetry "Task_InternalError" "UnsupportedAzurePSVersion" + Throw (Get-VstsLocString -Key "AFC_AzurePSNotInstalled" -ArgumentList $minimumAzureVersion) + } + + Write-Verbose "Validated the required azure powershell version is greater than or equal to 1.1.0" + } +} + +function Get-StorageKey +{ + param([string][Parameter(Mandatory=$true)]$storageAccountName, + [object][Parameter(Mandatory=$true)]$endpoint, + [string][Parameter(Mandatory=$false)]$connectedServiceNameARM, + [string][Parameter(Mandatory=$false)]$vstsAccessToken) + + $storageAccountName = $storageAccountName.Trim() + + # checking azure powershell version to make calls to ARM endpoint + Validate-AzurePowershellVersion + + # getting storage account key from ARM endpoint + $storageKey = Get-AzureStorageKeyFromARM -storageAccountName $storageAccountName -serviceEndpoint $endpoint $connectedServiceNameARM $vstsAccessToken + + return $storageKey +} + +function Get-blobStorageEndpoint +{ + param([string][Parameter(Mandatory=$true)]$storageAccountName, + [object][Parameter(Mandatory=$true)]$endpoint, + [string][Parameter(Mandatory=$false)]$connectedServiceNameARM, + [string][Parameter(Mandatory=$false)]$vstsAccessToken) + + $storageAccountName = $storageAccountName.Trim() + + # getting storage account key from ARM endpoint + $blobStorageEndpoint = Get-AzureBlobStorageEndpointFromARM $storageAccountName $endpoint $connectedServiceNameARM $vstsAccessToken + + return $blobStorageEndpoint +} + +function Get-StorageAccountType +{ + param([string][Parameter(Mandatory=$true)]$storageAccountName, + [object][Parameter(Mandatory=$true)]$endpoint, + [string][Parameter(Mandatory=$false)]$connectedServiceNameARM, + [string][Parameter(Mandatory=$false)]$vstsAccessToken) + + $storageAccountName = $storageAccountName.Trim() + # getting storage account type from ARM endpoint + $storageAccountType = Get-AzureStorageAccountTypeFromARM $storageAccountName $endpoint $connectedServiceNameARM $vstsAccessToken + + if($null -ne $storageAccountType) + { + return $storageAccountType.ToString() + } +} + +function ThrowError +{ + param([string]$errorMessage) + + $readmelink = "https://aka.ms/azurefilecopyreadme" + $helpMessage = (Get-VstsLocString -Key "AFC_AzureFileCopyMoreHelp" -ArgumentList $readmelink) + throw "$errorMessage $helpMessage" +} + +function ConvertTo-Pfx { + param( + [String][Parameter(Mandatory = $true)] $pemFileContent + ) + + if ($ENV:Agent_TempDirectory) { + $pemFilePath = "$ENV:Agent_TempDirectory\clientcertificate.pem" + $pfxFilePath = "$ENV:Agent_TempDirectory\clientcertificate.pfx" + $pfxPasswordFilePath = "$ENV:Agent_TempDirectory\clientcertificatepassword.txt" + } + else { + $pemFilePath = "$ENV:System_DefaultWorkingDirectory\clientcertificate.pem" + $pfxFilePath = "$ENV:System_DefaultWorkingDirectory\clientcertificate.pfx" + $pfxPasswordFilePath = "$ENV:System_DefaultWorkingDirectory\clientcertificatepassword.txt" + } + + # save the PEM certificate to a PEM file + Set-Content -Path $pemFilePath -Value $pemFileContent + + # use openssl to convert the PEM file to a PFX file + $pfxFilePassword = [System.Guid]::NewGuid().ToString() + + if (CmdletHasMember -cmdlet Set-Content -memberName NoNewline) { + Set-Content -Path $pfxPasswordFilePath -Value $pfxFilePassword -NoNewline + } + else { + [System.IO.File]::WriteAllText($pfxPasswordFilePath, $pfxFilePassword, [System.Text.Encoding]::ASCII) + } + + $openSSLExePath = "$PSScriptRoot\ps_modules\VstsAzureHelpers_\openssl\openssl.exe" + $env:OPENSSL_CONF = "$PSScriptRoot\ps_modules\VstsAzureHelpers_\openssl\openssl.cnf" + $env:RANDFILE=".rnd" + + $openSSLArgs = "pkcs12 -export -in $pemFilePath -out $pfxFilePath -password file:`"$pfxPasswordFilePath`"" + + Invoke-VstsTool -FileName $openSSLExePath -Arguments $openSSLArgs -RequireExitCodeZero + + return $pfxFilePath, $pfxFilePassword +} + +function Upload-FilesToAzureContainer +{ + param([string][Parameter(Mandatory=$true)]$sourcePath, + [object][Parameter(Mandatory=$true)]$endPoint, + [string][Parameter(Mandatory=$true)]$storageAccountName, + [string][Parameter(Mandatory=$true)]$containerName, + [string]$blobPrefix, + [string]$blobStorageEndpoint, + [string][Parameter(Mandatory=$true)]$azCopyLocation, + [string]$additionalArguments, + [string][Parameter(Mandatory=$true)]$destinationType, + [bool]$useDefaultArguments, + [bool]$cleanTargetBeforeCopy, + [bool]$useSanitizerActivate = $false + ) + + try + { + $aadAuthorityUrl = "https://login.microsoftonline.com/" + if ($endpoint.Data.EnvironmentAuthorityUrl -ne $null) { + $aadAuthorityUrl = $endpoint.Data.EnvironmentAuthorityUrl + } + + Write-Verbose "AAD autority URL = $aadAuthorityUrl" + Write-Host " mime: $PSScriptRoot\MimeMapping.json" + $env:AZCOPY_CONTENT_TYPE_MAP ="$PSScriptRoot\MimeMapping.json" + + if ($endPoint.Auth.Scheme -eq 'ServicePrincipal') { + try { + if($endPoint.Auth.Parameters.AuthenticationType -eq 'SPNCertificate') { + $pemFileContent = $endPoint.Auth.Parameters.ServicePrincipalCertificate + $pfxFilePath, $pfxFilePassword = ConvertTo-Pfx -pemFileContent $pemFileContent + + $env:AZCOPY_AUTO_LOGIN_TYPE = "PSCRED" + $env:AZCOPY_SPA_CERT_PASSWORD = $pfxFilePassword + } + else { + $env:AZCOPY_AUTO_LOGIN_TYPE = "PSCRED" + $env:AZCOPY_SPA_CLIENT_SECRET = $endPoint.Auth.Parameters.ServicePrincipalKey + } + } + catch { + # Provide an additional, custom, credentials-related error message. + $exceptionMessage = $_.Exception.Message.ToString() + Write-Verbose "ExceptionMessage: $exceptionMessage" + throw (New-Object System.Exception((Get-VstsLocString -Key ServicePrincipalError), $_.Exception)) + } + } + elseif ($endPoint.Auth.Scheme -eq 'ManagedServiceIdentity' -or $endPoint.Auth.Scheme -eq 'WorkloadIdentityFederation') { + $env:AZCOPY_AUTO_LOGIN_TYPE = "PSCRED" + } + else { + throw (Get-VstsLocString -Key UnsupportedAuthScheme -ArgumentList $endPoint.Auth.Scheme) + } + + Write-Output (Get-VstsLocString -Key "AFC_UploadFilesStorageAccount" -ArgumentList $sourcePath, $storageAccountName, $containerName, $blobPrefix) + + $blobPrefix = $blobPrefix.Trim() + $trailingChars = [regex]::Escape("/") + '+$' + $blobPrefix = $blobPrefix -replace $trailingChars, "/" + $containerURL = [string]::Format("{0}/{1}/{2}", $blobStorageEndpoint.Trim("/"), $containerName, $blobPrefix.TrimStart("/")) + + $containerURL = $containerURL.Replace('$','`$') + $azCopyExeLocation = Join-Path -Path $azCopyLocation -ChildPath "AzCopy.exe" + if($cleanTargetBeforeCopy) + { + + Write-Output "##[command] & azcopy rm `"$containerURL`" --recursive=true" + + $cleanToBlobCommand = "azcopy rm `"$containerURL`" --recursive=true" + + Invoke-Expression -Command $cleanToBlobCommand + + } + if ($useSanitizerActivate) { + # Splitting arguments on space, but not on space inside quotes + $sanitizedArguments = [regex]::Split($additionalArguments, ' (?=(?:[^"]|"[^"]*")*$)') + Write-Output "##[command] & azcopy copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments" + & azcopy copy $sourcePath $containerURL $sanitizedArguments + } else { + Write-Output "##[command] & azcopy copy `"$sourcePath`" `"$containerURL`" $additionalArguments" + $azCopyCommand = "azcopy copy `"$sourcePath`" `"$containerURL`" $additionalArguments" + Invoke-Expression -Command $azCopyCommand + } + + if($LASTEXITCODE -eq 0) + { + Write-Output (Get-VstsLocString -Key "AFC_UploadFileSuccessful" -ArgumentList $sourcePath, $storageAccountName, $containerName, $blobPrefix) + } + else + { + throw (Get-VstsLocString -Key "AFC_AzCopyBlobUploadNonZeroExitCode") + } + } + catch + { + # deletes container only if we have created temporary container + if ($destinationType -ne "AzureBlob") + { + Remove-AzureContainer -containerName $containerName -storageContext $storageContext + } + + $exceptionMessage = $_.Exception.Message.ToString() + Write-Verbose "ExceptionMessage: $exceptionMessage" + + $errorMessage = (Get-VstsLocString -Key "AFC_UploadContainerStorageAccount" -ArgumentList $containerName, $storageAccountName, $blobPrefix, $exceptionMessage) + Write-Telemetry "Task_InternalError" "BlobUploadFailed" + ThrowError -errorMessage $errorMessage + } + finally + { + Import-Module "$PSScriptRoot\ps_modules\VstsAzureHelpers_" + Remove-EndpointSecrets + + } +} + +function Does-AzureVMMatchTagFilterCriteria +{ + param([object]$azureVMResource, + [string]$filter) + + if($azureVMResource) + { + # If no filters are provided, by default operations are performed on all azure resources + if([string]::IsNullOrEmpty($filter)) + { + return $true + } + + $tagsFilterArray = $filter.Split(';').Trim() + foreach($tag in $tagsFilterArray) + { + $tagKeyValue = $tag.Split(':').Trim() + $tagKey = $tagKeyValue[0] + $tagValues = $tagKeyValue[1] + + if($tagKeyValue.Length -ne 2 -or [string]::IsNullOrWhiteSpace($tagKey) -or [string]::IsNullOrWhiteSpace($tagValues)) + { + Write-Telemetry "Input_Validation" "FILTERING_IncorrectFormat" + throw (Get-VstsLocString -Key "AFC_IncorrectTags") + } + + $tagValueArray = $tagValues.Split(',').Trim() + + if($azureVMResource.Tags) + { + foreach($azureVMResourceTag in $azureVMResource.Tags.GetEnumerator()) + { + if($azureVMResourceTag.Key -contains $tagKey) + { + $azureVMTagValueArray = $azureVMResourceTag.Value.Split(",").Trim() + foreach($tagValue in $tagValueArray) + { + if($azureVMTagValueArray -contains $tagValue) + { + return $true + } + } + } + } + } + } + + return $false + } +} + +function Get-TagBasedFilteredAzureVMs +{ + param([object]$azureVMResources, + [string]$filter) + + if($azureVMResources) + { + $filteredAzureVMResources = @() + foreach($azureVMResource in $azureVMResources) + { + if(Does-AzureVMMatchTagFilterCriteria -azureVMResource $azureVMResource -filter $filter) + { + Write-Verbose "azureVM with name: $($azureVMResource.Name) matches filter criteria" + $filteredAzureVMResources += $azureVMResource + } + } + + return $filteredAzureVMResources + } +} + +function Get-MachineBasedFilteredAzureVMs +{ + param([object]$azureVMResources, + [string]$filter) + + if($azureVMResources -and -not [string]::IsNullOrEmpty($filter)) + { + $filteredAzureVMResources = @() + + $machineFilterArray = $filter.Split(',').Trim() + $machineFilterArray = $machineFilterArray | % {$_.ToLower()} | Select -Uniq + foreach($machine in $machineFilterArray) + { + $azureVMResource = $azureVMResources | Where-Object {$_.Name -contains $machine} + if($azureVMResource) + { + $filteredAzureVMResources += $azureVMResource + } + else + { + $commaSeparatedMachinesNotPresentInRG += ($(if($commaSeparatedMachinesNotPresentInRG){", "}) + $machine) + } + + if($commaSeparatedMachinesNotPresentInRG -ne $null) + { + Write-Telemetry "Input_Validation" "FILTERING_MachinesNotPresentInRG" + throw (Get-VstsLocString -Key "AFC_MachineDoesNotExist" -ArgumentList $commaSeparatedMachinesNotPresentInRG) + } + } + + return $filteredAzureVMResources + } +} + +function Get-FilteredAzureVMsInResourceGroup +{ + param([object]$azureVMResources, + [string]$resourceFilteringMethod, + [string]$filter) + + if($azureVMResources -and -not [string]::IsNullOrEmpty($resourceFilteringMethod)) + { + if($resourceFilteringMethod -eq "tags" -or [string]::IsNullOrEmpty($filter)) + { + $filteredAzureVMResources = Get-TagBasedFilteredAzureVMs -azureVMResources $azureVMResources -filter $filter + } + else + { + $filteredAzureVMResources = Get-MachineBasedFilteredAzureVMs -azureVMResources $azureVMResources -filter $filter + } + + return $filteredAzureVMResources + } +} + +function Get-FilteredAzureClassicVMsInResourceGroup +{ + param([object]$azureClassicVMResources, + [string]$resourceFilteringMethod, + [string]$filter) + + if($azureClassicVMResources -and -not [string]::IsNullOrEmpty($resourceFilteringMethod)) + { + Write-Verbose "Filtering azureClassicVM resources with filtering option:'$resourceFilteringMethod' and filters:'$filter'" + $filteredAzureClassicVMResources = Get-FilteredAzureVMsInResourceGroup -azureVMResources $azureClassicVMResources -resourceFilteringMethod $resourceFilteringMethod -filter $filter + + return $filteredAzureClassicVMResources + } +} + +function Get-FilteredAzureRMVMsInResourceGroup +{ + param([object]$azureRMVMResources, + [string]$resourceFilteringMethod, + [string]$filter) + + if($azureRMVMResources -and -not [string]::IsNullOrEmpty($resourceFilteringMethod)) + { + Write-Verbose "Filtering azureRMVM resources with filtering option:$resourceFilteringMethod and filters:$filter" + $filteredAzureRMVMResources = Get-FilteredAzureVMsInResourceGroup -azureVMResources $azureRMVMResources -resourceFilteringMethod $resourceFilteringMethod -filter $filter + + return $filteredAzureRMVMResources + } +} + +function Get-MachineNameFromId +{ + param([string]$resourceGroupName, + [System.Collections.Hashtable]$map, + [string]$mapParameter, + [Object]$azureRMVMResources, + [boolean]$throwOnTotalUnavailability, + [string]$debugLogsFlag) + + if($map) + { + if($debugLogsFlag -eq "true") + { + Write-Verbose "Map for $mapParameter : " -verbose + Write-Verbose ($map | Format-List | Out-String) -verbose + + Write-Verbose "azureRMVMResources: " -verbose + Write-Verbose ($azureRMVMResources | Format-List | Out-String) -verbose + } + + Write-Verbose "throwOnTotalUnavailability: $throwOnTotalUnavailability" + + $errorCount = 0 + foreach($vm in $azureRMVMResources) + { + $value = $map[$vm.Id.ToLower()] + $resourceName = $vm.Name + if(-not [string]::IsNullOrEmpty($value)) + { + Write-Verbose "$mapParameter value for resource $resourceName is $value" + $map.Remove($vm.Id.ToLower()) + $map[$resourceName] = $value + } + else + { + $errorCount = $errorCount + 1 + Write-Verbose "Unable to find $mapParameter for resource $resourceName" + } + } + + if($throwOnTotalUnavailability -eq $true) + { + if($errorCount -eq $azureRMVMResources.Count -and $azureRMVMResources.Count -ne 0) + { + throw (Get-VstsLocString -Key "AFC_MachineNameFromIdErrorAllResources" -ArgumentList $mapParameter, $resourceGroupName) + } + else + { + if($errorCount -gt 0 -and $errorCount -ne $azureRMVMResources.Count) + { + Write-Warning (Get-VstsLocString -Key "AFC_MachineNameFromIdError" -ArgumentList $mapParameter, $errorCount, $resourceGroupName) + } + } + } + + return $map + } +} + +function Get-MachinesFqdnsForPublicIP +{ + param([string]$resourceGroupName, + [Object]$publicIPAddressResources, + [Object]$networkInterfaceResources, + [Object]$azureRMVMResources, + [System.Collections.Hashtable]$fqdnMap, + [string]$debugLogsFlag) + + if(-not [string]::IsNullOrEmpty($resourceGroupName)-and $publicIPAddressResources -and $networkInterfaceResources) + { + Write-Verbose "Trying to get FQDN for the azureRM VM resources under public IP from resource Group $resourceGroupName" + + #Map the ipc to the fqdn + foreach($publicIp in $publicIPAddressResources) + { + if(-not [string]::IsNullOrEmpty($publicIp.IpConfiguration.Id)) + { + $publicIPKey = $publicIp.IpConfiguration.Id.ToLower() + Write-Verbose "Adding entry to FQDN map with key $publicIPKey" + + if(-not [string]::IsNullOrEmpty($publicIP.DnsSettings.Fqdn)) + { + Write-Verbose "Inserting to FQDN map with value (FQDN) : $publicIPKey" + $fqdnMap[$publicIPKey] = $publicIP.DnsSettings.Fqdn + } + elseif(-not [string]::IsNullOrEmpty($publicIP.IpAddress)) + { + Write-Verbose "Inserting to FQDN map with value (IP Address) : $publicIPKey" + $fqdnMap[$publicIPKey] = $publicIP.IpAddress + } + } + } + + if($debugLogsFlag -eq "true") + { + Write-Verbose "fqdnMap for MachinesFqdnsForPublicIP after mapping ip configuration to fqdn: " -Verbose + Write-Verbose ($fqdnMap | Format-List | Out-String) -Verbose + } + + #Find out the NIC, and thus the VM corresponding to a given ipc + foreach($nic in $networkInterfaceResources) + { + foreach($ipc in $nic.IpConfigurations) + { + $fqdn = $fqdnMap[$ipc.Id.ToLower()] + if(-not [string]::IsNullOrEmpty($fqdn)) + { + $fqdnMap.Remove($ipc.Id.ToLower()) + if($nic.VirtualMachine) + { + $vmId = $nic.VirtualMachine.Id.ToLower() + Write-Verbose "Adding entry to FQDN map with key $vmId" + $fqdnMap[$vmId] = $fqdn + } + } + } + } + + if($debugLogsFlag -eq "true") + { + Write-Verbose "final fqdnMap for MachinesFqdnsForPublicIP after finding vm id corresponding to ip configuration: " -Verbose + Write-Verbose ($fqdnMap | Format-List | Out-String) -Verbose + } + } + + Write-Verbose "Got FQDN for the azureRM VM resources under public IP from resource Group $resourceGroupName" + + return $fqdnMap +} + +function Get-MachinesFqdnsForLB +{ + param([string]$resourceGroupName, + [Object]$publicIPAddressResources, + [Object]$networkInterfaceResources, + [Object]$frontEndIPConfigs, + [System.Collections.Hashtable]$fqdnMap, + [string]$debugLogsFlag) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and $publicIPAddressResources -and $networkInterfaceResources -and $frontEndIPConfigs) + { + Write-Verbose "Trying to get FQDN for the RM azureVM resources under load balancer from resource group: $resourceGroupName" + + #Map the public ip id to the fqdn + foreach($publicIp in $publicIPAddressResources) + { + if(-not [string]::IsNullOrEmpty($publicIp.IpConfiguration.Id)) + { + if(-not [string]::IsNullOrEmpty($publicIP.DnsSettings.Fqdn)) + { + $fqdnMap[$publicIp.Id.ToLower()] = $publicIP.DnsSettings.Fqdn + } + elseif(-not [string]::IsNullOrEmpty($publicIP.IpAddress)) + { + $fqdnMap[$publicIp.Id.ToLower()] = $publicIP.IpAddress + } + } + } + + if($debugLogsFlag -eq "true") + { + Write-Verbose "fqdnMap for MachinesFqdnsForLB after mapping ip configuration to fqdn: " -Verbose + Write-Verbose ($fqdnMap | Format-List | Out-String) -Verbose + } + + #Get the NAT rule for a given ip id + foreach($config in $frontEndIPConfigs) + { + if(-not [string]::IsNullOrEmpty($config.PublicIpAddress.Id)) + { + $fqdn = $fqdnMap[$config.PublicIpAddress.Id.ToLower()] + if(-not [string]::IsNullOrEmpty($fqdn)) + { + $fqdnMap.Remove($config.PublicIpAddress.Id.ToLower()) + foreach($rule in $config.InboundNatRules) + { + $fqdnMap[$rule.Id.ToLower()] = $fqdn + } + } + } + } + + if($debugLogsFlag -eq "true") + { + Write-Verbose "fqdnMap for MachinesFqdnsForLB after getting NAT rule for given ip configuration: " -Verbose + Write-Verbose ($fqdnMap | Format-List | Out-String) -Verbose + } + + #Find out the NIC, and thus the corresponding machine to which the NAT rule belongs + foreach($nic in $networkInterfaceResources) + { + foreach($ipc in $nic.IpConfigurations) + { + foreach($rule in $ipc.LoadBalancerInboundNatRules) + { + $fqdn = $fqdnMap[$rule.Id.ToLower()] + if(-not [string]::IsNullOrEmpty($fqdn)) + { + $fqdnMap.Remove($rule.Id.ToLower()) + if($nic.VirtualMachine) + { + $fqdnMap[$nic.VirtualMachine.Id.ToLower()] = $fqdn + } + } + } + } + } + + if($debugLogsFlag -eq "true") + { + Write-Verbose "final fqdnMap for MachinesFqdnsForLB after getting vm id corresponding to NAT rule for given ip configuration: " -Verbose + Write-Verbose ($fqdnMap | Format-List | Out-String) -Verbose + } + } + + Write-Verbose "Got FQDN for the RM azureVM resources under load balancer from resource Group $resourceGroupName" + + return $fqdnMap +} + +function Get-FrontEndPorts +{ + param([string]$backEndPort, + [System.Collections.Hashtable]$portList, + [Object]$networkInterfaceResources, + [Object]$inboundRules, + [string]$debugLogsFlag) + + if(-not [string]::IsNullOrEmpty($backEndPort) -and $networkInterfaceResources -and $inboundRules) + { + Write-Verbose "Trying to get front end ports for $backEndPort" + + $filteredRules = $inboundRules | Where-Object {$_.BackendPort -eq $backEndPort} + + #Map front end port to back end ipc + foreach($rule in $filteredRules) + { + if($rule.BackendIPConfiguration) + { + $portList[$rule.BackendIPConfiguration.Id.ToLower()] = $rule.FrontendPort + } + } + + if($debugLogsFlag -eq "true") + { + Write-Verbose "portList for FrontEndPorts after mapping front end port to backend ip configuration: " -Verbose + Write-Verbose ($portList | Format-List | Out-String) -Verbose + } + + #Get the nic, and the corresponding machine id for a given back end ipc + foreach($nic in $networkInterfaceResources) + { + foreach($ipConfig in $nic.IpConfigurations) + { + $frontEndPort = $portList[$ipConfig.Id.ToLower()] + if(-not [string]::IsNullOrEmpty($frontEndPort)) + { + $portList.Remove($ipConfig.Id.ToLower()) + if($nic.VirtualMachine) + { + $portList[$nic.VirtualMachine.Id.ToLower()] = $frontEndPort + } + } + } + } + + if($debugLogsFlag -eq "true") + { + Write-Verbose "portList for FrontEndPorts after getting vm id corresponding to given backend ip configuration, after finding nic: " -Verbose + Write-Verbose ($portList | Format-List | Out-String) -Verbose + } + } + + Write-Verbose "Got front end ports for $backEndPort" + return $portList +} + +function Get-AzureRMVMsConnectionDetailsInResourceGroup +{ + param([string]$resourceGroupName, + [object]$azureRMVMResources, + [string]$enableCopyPrerequisites, + [string]$connectedServiceName, + [string]$vstsAccessToken) + + [hashtable]$fqdnMap = @{} + $winRMHttpsPortMap = New-Object 'System.Collections.Generic.Dictionary[string, string]' + [hashtable]$azureRMVMsDetails = @{} + $debugLogsFlag= $env:system_debug + + # Getting endpoint used for the task + if($connectedServiceName) + { + $endpoint = Get-Endpoint -connectedServiceName $connectedServiceName + } + + $isAzureStackEnvironment = $false + if($endpoint -and $endpoint.Data -and $endpoint.Data.Environment) { + $environmentName = $Endpoint.Data.Environment + if($environmentName -eq $azureStackEnvironment) + { + $isAzureStackEnvironment = $true + } + } + + if (-not [string]::IsNullOrEmpty($resourceGroupName) -and $azureRMVMResources) + { + + if($isAzureStackEnvironment) + { + Write-Verbose "Fetching resource group resources details for Azure Stack environment." + $azureRGResourcesDetails = Get-AzureRMResourceGroupResourcesDetailsForAzureStack -resourceGroupName $resourceGroupName ` + -azureRMVMResources $azureRMVMResources -endpoint $endpoint -connectedServiceNameARM $connectedServiceName -vstsAccessToken $vstsAccessToken + } + else + { + Write-Verbose "Fetching resource group resources details for Azure/National cloud environments." + $azureRGResourcesDetails = Get-AzureRMResourceGroupResourcesDetails -resourceGroupName $resourceGroupName -azureRMVMResources $azureRMVMResources + } + + $networkInterfaceResources = $azureRGResourcesDetails["networkInterfaceResources"] + $publicIPAddressResources = $azureRGResourcesDetails["publicIPAddressResources"] + $loadBalancerResources = $azureRGResourcesDetails["loadBalancerResources"] + + if($loadBalancerResources) + { + foreach($lbName in $loadBalancerResources.Keys) + { + $lbDetails = $loadBalancerResources[$lbName] + $frontEndIPConfigs = $lbDetails["frontEndIPConfigs"] + $inboundRules = $lbDetails["inboundRules"] + + $fqdnMap = Get-MachinesFqdnsForLB -resourceGroupName $resourceGroupName -publicIPAddressResources $publicIPAddressResources -networkInterfaceResources $networkInterfaceResources ` + -frontEndIPConfigs $frontEndIPConfigs -fqdnMap $fqdnMap -debugLogsFlag $debugLogsFlag + $winRMHttpsPortMap = Get-FrontEndPorts -BackEndPort "5986" -PortList $winRMHttpsPortMap -networkInterfaceResources $networkInterfaceResources ` + -inboundRules $inboundRules -debugLogsFlag $debugLogsFlag + } + + $winRMHttpsPortMap = Get-MachineNameFromId -Map $winRMHttpsPortMap -MapParameter "Front End port" -azureRMVMResources $azureRMVMResources ` + -throwOnTotalUnavailability $false -debugLogsFlag $debugLogsFlag + } + + $fqdnMap = Get-MachinesFqdnsForPublicIP -resourceGroupName $resourceGroupName -publicIPAddressResources $publicIPAddressResources -networkInterfaceResources $networkInterfaceResources ` + -azureRMVMResources $azureRMVMResources -fqdnMap $fqdnMap -debugLogsFlag $debugLogsFlag + $fqdnMap = Get-MachineNameFromId -resourceGroupName $resourceGroupName -Map $fqdnMap -MapParameter "FQDN" -azureRMVMResources $azureRMVMResources ` + -throwOnTotalUnavailability $true -debugLogsFlag $debugLogsFlag + + foreach ($resource in $azureRMVMResources) + { + $resourceName = $resource.Name + $resourceId = $resource.Id + $resourceFQDN = $fqdnMap[$resourceName] + $resourceWinRMHttpsPort = $winRMHttpsPortMap[$resourceName] + if([string]::IsNullOrWhiteSpace($resourceWinRMHttpsPort)) + { + Write-Verbose "Defaulting WinRmHttpsPort of $resourceName to 5986" + $resourceWinRMHttpsPort = "5986" + } + + $resourceProperties = @{} + $resourceProperties.Name = $resourceName + $resourceProperties.fqdn = $resourceFQDN + $resourceProperties.winRMHttpsPort = $resourceWinRMHttpsPort + + $azureRMVMsDetails.Add($resourceName, $resourceProperties) + + if ($enableCopyPrerequisites -eq "true") + { + Write-Verbose "Enabling winrm for virtual machine $resourceName" -Verbose + Add-AzureVMCustomScriptExtension -resourceGroupName $resourceGroupName -vmId $resourceId -vmName $resourceName -dnsName $resourceFQDN ` + -location $resource.Location -connectedServiceName $connectedServiceName -vstsAccessToken $vstsAccessToken + } + } + + return $azureRMVMsDetails + } +} + +function Get-AzureVMResourcesProperties +{ + param([string]$resourceGroupName, + [string]$resourceFilteringMethod, + [string]$machineNames, + [string]$enableCopyPrerequisites, + [string]$connectedServiceName, + [string]$vstsAccessToken) + + $machineNames = $machineNames.Trim() + if(-not [string]::IsNullOrEmpty($resourceGroupName)) + { + $azureRMVMResources = Get-AzureRMVMsInResourceGroup -resourceGroupName $resourceGroupName + $filteredAzureRMVMResources = Get-FilteredAzureRMVMsInResourceGroup -azureRMVMResources $azureRMVMResources -resourceFilteringMethod $resourceFilteringMethod -filter $machineNames + $azureVMsDetails = Get-AzureRMVMsConnectionDetailsInResourceGroup -resourceGroupName $resourceGroupName -azureRMVMResources $filteredAzureRMVMResources ` + -enableCopyPrerequisites $enableCopyPrerequisites -connectedServiceName $connectedServiceName -vstsAccessToken $vstsAccessToken + + # throw if no azure VMs found in resource group or due to filtering + if($azureVMsDetails.Count -eq 0) + { + if([string]::IsNullOrEmpty($machineNames)) + { + Write-Telemetry "Input_Validation" "PREREQ_NoRMVMResources" + throw (Get-VstsLocString -Key "AFC_NoARMVMResources" -ArgumentList $resourceGroupName, $connectedServiceName) + } + else + { + Write-Telemetry "Input_Validation" "FILTERING_NoVMResources" + throw (Get-VstsLocString -Key "AFC_FilteringNoVMResources" -ArgumentList $resourceGroupName, $resourceFilteringMethod, $machineNames) + } + } + + return $azureVMsDetails + } +} + +function Get-AzureVMsCredentials +{ + param([string][Parameter(Mandatory=$true)]$vmsAdminUserName, + [string][Parameter(Mandatory=$true)]$vmsAdminPassword) + + Write-Verbose "Azure VMs Admin Username: $vmsAdminUserName" + $azureVmsCredentials = New-Object 'System.Net.NetworkCredential' -ArgumentList $vmsAdminUserName, $vmsAdminPassword + + return $azureVmsCredentials +} + +function Copy-FilesParallellyToAzureVMs +{ + param( + [string[]]$targetMachineNames, + [pscredential]$credential, + [string]$protocol, + [object]$remoteScriptJobArguments, + [object]$sessionOption, + [bool]$enableDetailedLogging + ) + + Write-Verbose "Starting parallel file copy" + + try + { + $parallelCopyJobResults = Invoke-RemoteScript -targetMachineNames $targetMachineNames ` + -credential $credential ` + -protocol $protocol ` + -remoteScriptJobArguments $remoteScriptJobArguments ` + -sessionOption $sessionOption ` + -uploadLogFiles:$enableDetailedLogging + + Write-Verbose "Parallel file copy: Invoke-RemoteScript completed" + } + catch + { + Write-Verbose "Parallel file copy: Invoke-RemoteScript threw exception" + throw + } + + # Write job status for every VM + $isFileCopyFailed = $false + $parallelCopyJobResults | ForEach-Object { + if($_.ExitCode -eq 0) + { + Write-Verbose "Copy source files status for $($_.ComputerName): Successful" + } + else + { + $isFileCopyFailed = $true + Write-Verbose "Copy source files status for $($_.ComputerName): Failed" + } + } + + # Throw if any of the remote jobs failed + if($isFileCopyFailed) + { + ThrowError -errorMessage (Get-VstsLocString -Key "AFC_ParallelCopyFailed") + } + + Write-Verbose "Successfully finished parallel file copy" +} + +function Copy-FilesSequentiallyToAzureVMs +{ + param( + [string[]]$targetMachineNames, + [pscredential]$credential, + [string]$protocol, + [object]$remoteScriptJobArguments, + [object]$sessionOption, + [bool]$enableDetailedLogging + ) + + Write-Verbose "Starting sequential file copy" + + $targetMachineNames | ForEach-Object { + Write-Output (Get-VstsLocString -Key "AFC_CopyStarted" -ArgumentList $_) + $targetMachineName = @($_) + + try + { + $copyJobResult = Invoke-RemoteScript -targetMachineNames $targetMachineName ` + -credential $credential ` + -protocol $protocol ` + -remoteScriptJobArguments $remoteScriptJobArguments ` + -sessionOption $sessionOption ` + -uploadLogFiles:$enableDetailedLogging + + Write-Verbose "Sequential file copy: Invoke-RemoteScript completed" + } + catch + { + Write-Verbose "Sequential file copy: Invoke-RemoteScript threw exception" + throw + } + + if($copyJobResult.ExitCode -eq 0) + { + Write-Verbose "Copy source files status for $_ : Successful" + } + else + { + Write-Verbose "Copy source files status for $_ : Failed" + ThrowError -errorMessage (Get-VstsLocString -Key "AFC_CopyFailed" -ArgumentList $_) + } + } + + Write-Verbose "Successfully finished sequential file copy" +} + +function Copy-FilesToAzureVMsFromStorageContainer +{ + param( + [string[]]$targetMachineNames, + [pscredential]$credential, + [string]$protocol, + [object]$sessionOption, + [string]$blobStorageEndpoint, + [string]$containerName, + [string]$targetPath, + [bool]$cleanTargetBeforeCopy, + [bool]$copyFilesInParallel, + [string]$additionalArguments, + [string]$azCopyToolLocation, + [scriptblock]$fileCopyJobScript, + [bool]$enableDetailedLogging, + [bool]$useSanitizerActivate = $false + ) + + # Generate storage container URL + $containerURL = [string]::Format("{0}/{1}", $blobStorageEndpoint.Trim("/"), $containerName) + + $azCopyToolFileNames = Get-ChildItem $azCopyToolLocation | Select-Object -ExpandProperty Name + $azCopyToolFilePaths = Get-ChildItem $azCopyToolLocation | Select-Object -ExpandProperty FullName + + $azCopyToolFileContents = @() + + foreach ($file in $azCopyToolFilePaths) + { + $azCopyToolFileContents += [Convert]::ToBase64String([System.IO.File]::ReadAllBytes($file)) + } + + # script block arguments + $scriptBlockArgs = " -containerURL '$containerURL' -targetPath '$targetPath' -additionalArguments '$additionalArguments'" + if($cleanTargetBeforeCopy) + { + $scriptBlockArgs += " -CleanTargetBeforeCopy" + } + if($enableDetailedLogging) + { + $scriptBlockArgs += " -EnableDetailedLogging" + } + if($useSanitizerActivate) + { + $scriptBlockArgs += " -useSanitizerActivate" + } + + $remoteScriptJobArguments = @{ + inline = $true; + inlineScript = $fileCopyJobScript.ToString(); + scriptArguments = $scriptBlockArgs; + errorActionPreference = "Stop"; + failOnStdErr = $true; + } + + if($copyFilesInParallel) + { + Copy-FilesParallellyToAzureVMs -targetMachineNames $targetMachineNames ` + -credential $credential ` + -protocol $protocol ` + -remoteScriptJobArguments $remoteScriptJobArguments ` + -sessionOption $sessionOption ` + -enableDetailedLogging $enableDetailedLogging + } + else + { + Copy-FilesSequentiallyToAzureVMs -targetMachineNames $targetMachineNames ` + -credential $credential ` + -protocol $protocol ` + -remoteScriptJobArguments $remoteScriptJobArguments ` + -sessionOption $sessionOption ` + -enableDetailedLogging $enableDetailedLogging + } +} + +function Validate-CustomScriptExecutionStatus +{ + param([string]$resourceGroupName, + [string]$vmName, + [string]$extensionName, + [object]$endpoint, + [string]$connectedServiceNameARM, + [string]$vstsAccessToken) + + Write-Verbose "Validating the winrm configuration custom script extension status" + + $isScriptExecutionPassed = $true + try + { + $status = Get-AzureMachineStatus -resourceGroupName $resourceGroupName -Name $vmName + + # For AzurePS < 1.0.4 $_.ExtensionType is applicable. + $customScriptExtension = $status.Extensions | Where-Object { ($_.ExtensionType -eq "Microsoft.Compute.CustomScriptExtension" -or $_.Type -eq "Microsoft.Compute.CustomScriptExtension") -and $_.Name -eq $extensionName } + + if($customScriptExtension) + { + $subStatuses = $customScriptExtension.SubStatuses + $subStatusesStr = $subStatuses | Out-String + + Write-Verbose "Custom script extension execution statuses: $subStatusesStr" + + if($subStatuses) + { + foreach($subStatus in $subStatuses) + { + if($subStatus.Code.Contains("ComponentStatus/StdErr") -and (-not [string]::IsNullOrEmpty($subStatus.Message))) + { + $isScriptExecutionPassed = $false + $errMessage = $subStatus.Message + break + } + } + } + else + { + $isScriptExecutionPassed = $false + $errMessage = "No execution status exists for the custom script extension '$extensionName'" + } + } + else + { + $isScriptExecutionPassed = $false + $errMessage = "No custom script extension '$extensionName' exists" + } + } + catch + { + $isScriptExecutionPassed = $false + $errMessage = $_.Exception.Message + } + + if(-not $isScriptExecutionPassed) + { + $response = Remove-AzureMachineCustomScriptExtension -resourceGroupName $resourceGroupName -vmName $vmName -name $extensionName ` + -endpoint $endpoint -connectedServiceNameARM $connectedServiceNameARM -vstsAccessToken $vstsAccessToken + throw (Get-VstsLocString -Key "AFC_SetCustomScriptExtensionFailed" -ArgumentList $extensionName, $vmName, $errMessage) + } + + Write-Verbose "Validated the script execution successfully" +} + +function Is-WinRMCustomScriptExtensionExists +{ + param([string]$resourceGroupName, + [string]$vmName, + [string]$extensionName, + [string]$connectedServiceName, + [string]$vstsAccessToken) + + $isExtensionExists = $true + $removeExtension = $false + + try + { + $serviceEndpoint = Get-Endpoint $connectedServiceName + $customScriptExtension = Get-AzureMachineCustomScriptExtension -resourceGroupName $resourceGroupName -vmName $vmName -name $extensionName ` + -endpoint $serviceEndpoint -connectedServiceNameARM $connectedServiceName -vstsAccessToken $vstsAccessToken + + if($customScriptExtension) + { + if($customScriptExtension.ProvisioningState -ne "Succeeded") + { + $removeExtension = $true + } + else + { + try + { + Validate-CustomScriptExecutionStatus -resourceGroupName $resourceGroupName -vmName $vmName -extensionName $extensionName -endpoint $serviceEndpoint + } + catch + { + $isExtensionExists = $false + } + } + } + else + { + $isExtensionExists = $false + } + } + catch + { + $isExtensionExists = $false + } + + if($removeExtension) + { + $response = Remove-AzureMachineCustomScriptExtension -resourceGroupName $resourceGroupName -vmName $vmName -name $extensionName ` + -endpoint $serviceEndpoint -connectedServiceNameARM $connectedServiceName -vstsAccessToken $vstsAccessToken + + try + { + $index = 1 + $maxCount = 45 # Setting timeout for deleting extension as 15 mins. + + while($index -le $maxCount) { + Write-Verbose "Checking WinRM custom script extension status $index times" + + $customScriptExtension = Get-AzureMachineCustomScriptExtension -resourceGroupName $resourceGroupName -vmName $vmName -name $extensionName ` + -endpoint $serviceEndpoint -connectedServiceNameARM $connectedServiceName -vstsAccessToken $vstsAccessToken + + if(-not $customScriptExtension -or $customScriptExtension.ProvisioningState -ne "deleting") + { + break + } + + start-sleep -s 20 + $index = $index + 1 + } + } + catch + { + Write-Verbose ("Failed to get extension with error : " + $_.exception.message) + } + + if ($index -gt $maxCount) + { + Write-Warning (Get-VstsLocString -Key AFC_UninstallWinRMCustomScriptExtension) + } + + $isExtensionExists = $false + } + + $isExtensionExists +} + +function Get-TargetUriFromFwdLink { + param( + [string]$fwdLink + ) + Write-Verbose "Trying to get the target uri from the fwdLink: $fwdLink" + $proxy = Get-VstsWebProxy + Add-Type -AssemblyName System.Net.Http + $validHttpRedirectCodes = @( + [System.Net.HttpStatusCode]::Moved, + [System.Net.HttpStatusCode]::MovedPermanently, + [System.Net.HttpStatusCode]::Found, + [System.Net.HttpStatusCode]::Redirect, + [System.Net.HttpStatusCode]::RedirectKeepVerb, + [System.Net.HttpStatusCode]::TemporaryRedirect + ) + $HttpClientHandler = New-Object System.Net.Http.HttpClientHandler + $HttpClientHandler.Proxy = $proxy + $HttpClientHandler.AllowAutoRedirect = $false + $HttpClient = New-Object System.Net.Http.HttpClient -ArgumentList $HttpClientHandler + $response = $HttpClient.GetAsync($fwdLink) + $response.Wait() + if($validHttpRedirectCodes.IndexOf($response.Result.StatusCode) -eq -1) { + Write-Verbose "The http response code: $([int]$response.Result.StatusCode) is not a valid redirect response code." + throw (Get-VstsLocString -Key "AFC_RedirectResponseInvalidStatusCode" -ArgumentList $([int]$response.Result.StatusCode)) + } + $targetUri = $response.Result.Headers.Location.AbsoluteUri + if([string]::IsNullOrEmpty($targetUri)) { + Write-Verbose "The target uri is null" + throw (Get-VstsLocString -Key "AFC_RedirectResponseLocationHeaderIsNull") + } + Write-Verbose "The target uri is: $targetUri" + return $targetUri +} + +function Add-WinRMHttpsNetworkSecurityRuleConfig +{ + param([string]$resourceGroupName, + [string]$vmId, + [string]$ruleName, + [string]$rulePriotity, + [string]$winrmHttpsPort) + + Write-Verbose "Trying to add a network security group rule" + + try + { + $securityGroups = Get-NetworkSecurityGroups -resourceGroupName $resourceGroupName -vmId $vmId + + if($securityGroups.Count -gt 0) + { + Add-NetworkSecurityRuleConfig -resourceGroupName $resourceGroupName -securityGroups $securityGroups -ruleName $ruleName -rulePriotity $rulePriotity -winrmHttpsPort $winrmHttpsPort + } + } + catch + { + Write-Telemetry "Task_InternalError" "NetworkSecurityRuleConfigFailed" + Write-Warning (Get-VstsLocString -Key "AFC_AddNetworkSecurityRuleFailed" -ArgumentList $_.exception.message) + } +} + +function Add-AzureVMCustomScriptExtension +{ + param([string]$resourceGroupName, + [string]$vmId, + [string]$vmName, + [string]$dnsName, + [string]$location, + [string]$connectedServiceName, + [string]$vstsAccessToken) + + $configWinRMScriptFileFwdLink ="https://aka.ms/vstsconfigurewinrm" + $makeCertFileFwdLink ="https://aka.ms/vstsmakecertexe" + $scriptToRun="ConfigureWinRM.ps1" + $extensionName="WinRMCustomScriptExtension" + $ruleName = "VSO-Custom-WinRM-Https-Port" + $rulePriotity="3986" + $winrmHttpsPort = "5986" + + Write-Verbose "Adding custom script extension '$extensionName' for virtual machine '$vmName'" + Write-Verbose "VM Location : $location" + Write-Verbose "VM DNS : $dnsName" + + try + { + $endpoint = Get-Endpoint $connectedServiceName + $isExtensionExists = Is-WinRMCustomScriptExtensionExists -resourceGroupName $resourceGroupName -vmName $vmName -extensionName $extensionName ` + -connectedServiceName $connectedServiceName -vstsAccessToken $vstsAccessToken + Write-Verbose -Verbose "IsExtensionExists: $isExtensionExists" + + if($isExtensionExists) + { + Add-WinRMHttpsNetworkSecurityRuleConfig -resourceGroupName $resourceGroupName -vmId $vmId -ruleName $ruleName -rulePriotity $rulePriotity -winrmHttpsPort $winrmHttpsPort + + Write-Verbose "Skipping the addition of custom script extension '$extensionName' as it already exists" + return + } + + $configWinRMScriptFile = Get-TargetUriFromFwdLink -fwdLink $configWinRMScriptFileFwdLink + $makeCertFile = Get-TargetUriFromFwdLink -fwdLink $makeCertFileFwdLink + + $result = Set-AzureMachineCustomScriptExtension -resourceGroupName $resourceGroupName -vmName $vmName -name $extensionName -fileUri $configWinRMScriptFile, $makeCertFile -run $scriptToRun -argument $dnsName -location $location + $resultDetails = $result | ConvertTo-Json + Write-Verbose "Set-AzureMachineCustomScriptExtension completed with response : $resultDetails" + + if($result.Status -ne "Succeeded") + { + Write-Telemetry "Task_InternalError" "ProvisionVmCustomScriptFailed" + + $response = Remove-AzureMachineCustomScriptExtension -resourceGroupName $resourceGroupName -vmName $vmName -name $extensionName ` + -endpoint $endpoint -connectedServiceNameARM $connectedServiceName -vstsAccessToken $vstsAccessToken + throw (Get-VstsLocString -Key "AFC_UnableToSetCustomScriptExtension" -ArgumentList $extensionName, $vmName, $result.Error.Message) + } + + Validate-CustomScriptExecutionStatus -resourceGroupName $resourceGroupName -vmName $vmName -extensionName $extensionName -endpoint $endpoint + Add-WinRMHttpsNetworkSecurityRuleConfig -resourceGroupName $resourceGroupName -vmId $vmId -ruleName $ruleName -rulePriotity $rulePriotity -winrmHttpsPort $winrmHttpsPort + } + catch + { + Write-Telemetry "Task_InternalError" "ExecutionOfVmCustomScriptFailed:$exceptionType" + throw (Get-VstsLocString -Key "AFC_CopyPrereqsFailed" -ArgumentList $_.exception.message) + } + + Write-Verbose "Successfully added the custom script extension '$extensionName' for virtual machine '$vmName'" +} + +function Check-ContainerNameAndArgs +{ + param([string]$containerName, + [string]$additionalArguments) + + $additionalArguments = ' ' + $additionalArguments + ' ' + if($containerName -eq '$root' -and $additionalArguments -like '* --recursive *') + { + Write-Warning (Get-vstsLocString -Key "AFC_RootContainerAndDirectory") + } +} + +function Get-InvokeRemoteScriptParameters +{ + param([object][Parameter(Mandatory=$true)]$azureVMResourcesProperties, + [object]$networkCredentials, + [bool]$skipCACheck) + + $sessionOption = New-PSSessionOption -SkipCACheck:$skipCACheck + + $psCredentials = New-Object PSCredential($networkCredentials.UserName, (ConvertTo-SecureString $networkCredentials.Password -AsPlainText -Force)) + + $targetMachines = @() + foreach($vm in $azureVMResourcesProperties.Values) + { + $targetMachines += [string]::Format("{0}:{1}", $vm.fqdn, $vm.winRMHttpsPort) + } + + $protocol = 'https' + + return @{ + targetMachineNames = $targetMachines; + credential = $psCredentials; + protocol = $protocol; + sessionOption = $sessionOption + } +} + +function CleanUp-PSModulePathForHostedAgent { + # Clean up PSModulePath for hosted agent + $azureRMModulePath = "C:\Modules\azurerm_2.1.0" + $azureModulePath = "C:\Modules\azure_2.1.0" + $newEnvPSModulePath = $env:PSModulePath + + if ($newEnvPSModulePath.split(";") -contains $azureRMModulePath) { + $newEnvPSModulePath = (($newEnvPSModulePath).Split(";") | ? { $_ -ne $azureRMModulePath }) -join ";" + write-verbose "$azureRMModulePath removed. Restart the prompt for the changes to take effect." + } + else { + write-verbose "$azureRMModulePath is not present in $newEnvPSModulePath" + } + + if ($newEnvPSModulePath.split(";") -contains $azureModulePath) { + $newEnvPSModulePath = (($newEnvPSModulePath).Split(";") | ? { $_ -ne $azureModulePath }) -join ";" + write-verbose "$azureModulePath removed. Restart the prompt for the changes to take effect." + } + else { + write-verbose "$azureModulePath is not present in $newEnvPSModulePath" + } + + if (Test-Path "C:\Modules\az_*") { + $azPSModulePath = (Get-ChildItem "C:\Modules\az_*" -Directory ` + | Sort-Object { [version]$_.Name.Split('_')[-1] } ` + | Select-Object -Last 1).FullName + + Write-Verbose "Found Az module path $azPSModulePath, will be used" + $env:PSModulePath = ($azPSModulePath + ";" + $newEnvPSModulePath).Trim(";") + } +} \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/_buildConfigs/Node20/package-lock.json b/Tasks/AzureFileCopyV6/_buildConfigs/Node20/package-lock.json new file mode 100644 index 000000000000..d5a3032a2ec4 --- /dev/null +++ b/Tasks/AzureFileCopyV6/_buildConfigs/Node20/package-lock.json @@ -0,0 +1,793 @@ +{ + "name": "AzureFileCopyV5", + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "@azure/msal-common": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-9.1.1.tgz", + "integrity": "sha512-we9xR8lvu47fF0h+J8KyXoRy9+G/fPzm3QEa2TrdR3jaVS3LKAyE2qyMuUkNdbVkvzl8Zr9f7l+IUSP22HeqXw==" + }, + "@azure/msal-node": { + "version": "1.14.5", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.14.5.tgz", + "integrity": "sha512-NcVdMfn8Z3ogN+9RjOSF7uwf2Gki5DEJl0BdDSL83KUAgVAobtkZi5W8EqxbJLrTO/ET0jv5DregrcR5qg2pEA==", + "requires": { + "@azure/msal-common": "^9.0.1", + "jsonwebtoken": "^8.5.1", + "uuid": "^8.3.0" + } + }, + "@types/concat-stream": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.1.tgz", + "integrity": "sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==", + "requires": { + "@types/node": "*" + } + }, + "@types/form-data": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", + "integrity": "sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==", + "requires": { + "@types/node": "*" + } + }, + "@types/jsonwebtoken": { + "version": "8.5.9", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.9.tgz", + "integrity": "sha512-272FMnFGzAVMGtu9tkr29hRL6bZj4Zs1KZNeHLnKqAvp06tAIcarTMwOh8/8bz4FmKRcMxZhZNeUAQsNLoiPhg==", + "requires": { + "@types/node": "*" + } + }, + "@types/mocha": { + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", + "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==" + }, + "@types/node": { + "version": "20.11.30", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.30.tgz", + "integrity": "sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==", + "requires": { + "undici-types": "~5.26.4" + } + }, + "@types/q": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.0.7.tgz", + "integrity": "sha512-0WS7XU7sXzQ7J1nbnMKKYdjrrFoO3YtZYgUzeV8JFXffPnHfvSJQleR70I8BOAsOm14i4dyaAZ3YzqIl1YhkXQ==" + }, + "@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==" + }, + "agent-base": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-5.1.1.tgz", + "integrity": "sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g==" + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" + }, + "async-mutex": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.4.1.tgz", + "integrity": "sha512-WfoBo4E/TbCX1G95XTjbWTE3X2XLG0m1Xbv2cwOtuPdyH9CZvnaA5nCt1ucjaKEgW2A5IF71hxrRhr83Je5xjA==", + "requires": { + "tslib": "^2.4.0" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "azure-devops-node-api": { + "version": "12.5.0", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.5.0.tgz", + "integrity": "sha512-R5eFskGvOm3U/GzeAuxRkUsAl0hrAwGgWn6zAd2KrZmrEhWZVqLew4OOupbQlXUuojUzpGtq62SmdhJ06N88og==", + "requires": { + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" + } + }, + "azure-pipelines-task-lib": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.3.1.tgz", + "integrity": "sha512-56ZAr4MHIoa24VNVuwPL4iUQ5MKaigPoYXkBG8E8fiVmh8yZdatUo25meNoQwg77vDY22F63Q44UzXoMWmy7ag==", + "requires": { + "minimatch": "3.0.5", + "mockery": "^1.7.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.5", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + }, + "dependencies": { + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + } + } + }, + "azure-pipelines-tasks-azure-arm-rest": { + "version": "3.237.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-azure-arm-rest/-/azure-pipelines-tasks-azure-arm-rest-3.237.0.tgz", + "integrity": "sha512-0SKEE3DX3t1Fx4Vx1zTGO1s9mZc+maEQpBtaVsB+C/2zOvXVZew3+n2tUaNOMtkTtXSCPJbzt8oqHIZFEJrvVw==", + "requires": { + "@azure/msal-node": "1.14.5", + "@types/jsonwebtoken": "^8.5.8", + "@types/mocha": "^5.2.7", + "@types/node": "^10.17.0", + "@types/q": "1.5.4", + "async-mutex": "^0.4.0", + "azure-devops-node-api": "^12.0.0", + "azure-pipelines-task-lib": "^3.4.0", + "https-proxy-agent": "^4.0.0", + "jsonwebtoken": "^8.5.1", + "node-fetch": "^2.6.7", + "q": "1.5.1", + "typed-rest-client": "1.8.4", + "xml2js": "0.6.2" + }, + "dependencies": { + "@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" + }, + "@types/q": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", + "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==" + }, + "azure-pipelines-task-lib": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.4.0.tgz", + "integrity": "sha512-3eC4OTFw+7xD7A2aUhxR/j+jRlTI+vVfS0CGxt1pCLs4c/KmY0tQWgbqjD3157kmiucWxELBvgZHaD2gCBe9fg==", + "requires": { + "minimatch": "3.0.5", + "mockery": "^2.1.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.5", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + } + }, + "mockery": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mockery/-/mockery-2.1.0.tgz", + "integrity": "sha512-9VkOmxKlWXoDO/h1jDZaS4lH33aWfRiJiNT/tKj+8OGzrcFDLo8d0syGdbsc3Bc4GvRXPb+NMMvojotmuGJTvA==" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + } + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, + "ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==" + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, + "http-basic": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", + "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", + "requires": { + "caseless": "^0.12.0", + "concat-stream": "^1.6.2", + "http-response-object": "^3.0.1", + "parse-cache-control": "^1.0.1" + } + }, + "http-response-object": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", + "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", + "requires": { + "@types/node": "^10.0.3" + }, + "dependencies": { + "@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" + } + } + }, + "https-proxy-agent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz", + "integrity": "sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==", + "requires": { + "agent-base": "5", + "debug": "4" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + }, + "is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "requires": { + "has": "^1.0.3" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "jsonwebtoken": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "requires": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^5.6.0" + } + }, + "jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "requires": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, + "lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + }, + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "mockery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/mockery/-/mockery-1.7.0.tgz", + "integrity": "sha512-gUQA33ayi0tuAhr/rJNZPr7Q7uvlBt4gyJPbi0CDcAfIzIrDu1YgGMFgmAu3stJqBpK57m7+RxUbcS+pt59fKQ==" + }, + "moment": { + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==" + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "requires": { + "whatwg-url": "^5.0.0" + } + }, + "object-inspect": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "requires": { + "wrappy": "1" + } + }, + "parse-cache-control": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", + "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "promise": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", + "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", + "requires": { + "asap": "~2.0.6" + } + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==" + }, + "qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "requires": { + "resolve": "^1.1.6" + } + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "sax": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", + "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, + "sync-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", + "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", + "requires": { + "http-response-object": "^3.0.1", + "sync-rpc": "^1.2.1", + "then-request": "^6.0.0" + } + }, + "sync-rpc": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", + "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", + "requires": { + "get-port": "^3.1.0" + } + }, + "then-request": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", + "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", + "requires": { + "@types/concat-stream": "^1.6.0", + "@types/form-data": "0.0.33", + "@types/node": "^8.0.0", + "@types/qs": "^6.2.31", + "caseless": "~0.12.0", + "concat-stream": "^1.6.0", + "form-data": "^2.2.0", + "http-basic": "^8.1.1", + "http-response-object": "^3.0.1", + "promise": "^8.0.0", + "qs": "^6.4.0" + }, + "dependencies": { + "@types/node": { + "version": "8.10.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", + "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==" + } + } + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + }, + "typed-rest-client": { + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.4.tgz", + "integrity": "sha512-MyfKKYzk3I6/QQp6e1T50py4qg+c+9BzOEl2rBmQIpStwNUoqQ73An+Tkfy9YuV7O+o2mpVVJpe+fH//POZkbg==", + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" + }, + "typescript": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "dev": true + }, + "underscore": { + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", + "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==" + }, + "undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "xml2js": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", + "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + } + }, + "xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" + } + } +} diff --git a/Tasks/AzureFileCopyV6/_buildConfigs/Node20/package.json b/Tasks/AzureFileCopyV6/_buildConfigs/Node20/package.json new file mode 100644 index 000000000000..59228e978cd2 --- /dev/null +++ b/Tasks/AzureFileCopyV6/_buildConfigs/Node20/package.json @@ -0,0 +1,15 @@ +{ + "name": "AzureFileCopyV5", + "dependencies": { + "@types/mocha": "^5.2.7", + "@types/node": "^20.3.1", + "@types/q": "1.0.7", + "azure-pipelines-task-lib": "^3.1.0", + "azure-pipelines-tasks-azure-arm-rest": "^3.237.0", + "moment": "^2.29.4", + "uuid": "^8.3.0" + }, + "devDependencies": { + "typescript": "5.1.6" + } +} diff --git a/Tasks/AzureFileCopyV6/icon.png b/Tasks/AzureFileCopyV6/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..7360d562f9528de743293a050cadba09609f1e77 GIT binary patch literal 517 zcmV+g0{Z=lP)j0{%rBW#} zL?Qq|2%sDWAi?{9h-hD&fjHyh!?`J9mp^$L&bvBK!faY~60bl|TRW^Lao9(f=%Gx5;^%TIRMEzh`dye~S zfW2m$r*8PzyRBtbmpnIJ0MK~pvDa+#(CI~9o^ru+*9A6{1KhWJ@!C*C2A<31263Co z0q#4>&1>)4S_8x8`##2)&;0p|{VpiHdKMds1l<@Tz!SiBZq6E@t1P?Fz#%|=BOM3g z7#DYYRc(ZAcUP_MEoaX=oIU%I?gKyYs;ahz=5Bq(CcgIpP%70(pw28D00000NkvXX Hu0mjf@i*zm literal 0 HcmV?d00001 diff --git a/Tasks/AzureFileCopyV6/icon.svg b/Tasks/AzureFileCopyV6/icon.svg new file mode 100644 index 000000000000..3debdb04649f --- /dev/null +++ b/Tasks/AzureFileCopyV6/icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/Tasks/AzureFileCopyV6/make.json b/Tasks/AzureFileCopyV6/make.json new file mode 100644 index 000000000000..6062b6ba9023 --- /dev/null +++ b/Tasks/AzureFileCopyV6/make.json @@ -0,0 +1,63 @@ +{ + "common": [ + { + "module": "../Common/VstsAzureHelpers_", + "type": "ps" + }, + { + "module": "../Common/VstsAzureRestHelpers_", + "type": "ps" + }, + { + "module": "../Common/Deployment/TelemetryHelper", + "type": "ps" + }, + { + "module": "../Common/TlsHelper_", + "type": "ps" + }, + { + "module": "../Common/RemoteDeployer", + "type": "ps" + }, + { + "module": "../Common/Sanitizer", + "type": "ps" + } + ], + "externals": { + "archivePackages": [ + { + "url": "https://vstsagenttools.blob.core.windows.net/tools/azcopy/10.12/AzCopy.zip", + "dest": "./" + } + ], + "nugetv2": [ + { + "name": "VstsTaskSdk", + "version": "0.10.0", + "repository": "https://www.powershellgallery.com/api/v2/", + "cp": [ + { + "source": [ + "*.dll", + "*.ps1", + "*.psd1", + "*.psm1", + "lib.json", + "Strings" + ], + "dest": "ps_modules/VstsTaskSdk/", + "options": "-R" + } + ] + } + ] + }, + "cp": [ + { + "source": "MimeMapping.json", + "options": "-R" + } + ] +} diff --git a/Tasks/AzureFileCopyV6/package-lock.json b/Tasks/AzureFileCopyV6/package-lock.json new file mode 100644 index 000000000000..3323cf444ef1 --- /dev/null +++ b/Tasks/AzureFileCopyV6/package-lock.json @@ -0,0 +1,773 @@ +{ + "name": "AzureFileCopyV5", + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "@azure/msal-common": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-9.1.1.tgz", + "integrity": "sha512-we9xR8lvu47fF0h+J8KyXoRy9+G/fPzm3QEa2TrdR3jaVS3LKAyE2qyMuUkNdbVkvzl8Zr9f7l+IUSP22HeqXw==" + }, + "@azure/msal-node": { + "version": "1.14.5", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.14.5.tgz", + "integrity": "sha512-NcVdMfn8Z3ogN+9RjOSF7uwf2Gki5DEJl0BdDSL83KUAgVAobtkZi5W8EqxbJLrTO/ET0jv5DregrcR5qg2pEA==", + "requires": { + "@azure/msal-common": "^9.0.1", + "jsonwebtoken": "^8.5.1", + "uuid": "^8.3.0" + } + }, + "@types/concat-stream": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.1.tgz", + "integrity": "sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==", + "requires": { + "@types/node": "*" + } + }, + "@types/form-data": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", + "integrity": "sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==", + "requires": { + "@types/node": "*" + } + }, + "@types/jsonwebtoken": { + "version": "8.5.9", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.9.tgz", + "integrity": "sha512-272FMnFGzAVMGtu9tkr29hRL6bZj4Zs1KZNeHLnKqAvp06tAIcarTMwOh8/8bz4FmKRcMxZhZNeUAQsNLoiPhg==", + "requires": { + "@types/node": "*" + } + }, + "@types/mocha": { + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", + "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==" + }, + "@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" + }, + "@types/q": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.0.7.tgz", + "integrity": "sha512-0WS7XU7sXzQ7J1nbnMKKYdjrrFoO3YtZYgUzeV8JFXffPnHfvSJQleR70I8BOAsOm14i4dyaAZ3YzqIl1YhkXQ==" + }, + "@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==" + }, + "agent-base": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-5.1.1.tgz", + "integrity": "sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g==" + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" + }, + "async-mutex": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.4.1.tgz", + "integrity": "sha512-WfoBo4E/TbCX1G95XTjbWTE3X2XLG0m1Xbv2cwOtuPdyH9CZvnaA5nCt1ucjaKEgW2A5IF71hxrRhr83Je5xjA==", + "requires": { + "tslib": "^2.4.0" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "azure-devops-node-api": { + "version": "12.5.0", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.5.0.tgz", + "integrity": "sha512-R5eFskGvOm3U/GzeAuxRkUsAl0hrAwGgWn6zAd2KrZmrEhWZVqLew4OOupbQlXUuojUzpGtq62SmdhJ06N88og==", + "requires": { + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" + } + }, + "azure-pipelines-task-lib": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.3.1.tgz", + "integrity": "sha512-56ZAr4MHIoa24VNVuwPL4iUQ5MKaigPoYXkBG8E8fiVmh8yZdatUo25meNoQwg77vDY22F63Q44UzXoMWmy7ag==", + "requires": { + "minimatch": "3.0.5", + "mockery": "^1.7.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.5", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + }, + "dependencies": { + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + } + } + }, + "azure-pipelines-tasks-azure-arm-rest": { + "version": "3.237.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-azure-arm-rest/-/azure-pipelines-tasks-azure-arm-rest-3.237.0.tgz", + "integrity": "sha512-0SKEE3DX3t1Fx4Vx1zTGO1s9mZc+maEQpBtaVsB+C/2zOvXVZew3+n2tUaNOMtkTtXSCPJbzt8oqHIZFEJrvVw==", + "requires": { + "@azure/msal-node": "1.14.5", + "@types/jsonwebtoken": "^8.5.8", + "@types/mocha": "^5.2.7", + "@types/node": "^10.17.0", + "@types/q": "1.5.4", + "async-mutex": "^0.4.0", + "azure-devops-node-api": "^12.0.0", + "azure-pipelines-task-lib": "^3.4.0", + "https-proxy-agent": "^4.0.0", + "jsonwebtoken": "^8.5.1", + "node-fetch": "^2.6.7", + "q": "1.5.1", + "typed-rest-client": "1.8.4", + "xml2js": "0.6.2" + }, + "dependencies": { + "@types/q": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", + "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==" + }, + "azure-pipelines-task-lib": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.4.0.tgz", + "integrity": "sha512-3eC4OTFw+7xD7A2aUhxR/j+jRlTI+vVfS0CGxt1pCLs4c/KmY0tQWgbqjD3157kmiucWxELBvgZHaD2gCBe9fg==", + "requires": { + "minimatch": "3.0.5", + "mockery": "^2.1.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.5", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + } + }, + "mockery": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mockery/-/mockery-2.1.0.tgz", + "integrity": "sha512-9VkOmxKlWXoDO/h1jDZaS4lH33aWfRiJiNT/tKj+8OGzrcFDLo8d0syGdbsc3Bc4GvRXPb+NMMvojotmuGJTvA==" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + } + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, + "ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==" + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, + "http-basic": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", + "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", + "requires": { + "caseless": "^0.12.0", + "concat-stream": "^1.6.2", + "http-response-object": "^3.0.1", + "parse-cache-control": "^1.0.1" + } + }, + "http-response-object": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", + "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", + "requires": { + "@types/node": "^10.0.3" + } + }, + "https-proxy-agent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz", + "integrity": "sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==", + "requires": { + "agent-base": "5", + "debug": "4" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + }, + "is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "requires": { + "has": "^1.0.3" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "jsonwebtoken": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "requires": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^5.6.0" + } + }, + "jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "requires": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, + "lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + }, + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "mockery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/mockery/-/mockery-1.7.0.tgz", + "integrity": "sha512-gUQA33ayi0tuAhr/rJNZPr7Q7uvlBt4gyJPbi0CDcAfIzIrDu1YgGMFgmAu3stJqBpK57m7+RxUbcS+pt59fKQ==" + }, + "moment": { + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==" + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "requires": { + "whatwg-url": "^5.0.0" + } + }, + "object-inspect": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "requires": { + "wrappy": "1" + } + }, + "parse-cache-control": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", + "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "promise": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", + "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", + "requires": { + "asap": "~2.0.6" + } + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==" + }, + "qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "requires": { + "resolve": "^1.1.6" + } + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "sax": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", + "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, + "sync-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", + "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", + "requires": { + "http-response-object": "^3.0.1", + "sync-rpc": "^1.2.1", + "then-request": "^6.0.0" + } + }, + "sync-rpc": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", + "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", + "requires": { + "get-port": "^3.1.0" + } + }, + "then-request": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", + "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", + "requires": { + "@types/concat-stream": "^1.6.0", + "@types/form-data": "0.0.33", + "@types/node": "^8.0.0", + "@types/qs": "^6.2.31", + "caseless": "~0.12.0", + "concat-stream": "^1.6.0", + "form-data": "^2.2.0", + "http-basic": "^8.1.1", + "http-response-object": "^3.0.1", + "promise": "^8.0.0", + "qs": "^6.4.0" + }, + "dependencies": { + "@types/node": { + "version": "8.10.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", + "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==" + } + } + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + }, + "typed-rest-client": { + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.4.tgz", + "integrity": "sha512-MyfKKYzk3I6/QQp6e1T50py4qg+c+9BzOEl2rBmQIpStwNUoqQ73An+Tkfy9YuV7O+o2mpVVJpe+fH//POZkbg==", + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" + }, + "typescript": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.2.tgz", + "integrity": "sha512-e4ERvRV2wb+rRZ/IQeb3jm2VxBsirQLpQhdxplZ2MEzGvDkkMmPglecnNDfSUBivMjP93vRbngYYDQqQ/78bcQ==", + "dev": true + }, + "underscore": { + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", + "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "xml2js": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", + "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + } + }, + "xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" + } + } +} diff --git a/Tasks/AzureFileCopyV6/package.json b/Tasks/AzureFileCopyV6/package.json new file mode 100644 index 000000000000..a2d0dfb28690 --- /dev/null +++ b/Tasks/AzureFileCopyV6/package.json @@ -0,0 +1,15 @@ +{ + "name": "AzureFileCopyV5", + "dependencies": { + "@types/mocha": "^5.2.7", + "@types/node": "^10.17.0", + "@types/q": "1.0.7", + "azure-pipelines-task-lib": "^3.1.0", + "azure-pipelines-tasks-azure-arm-rest": "^3.237.0", + "moment": "^2.29.4", + "uuid": "^8.3.0" + }, + "devDependencies": { + "typescript": "4.0.2" + } +} diff --git a/Tasks/AzureFileCopyV6/task.json b/Tasks/AzureFileCopyV6/task.json new file mode 100644 index 000000000000..b6762f368336 --- /dev/null +++ b/Tasks/AzureFileCopyV6/task.json @@ -0,0 +1,290 @@ +{ + "id": "EB72CB01-A7E5-427B-A8A1-1B31CCAC8A43", + "name": "AzureFileCopy", + "friendlyName": "Azure file copy", + "description": "Copy files to Azure Blob Storage or virtual machines", + "helpUrl": "https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/azure-file-copy", + "helpMarkDown": "[Learn more about this task](https://aka.ms/azurefilecopyreadme) and to report any issues with this new version of the task [here](https://github.com/microsoft/azure-pipelines-tasks/issues/new?assignees=&labels=regression%2Cbug&projects=&template=1.regression.yml&title=%5BREGRESSION%5D%3A+)", + "category": "Deploy", + "visibility": [ + "Build", + "Release" + ], + "author": "Microsoft Corporation", + "version": { + "Major": 6, + "Minor": 237, + "Patch": 0 + }, + "demands": [ + "azureps" + ], + "releaseNotes": "What's new in Version 6.0:
   Support Workload identity federation and [Azure RBAC](https://learn.microsoft.com/en-us/azure/storage/blobs/assign-azure-role-data-access?tabs=portal)", + "minimumAgentVersion": "1.103.0", + "inputs": [ + { + "name": "SourcePath", + "type": "filePath", + "label": "Source", + "defaultValue": "", + "required": true, + "helpMarkDown": "Absolute path of the source folder, or file on the local machine, or a UNC share. Expression should return a single folder or a file. Wild card symbol (*) is supported anywhere in the file path or file name." + }, + { + "name": "ConnectedServiceNameARM", + "aliases": [ + "azureSubscription" + ], + "type": "connectedService:AzureRM", + "label": "Azure Subscription", + "defaultValue": "", + "required": true, + "helpMarkDown": "Azure Resource Manager subscription to target for copying the files." + }, + { + "name": "Destination", + "type": "pickList", + "label": "Destination Type", + "defaultValue": "", + "required": true, + "options": { + "AzureBlob": "Azure Blob", + "AzureVMs": "Azure VMs" + }, + "helpMarkDown": "Select the destination, either Azure Blob or Azure VMs." + }, + { + "name": "StorageAccountRM", + "aliases": [ + "storage" + ], + "type": "pickList", + "label": "RM Storage Account", + "defaultValue": "", + "required": true, + "helpMarkDown": "Specify a pre-existing ARM storage account. It is also used as an intermediary for copying files to Azure VMs", + "properties": { + "EditableOptions": "True" + } + }, + { + "name": "ContainerName", + "type": "string", + "label": "Container Name", + "defaultValue": "", + "required": true, + "helpMarkDown": "Name of the Container for uploading the files. If a container with the given name does not exist in the specified storage account, it will automatically be created.
If you need to create a virtual directory inside the container, use the blob prefix input below.
Example: If your target location is https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/, then specify mycontainer as container name and vd1/vd2/ as blob prefix.", + "visibleRule": "Destination = AzureBlob" + }, + { + "name": "BlobPrefix", + "type": "string", + "label": "Blob Prefix", + "defaultValue": "", + "required": false, + "helpMarkDown": "Useful for filtering files, for example, append build number to all the blobs to download files from that build only. Example: If you specify blob prefix as myvd1/, a virtual directory with this name will be created inside the container. Blob prefix with a trailing '/' will be considered a virtual directory. Otherwise, it will be treated as a file, unless the item being copied is itself a folder. The source files will be copied to https://myaccount.blob.core.windows.net/mycontainer/myvd1/.", + "visibleRule": "Destination = AzureBlob" + }, + { + "name": "EnvironmentNameRM", + "aliases": [ + "resourceGroup" + ], + "type": "pickList", + "label": "Resource Group", + "defaultValue": "", + "required": true, + "helpMarkDown": "Name of the target Resource Group for copying files to.", + "properties": { + "EditableOptions": "True" + }, + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "ResourceFilteringMethod", + "type": "radio", + "label": "Select Machines By", + "required": false, + "defaultValue": "machineNames", + "options": { + "machineNames": "Machine Names", + "tags": "Tags" + }, + "helpMarkDown": "Optionally, select a subset of VMs in resource group either by providing VMs host name or tags. [Tags](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/) are supported for resources created via the Azure Resource Manager only.", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "MachineNames", + "type": "string", + "label": "Filter Criteria", + "defaultValue": "", + "required": false, + "helpMarkDown": "Provide a list of VMs host name like ffweb, ffdb, or tags like Role:DB, Web; OS:Win8.1. Note the delimiters used for tags are ,(comma), :(colon) and ;(semicolon). If multiple tags are provided, then the task will run in all the VMs with the specified tags. The default is to run the task in all the VMs.", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "vmsAdminUserName", + "type": "string", + "label": "Admin Login", + "defaultValue": "", + "required": true, + "helpMarkDown": "Administrator Username of the VMs.", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "vmsAdminPassword", + "type": "string", + "label": "Password", + "defaultValue": "", + "required": true, + "helpMarkDown": "The administrator password of the VMs.
It can accept variable defined in build or release pipelines as '$(passwordVariable)'.
You may mark variable as 'secret' to secure it.", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "TargetPath", + "type": "string", + "label": "Destination Folder", + "defaultValue": "", + "required": true, + "helpMarkDown": "Local path on the target machines for copying the files from the source. Environment variable can be used like $env:windir\\BudgetIT\\Web.", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "AdditionalArgumentsForBlobCopy", + "type": "multiLine", + "label": "Optional Arguments (for uploading files to blob)", + "required": false, + "defaultValue": "", + "helpMarkDown": "Optional AzCopy.exe arguments that will be applied when uploading to blob like, --check-length=true. If no optional arguments are specified here, the following optional arguments will be added by default.
--log-level=INFO (if the pipeline is running in debug mode set --log-level=DEBUG),
--recursive (only if container name is not $root),
--blob-type=PageBlob (only if specified storage account is a premium account)." + }, + { + "name": "AdditionalArgumentsForVMCopy", + "type": "multiLine", + "label": "Optional Arguments (for downloading files to VM)", + "required": false, + "defaultValue": "", + "helpMarkDown": "Optional AzCopy.exe arguments that will be applied when downloading to VM like, --check-length=true. If no optional arguments are specified here, the following optional arguments will be added by default.
--log-level=INFO (if the pipeline is running in debug mode set --log-level=DEBUG),
--recursive", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "enableCopyPrerequisites", + "type": "boolean", + "label": "Enable Copy Prerequisites", + "defaultValue": "false", + "visibleRule": "Destination = AzureVMs", + "required": false, + "helpMarkDown": "Enabling this option configures Windows Remote Management (WinRM) listener over HTTPS protocol on port 5986, using a self-signed certificate. This configuration is required for performing copy operation on Azure machines. If the target Virtual Machines are backed by a Load balancer, ensure Inbound NAT rules are configured for target port (5986). Applicable only for ARM VMs." + }, + { + "name": "CopyFilesInParallel", + "type": "boolean", + "label": "Copy in Parallel", + "defaultValue": "true", + "required": false, + "helpMarkDown": "Setting it to true will copy files in parallel to the target machines.", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "CleanTargetBeforeCopy", + "type": "boolean", + "label": "Clean Target", + "defaultValue": "false", + "required": false, + "helpMarkDown": "Setting it to true will clean-up the destination folder before copying the files." + }, + { + "name": "skipCACheck", + "type": "boolean", + "label": "Test Certificate", + "defaultValue": "true", + "required": false, + "helpMarkDown": "If this option is selected, client skips the validation that the server certificate is signed by a trusted certificate authority (CA) when connecting over Hypertext Transfer Protocol over Secure Socket Layer (HTTPS).", + "visibleRule": "Destination = AzureVMs" + } + ], + "outputVariables": [ + { + "name": "StorageContainerUri", + "description": "Uri of the container where the files were copied to. Valid only when the selected destination is Azure Blob." + } + ], + "dataSourceBindings": [ + { + "target": "StorageAccountRM", + "endpointId": "$(ConnectedServiceNameARM)", + "dataSourceName": "AzureStorageAccountRM" + }, + { + "target": "EnvironmentNameRM", + "endpointId": "$(ConnectedServiceNameARM)", + "dataSourceName": "AzureVirtualMachinesV2Id", + "resultTemplate": "{\"Value\":\"{{{ #extractResource resourceGroups}}}\",\"DisplayValue\":\"{{{ #extractResource resourceGroups}}}\"}" + } + ], + "instanceNameFormat": "$(Destination) File Copy", + "prejobexecution": { + "Node10": { + "target": "PreJobExecutionAzureFileCopy.js" + }, + "Node16": { + "target": "PreJobExecutionAzureFileCopy.js", + "argumentFormat": "" + } + }, + "execution": { + "PowerShell3": { + "target": "AzureFileCopy.ps1" + } + }, + "messages": { + "AFC_StorageAccountNotFound": "Storage account: {0} not found. The selected service connection 'Service Principal' supports storage accounts of Azure Resource Manager type only.", + "AFC_ResourceGroupNotFound": "Provided resource group '{0}' does not exist.", + "AFC_GetVMStatus": "[Azure Call]Getting the status for vm '{0}'", + "AFC_GetVMStatusComplete": "[Azure Call]Got the status for vm '{0}'", + "AFC_GetCustomScriptExtension": "[Azure Call]Getting the custom script extension '{0}' for vm '{1}'", + "AFC_GetCustomScriptExtensionComplete": "[Azure Call]Got the custom script extension '{0}' for vm '{1}'", + "AFC_SetCustomScriptExtension": "[Azure Call]Setting the custom script extension '{0}' for vm '{1}'", + "AFC_SetCustomScriptExtensionComplete": "[Azure Call]Set the custom script extension '{0}' for vm '{1}'", + "AFC_RemoveCustomScriptExtension": "[Azure Call]Removing the custom script extension '{0}' for vm '{1}'", + "AFC_RemoveCustomScriptExtensionComplete": "[Azure Call]Removed the custom script extension '{0}' for vm '{1}'", + "AFC_NoNetworkInterface": "[Azure Call]No network interface found with virtual machine ID {0} under resource group {1}", + "AFC_NullOrEmptyResourceGroup": "[Azure Call]Resource group name and virtual machine ID should not be null or empty", + "AFC_AzurePSNotInstalled": "The required minimum version {0} of the Azure Powershell Cmdlets are not installed. You can follow the instructions at https://azure.microsoft.com/en-in/documentation/articles/powershell-install-configure/ to get the latest Azure powershell", + "AFC_ClassicStorageAccountNotFound": "Storage account: {0} not found. The selected service connection 'Certificate' supports storage accounts of Azure Classic type only.", + "AFC_GenericStorageAccountNotFound": "Storage account: {0} not found. Please specify existing storage account", + "AFC_AzureFileCopyMoreHelp": "For more info please refer to {0}", + "AFC_UploadFilesStorageAccount": "Uploading files from source path: '{0}' to storage account: '{1}' in container: '{2}' with blob prefix: '{3}'", + "AFC_UploadContainerStorageAccount": "Upload to container: '{0}' in storage account: '{1}' with blob prefix: '{2}' failed with error: '{3}'", + "AFC_UploadFileSuccessful": "Uploaded files successfully from source path: '{0}' to storage account: '{1}' in container: '{2}' with blob prefix: '{3}'", + "AFC_IncorrectTags": "Tags have been incorrectly specified. They have to be in the format Role:Web,DB;Location:East US;Dept.:Finance,HR", + "AFC_MachineDoesNotExist": "The following machines either do not exist in the resource group or their names have not been specified correctly: {0}. Provide the exact same machine names present in the resource group. Use comma to separate multiple machine names.", + "AFC_MachineNameFromIdErrorAllResources": "Unable to get {0} for all resources in ResourceGroup : '{1}'", + "AFC_MachineNameFromIdError": "Unable to get {0} for '{1}' resources in ResourceGroup : '{2}'", + "AFC_ResourceGroupNotFoundForSelectedConnection": "Unable to find the resource '{1}' using selected service connection '{0}'. Selected service connection '{0}' supports classic resources only (Service Management model).", + "AFC_NoClassicVMResources": "No machine exists under resource group: '{0}' for copy. Selected service connection '{1}' supports Virtual Machines of Azure Classic type only.", + "AFC_NoARMVMResources": "No machine exists under resource group: '{0}' for copy. Selected service connection '{1}' supports Virtual Machines of Azure Resource Manager type only.", + "AFC_NoGenericVMResources": "No machine exists under resource group: '{0}' for copy.", + "AFC_FilteringNoVMResources": "No machine exists under resource group: '{0}' with the following {1} '{2}'.", + "AFC_CopyStarted": "Copy started for machine: '{0}'", + "AFC_CopyCompleted": "Copy status for machine '{0}' : '{1}'", + "AFC_WinRMHelpMessage": "To fix WinRM service connection related issues, select the 'Enable Copy Prerequisites' option in the task. If set already, and the target Virtual Machines are backed by a Load balancer, ensure Inbound NAT rules are configured for target port (5986). Applicable only for ARM VMs.", + "AFC_CopyFailed": "Copy failed on machine '{0}'. Refer logs for more details.", + "AFC_ParallelCopyFailed": "Copy to one or more machines failed. Refer logs for more details.", + "AFC_CopySuccessful": "Copied files from source path: '{0}' to target azure VMs in resource group: '{1}' successfully", + "AFC_SetCustomScriptExtensionFailed": "Setting the custom script extension '{0}' for virtual machine '{1}' failed with error : {2}", + "AFC_AddNetworkSecurityRuleFailed": "Failed to add the network security rule: {0}", + "AFC_UnableToSetCustomScriptExtension": "Unable to set the custom script extension '{0}' for virtual machine '{1}': {2}", + "AFC_CopyPrereqsFailed": "Failed to enable copy prerequisites. {0}", + "AFC_BlobStorageNotFound": "Storage account: {0} not found. Please specify existing storage account", + "AFC_RootContainerAndDirectory": "'/S' option is not valid for $root containers.", + "AFC_RedirectResponseInvalidStatusCode": "The HTTP response code: '{0}' is not a valid redirect status code", + "AFC_RedirectResponseLocationHeaderIsNull": "Redirect response location header is null.", + "AFC_AzCopyBlobUploadNonZeroExitCode": "AzCopy.exe exited with non-zero exit code while uploading files to blob storage.", + "AFC_PreexecutionJob_UnableToGetStorageKey": "Unable to fetch storage account key. Error: '{0}'", + "AFC_UninstallWinRMCustomScriptExtension": "Uninstall WinRM custom script manually and retry deployment.", + "ExpiredServicePrincipal": "Could not fetch access token for Azure. Verify if the Service Principal used is valid and not expired.", + "UnsupportedAuthScheme": "Unsupported authentication scheme '{0}' for endpoint.", + "ServicePrincipalError": "There was an error with the service principal used for the deployment.", + "AzModuleNotFound": "Could not find the modules: 'Az.Accounts'. If the module was recently installed, retry after restarting the Azure Pipelines task agent." + } +} \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/task.loc.json b/Tasks/AzureFileCopyV6/task.loc.json new file mode 100644 index 000000000000..4bbfe4c9ad48 --- /dev/null +++ b/Tasks/AzureFileCopyV6/task.loc.json @@ -0,0 +1,290 @@ +{ + "id": "EB72CB01-A7E5-427B-A8A1-1B31CCAC8A43", + "name": "AzureFileCopy", + "friendlyName": "ms-resource:loc.friendlyName", + "description": "ms-resource:loc.description", + "helpUrl": "https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/azure-file-copy", + "helpMarkDown": "ms-resource:loc.helpMarkDown", + "category": "Deploy", + "visibility": [ + "Build", + "Release" + ], + "author": "Microsoft Corporation", + "version": { + "Major": 6, + "Minor": 237, + "Patch": 0 + }, + "demands": [ + "azureps" + ], + "releaseNotes": "ms-resource:loc.releaseNotes", + "minimumAgentVersion": "1.103.0", + "inputs": [ + { + "name": "SourcePath", + "type": "filePath", + "label": "ms-resource:loc.input.label.SourcePath", + "defaultValue": "", + "required": true, + "helpMarkDown": "ms-resource:loc.input.help.SourcePath" + }, + { + "name": "ConnectedServiceNameARM", + "aliases": [ + "azureSubscription" + ], + "type": "connectedService:AzureRM", + "label": "ms-resource:loc.input.label.ConnectedServiceNameARM", + "defaultValue": "", + "required": true, + "helpMarkDown": "ms-resource:loc.input.help.ConnectedServiceNameARM" + }, + { + "name": "Destination", + "type": "pickList", + "label": "ms-resource:loc.input.label.Destination", + "defaultValue": "", + "required": true, + "options": { + "AzureBlob": "Azure Blob", + "AzureVMs": "Azure VMs" + }, + "helpMarkDown": "ms-resource:loc.input.help.Destination" + }, + { + "name": "StorageAccountRM", + "aliases": [ + "storage" + ], + "type": "pickList", + "label": "ms-resource:loc.input.label.StorageAccountRM", + "defaultValue": "", + "required": true, + "helpMarkDown": "ms-resource:loc.input.help.StorageAccountRM", + "properties": { + "EditableOptions": "True" + } + }, + { + "name": "ContainerName", + "type": "string", + "label": "ms-resource:loc.input.label.ContainerName", + "defaultValue": "", + "required": true, + "helpMarkDown": "ms-resource:loc.input.help.ContainerName", + "visibleRule": "Destination = AzureBlob" + }, + { + "name": "BlobPrefix", + "type": "string", + "label": "ms-resource:loc.input.label.BlobPrefix", + "defaultValue": "", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.BlobPrefix", + "visibleRule": "Destination = AzureBlob" + }, + { + "name": "EnvironmentNameRM", + "aliases": [ + "resourceGroup" + ], + "type": "pickList", + "label": "ms-resource:loc.input.label.EnvironmentNameRM", + "defaultValue": "", + "required": true, + "helpMarkDown": "ms-resource:loc.input.help.EnvironmentNameRM", + "properties": { + "EditableOptions": "True" + }, + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "ResourceFilteringMethod", + "type": "radio", + "label": "ms-resource:loc.input.label.ResourceFilteringMethod", + "required": false, + "defaultValue": "machineNames", + "options": { + "machineNames": "Machine Names", + "tags": "Tags" + }, + "helpMarkDown": "ms-resource:loc.input.help.ResourceFilteringMethod", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "MachineNames", + "type": "string", + "label": "ms-resource:loc.input.label.MachineNames", + "defaultValue": "", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.MachineNames", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "vmsAdminUserName", + "type": "string", + "label": "ms-resource:loc.input.label.vmsAdminUserName", + "defaultValue": "", + "required": true, + "helpMarkDown": "ms-resource:loc.input.help.vmsAdminUserName", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "vmsAdminPassword", + "type": "string", + "label": "ms-resource:loc.input.label.vmsAdminPassword", + "defaultValue": "", + "required": true, + "helpMarkDown": "ms-resource:loc.input.help.vmsAdminPassword", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "TargetPath", + "type": "string", + "label": "ms-resource:loc.input.label.TargetPath", + "defaultValue": "", + "required": true, + "helpMarkDown": "ms-resource:loc.input.help.TargetPath", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "AdditionalArgumentsForBlobCopy", + "type": "multiLine", + "label": "ms-resource:loc.input.label.AdditionalArgumentsForBlobCopy", + "required": false, + "defaultValue": "", + "helpMarkDown": "ms-resource:loc.input.help.AdditionalArgumentsForBlobCopy" + }, + { + "name": "AdditionalArgumentsForVMCopy", + "type": "multiLine", + "label": "ms-resource:loc.input.label.AdditionalArgumentsForVMCopy", + "required": false, + "defaultValue": "", + "helpMarkDown": "ms-resource:loc.input.help.AdditionalArgumentsForVMCopy", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "enableCopyPrerequisites", + "type": "boolean", + "label": "ms-resource:loc.input.label.enableCopyPrerequisites", + "defaultValue": "false", + "visibleRule": "Destination = AzureVMs", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.enableCopyPrerequisites" + }, + { + "name": "CopyFilesInParallel", + "type": "boolean", + "label": "ms-resource:loc.input.label.CopyFilesInParallel", + "defaultValue": "true", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.CopyFilesInParallel", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "CleanTargetBeforeCopy", + "type": "boolean", + "label": "ms-resource:loc.input.label.CleanTargetBeforeCopy", + "defaultValue": "false", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.CleanTargetBeforeCopy" + }, + { + "name": "skipCACheck", + "type": "boolean", + "label": "ms-resource:loc.input.label.skipCACheck", + "defaultValue": "true", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.skipCACheck", + "visibleRule": "Destination = AzureVMs" + } + ], + "outputVariables": [ + { + "name": "StorageContainerUri", + "description": "Uri of the container where the files were copied to. Valid only when the selected destination is Azure Blob." + } + ], + "dataSourceBindings": [ + { + "target": "StorageAccountRM", + "endpointId": "$(ConnectedServiceNameARM)", + "dataSourceName": "AzureStorageAccountRM" + }, + { + "target": "EnvironmentNameRM", + "endpointId": "$(ConnectedServiceNameARM)", + "dataSourceName": "AzureVirtualMachinesV2Id", + "resultTemplate": "{\"Value\":\"{{{ #extractResource resourceGroups}}}\",\"DisplayValue\":\"{{{ #extractResource resourceGroups}}}\"}" + } + ], + "instanceNameFormat": "ms-resource:loc.instanceNameFormat", + "prejobexecution": { + "Node10": { + "target": "PreJobExecutionAzureFileCopy.js" + }, + "Node16": { + "target": "PreJobExecutionAzureFileCopy.js", + "argumentFormat": "" + } + }, + "execution": { + "PowerShell3": { + "target": "AzureFileCopy.ps1" + } + }, + "messages": { + "AFC_StorageAccountNotFound": "ms-resource:loc.messages.AFC_StorageAccountNotFound", + "AFC_ResourceGroupNotFound": "ms-resource:loc.messages.AFC_ResourceGroupNotFound", + "AFC_GetVMStatus": "ms-resource:loc.messages.AFC_GetVMStatus", + "AFC_GetVMStatusComplete": "ms-resource:loc.messages.AFC_GetVMStatusComplete", + "AFC_GetCustomScriptExtension": "ms-resource:loc.messages.AFC_GetCustomScriptExtension", + "AFC_GetCustomScriptExtensionComplete": "ms-resource:loc.messages.AFC_GetCustomScriptExtensionComplete", + "AFC_SetCustomScriptExtension": "ms-resource:loc.messages.AFC_SetCustomScriptExtension", + "AFC_SetCustomScriptExtensionComplete": "ms-resource:loc.messages.AFC_SetCustomScriptExtensionComplete", + "AFC_RemoveCustomScriptExtension": "ms-resource:loc.messages.AFC_RemoveCustomScriptExtension", + "AFC_RemoveCustomScriptExtensionComplete": "ms-resource:loc.messages.AFC_RemoveCustomScriptExtensionComplete", + "AFC_NoNetworkInterface": "ms-resource:loc.messages.AFC_NoNetworkInterface", + "AFC_NullOrEmptyResourceGroup": "ms-resource:loc.messages.AFC_NullOrEmptyResourceGroup", + "AFC_AzurePSNotInstalled": "ms-resource:loc.messages.AFC_AzurePSNotInstalled", + "AFC_ClassicStorageAccountNotFound": "ms-resource:loc.messages.AFC_ClassicStorageAccountNotFound", + "AFC_GenericStorageAccountNotFound": "ms-resource:loc.messages.AFC_GenericStorageAccountNotFound", + "AFC_AzureFileCopyMoreHelp": "ms-resource:loc.messages.AFC_AzureFileCopyMoreHelp", + "AFC_UploadFilesStorageAccount": "ms-resource:loc.messages.AFC_UploadFilesStorageAccount", + "AFC_UploadContainerStorageAccount": "ms-resource:loc.messages.AFC_UploadContainerStorageAccount", + "AFC_UploadFileSuccessful": "ms-resource:loc.messages.AFC_UploadFileSuccessful", + "AFC_IncorrectTags": "ms-resource:loc.messages.AFC_IncorrectTags", + "AFC_MachineDoesNotExist": "ms-resource:loc.messages.AFC_MachineDoesNotExist", + "AFC_MachineNameFromIdErrorAllResources": "ms-resource:loc.messages.AFC_MachineNameFromIdErrorAllResources", + "AFC_MachineNameFromIdError": "ms-resource:loc.messages.AFC_MachineNameFromIdError", + "AFC_ResourceGroupNotFoundForSelectedConnection": "ms-resource:loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection", + "AFC_NoClassicVMResources": "ms-resource:loc.messages.AFC_NoClassicVMResources", + "AFC_NoARMVMResources": "ms-resource:loc.messages.AFC_NoARMVMResources", + "AFC_NoGenericVMResources": "ms-resource:loc.messages.AFC_NoGenericVMResources", + "AFC_FilteringNoVMResources": "ms-resource:loc.messages.AFC_FilteringNoVMResources", + "AFC_CopyStarted": "ms-resource:loc.messages.AFC_CopyStarted", + "AFC_CopyCompleted": "ms-resource:loc.messages.AFC_CopyCompleted", + "AFC_WinRMHelpMessage": "ms-resource:loc.messages.AFC_WinRMHelpMessage", + "AFC_CopyFailed": "ms-resource:loc.messages.AFC_CopyFailed", + "AFC_ParallelCopyFailed": "ms-resource:loc.messages.AFC_ParallelCopyFailed", + "AFC_CopySuccessful": "ms-resource:loc.messages.AFC_CopySuccessful", + "AFC_SetCustomScriptExtensionFailed": "ms-resource:loc.messages.AFC_SetCustomScriptExtensionFailed", + "AFC_AddNetworkSecurityRuleFailed": "ms-resource:loc.messages.AFC_AddNetworkSecurityRuleFailed", + "AFC_UnableToSetCustomScriptExtension": "ms-resource:loc.messages.AFC_UnableToSetCustomScriptExtension", + "AFC_CopyPrereqsFailed": "ms-resource:loc.messages.AFC_CopyPrereqsFailed", + "AFC_BlobStorageNotFound": "ms-resource:loc.messages.AFC_BlobStorageNotFound", + "AFC_RootContainerAndDirectory": "ms-resource:loc.messages.AFC_RootContainerAndDirectory", + "AFC_RedirectResponseInvalidStatusCode": "ms-resource:loc.messages.AFC_RedirectResponseInvalidStatusCode", + "AFC_RedirectResponseLocationHeaderIsNull": "ms-resource:loc.messages.AFC_RedirectResponseLocationHeaderIsNull", + "AFC_AzCopyBlobUploadNonZeroExitCode": "ms-resource:loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode", + "AFC_PreexecutionJob_UnableToGetStorageKey": "ms-resource:loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey", + "AFC_UninstallWinRMCustomScriptExtension": "ms-resource:loc.messages.AFC_UninstallWinRMCustomScriptExtension", + "ExpiredServicePrincipal": "ms-resource:loc.messages.ExpiredServicePrincipal", + "UnsupportedAuthScheme": "ms-resource:loc.messages.UnsupportedAuthScheme", + "ServicePrincipalError": "ms-resource:loc.messages.ServicePrincipalError", + "AzModuleNotFound": "ms-resource:loc.messages.AzModuleNotFound" + } +} \ No newline at end of file diff --git a/Tasks/AzureFileCopyV6/tsconfig.json b/Tasks/AzureFileCopyV6/tsconfig.json new file mode 100644 index 000000000000..0cd3f3f78ed5 --- /dev/null +++ b/Tasks/AzureFileCopyV6/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "target": "ES6", + "module": "commonjs", + "skipLibCheck": true + }, + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6.versionmap.txt b/_generated/AzureFileCopyV6.versionmap.txt new file mode 100644 index 000000000000..f5802cc78269 --- /dev/null +++ b/_generated/AzureFileCopyV6.versionmap.txt @@ -0,0 +1,2 @@ +Default|6.237.0 +Node20_229_2|6.237.1 diff --git a/_generated/AzureFileCopyV6_Node20/.npmrc b/_generated/AzureFileCopyV6_Node20/.npmrc new file mode 100644 index 000000000000..5fca0d518be7 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/.npmrc @@ -0,0 +1 @@ +scripts-prepend-node-path=true diff --git a/_generated/AzureFileCopyV6_Node20/AzureFileCopy.ps1 b/_generated/AzureFileCopyV6_Node20/AzureFileCopy.ps1 new file mode 100644 index 000000000000..49ac79808d9d --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/AzureFileCopy.ps1 @@ -0,0 +1,257 @@ +[CmdletBinding()] +param() + +Trace-VstsEnteringInvocation $MyInvocation + +# Get inputs for the task +$sourcePath = Get-VstsInput -Name SourcePath -Require +$destination = Get-VstsInput -Name Destination -Require +$connectedServiceName = Get-VstsInput -Name ConnectedServiceNameARM -Require +$storageAccount = Get-VstsInput -Name StorageAccountRM +$containerName = Get-VstsInput -Name ContainerName +$blobPrefix = Get-VstsInput -Name BlobPrefix +$environmentName = Get-VstsInput -Name EnvironmentNameRM +$resourceFilteringMethod = Get-VstsInput -Name ResourceFilteringMethod +$machineNames = Get-VstsInput -Name MachineNames +$vmsAdminUserName = Get-VstsInput -Name VmsAdminUsername +$vmsAdminPassword = Get-VstsInput -Name VmsAdminPassword +$targetPath = Get-VstsInput -Name TargetPath +$additionalArgumentsForBlobCopy = Get-VstsInput -Name AdditionalArgumentsForBlobCopy +$additionalArgumentsForVMCopy = Get-VstsInput -Name AdditionalArgumentsForVMCopy +$cleanTargetBeforeCopy = Get-VstsInput -Name CleanTargetBeforeCopy -AsBool +$copyFilesInParallel = Get-VstsInput -Name CopyFilesInParallel -AsBool +$skipCACheck = Get-VstsInput -Name SkipCACheck -AsBool +$enableCopyPrerequisites = Get-VstsInput -Name EnableCopyPrerequisites -AsBool + +if ($destination -ne "AzureBlob") { + $blobPrefix = "" +} + +# Constants +$useHttpsProtocolOption = '' +$ErrorActionPreference = 'Stop' +$telemetrySet = $false +$isPremiumStorage = $false + +$sourcePath = $sourcePath.Trim('"') +$storageAccount = $storageAccount.Trim() +$containerName = $containerName.Trim().ToLower() + +$additionalArgumentsForBlobCopy = $additionalArgumentsForBlobCopy.Trim() +$additionalArgumentsForVMCopy = $additionalArgumentsForVMCopy.Trim() +$useDefaultArgumentsForBlobCopy = ($additionalArgumentsForBlobCopy -eq "") + +# azcopy location on automation agent +$azCopyExeLocation = 'AzCopy\AzCopy.exe' +$azCopyLocation = [System.IO.Path]::GetDirectoryName($azCopyExeLocation) + +# Import RemoteDeployer +Import-Module $PSScriptRoot\ps_modules\RemoteDeployer + +# Initialize Azure. +Import-Module $PSScriptRoot\ps_modules\VstsAzureHelpers_ + +$endpoint = Get-VstsEndpoint -Name $connectedServiceName -Require + +# Update PSModulePath for hosted agent +. "$PSScriptRoot\Utility.ps1" + +CleanUp-PSModulePathForHostedAgent + +$vstsEndpoint = Get-VstsEndpoint -Name SystemVssConnection -Require +$vstsAccessToken = $vstsEndpoint.auth.parameters.AccessToken + +if (Get-Module Az.Accounts -ListAvailable) { + $encryptedToken = ConvertTo-SecureString $vstsAccessToken -AsPlainText -Force + Initialize-AzModule -Endpoint $endpoint -connectedServiceNameARM $connectedServiceName -encryptedToken $encryptedToken +} +else { + Write-Verbose "No module found with name: Az.Accounts" + throw ("Could not find the module Az.Accounts with given version. If the module was recently installed, retry after restarting the Azure Pipelines task agent.") +} + +# Import the loc strings. +Import-VstsLocStrings -LiteralPath $PSScriptRoot/Task.json + +# Load all dependent files for execution +. "$PSScriptRoot\AzureFileCopyRemoteJob.ps1" + +# Enabling detailed logging only when system.debug is true +$enableDetailedLogging = ($env:system_debug -eq "true") + +# Telemetry +Import-Module $PSScriptRoot\ps_modules\TelemetryHelper + +# Sanitizer +Import-Module $PSScriptRoot\ps_modules\Sanitizer +$useSanitizerCall = Get-SanitizerCallStatus +$useSanitizerActivate = Get-SanitizerActivateStatus + +if ($useSanitizerCall) { + $sanitizedArgumentsForBlobCopy = Protect-ScriptArguments -InputArgs $additionalArgumentsForBlobCopy -TaskName "AzureFileCopyV5" + $sanitizedArgumentsForVMCopy = Protect-ScriptArguments -InputArgs $additionalArgumentsForVMCopy -TaskName "AzureFileCopyV5" +} + +if ($useSanitizerActivate) { + $additionalArgumentsForBlobCopy = $sanitizedArgumentsForBlobCopy -join " " + $additionalArgumentsForVMCopy = $sanitizedArgumentsForVMCopy -join " " +} + +#### MAIN EXECUTION OF AZURE FILE COPY TASK BEGINS HERE #### +try { + try { + # Importing required version of azure cmdlets according to azureps installed on machine + $azureUtility = Get-AzureUtility + + Write-Verbose -Verbose "Loading $azureUtility" + . "$PSScriptRoot/$azureUtility" + + # Telemetry for endpoint id + $telemetryJsonContent = "{`"endpointId`":`"$connectedServiceName`"}" + Write-Host "##vso[telemetry.publish area=TaskEndpointId;feature=AzureFileCopy]$telemetryJsonContent" + + + # creating storage context to be used while creating container, deleting container + $storageContext = Create-AzureStorageContextWithConnectedAcc -StorageAccountName $storageAccount + + # Geting Azure Storage Account type + $storageAccountType = Get-StorageAccountType $storageAccount $endpoint $connectedServiceName $vstsAccessToken + Write-Verbose "Obtained Storage Account type: $storageAccountType" + if (-not [string]::IsNullOrEmpty($storageAccountType) -and $storageAccountType.Contains('Premium')) { + $isPremiumStorage = $true + } + + # creating temporary container for uploading files if no input is provided for container name + if ([string]::IsNullOrEmpty($containerName) -or ($destination -ne "AzureBlob")) { + $containerName = [guid]::NewGuid().ToString() + Write-Verbose "Container Name input not found. Creating Temporary container for uploading files." + Create-AzureContainer -containerName $containerName -storageContext $storageContext + } + else { + #checking if the containerName provided exist or not + $containerPresent = Get-AzureContainer -containerName $containerName -storageContext $storageContext + + #creating container if the containerName provided does not exist + if ($null -eq $containerPresent) { + Write-Verbose "Creating container if the containerName provided does not exist" + Create-AzureContainer -containerName $containerName -storageContext $storageContext + } + } + + + # Getting Azure Blob Storage Endpoint + $blobStorageEndpoint = Get-blobStorageEndpoint -storageAccountName $storageAccount -endpoint $endpoint -vstsAccessToken $vstsAccessToken + + # Setting environment variable for tracking Azure Pipelines usage in AzCopy telemetry + $env:AZCOPY_USER_AGENT_PREFIX = "TFS_useragent" + } + catch { + Write-Verbose $_.Exception.ToString() + Write-Telemetry "Task_InternalError" "TemporaryCopyingToBlobContainerFailed" + throw + } + + # Set optional arguments for azcopy blob upload + if ($useDefaultArgumentsForBlobCopy) { + # Adding default optional arguments: + # log-level: Defines the log verbosity for the log file. Default is INFO(all requests/responses) + + Write-Verbose "Using default AzCopy arguments for uploading to blob storage" + + $additionalArgumentsForBlobCopy = "--log-level=INFO" + + # Add more arguments if required + + # Premium storage accounts only support page blobs + if ($isPremiumStorage) { + Write-Verbose "Setting BlobType to page for Premium Storage account." + $additionalArgumentsForBlobCopy += " --blob-type=PageBlob" + } + + # $root container does not support sub folders. So excluding recursive copy option for $root container. + if ($containerName -ne '$root') { + Write-Verbose "Adding argument for recursive copy" + $additionalArgumentsForBlobCopy += " --recursive" + } + } + + Check-ContainerNameAndArgs -containerName $containerName -additionalArguments $additionalArgumentsForBlobCopy + + # Uploading files to container + Upload-FilesToAzureContainer -sourcePath $sourcePath ` + -endPoint $endpoint ` + -storageAccountName $storageAccount ` + -containerName $containerName ` + -blobPrefix $blobPrefix ` + -blobStorageEndpoint $blobStorageEndpoint ` + -azCopyLocation $azCopyLocation ` + -additionalArguments $additionalArgumentsForBlobCopy ` + -destinationType $destination ` + -useDefaultArguments $useDefaultArgumentsForBlobCopy ` + -cleanTargetBeforeCopy $cleanTargetBeforeCopy ` + -useSanitizerActivate $useSanitizerActivate + + # Complete the task if destination is azure blob + if ($destination -eq "AzureBlob") { + # Get URI for output variable + $storageAccountContainerURI = $storageContext.BlobEndPoint + $containerName + "/" + Write-Host "##vso[task.setvariable variable=StorageContainerUri]$storageAccountContainerURI" + + Remove-EndpointSecrets + Write-Verbose "Completed Azure File Copy Task for Azure Blob Destination" + + return + } + + # Copying files to Azure VMs + try { + # Normalize admin username + if ($vmsAdminUserName -and (-not $vmsAdminUserName.StartsWith(".\")) -and ($vmsAdminUserName.IndexOf("\") -eq -1) -and ($vmsAdminUserName.IndexOf("@") -eq -1)) { + $vmsAdminUserName = ".\" + $vmsAdminUserName + } + # getting azure vms properties(name, fqdn, winrmhttps port) + $azureVMResourcesProperties = Get-AzureVMResourcesProperties -resourceGroupName $environmentName ` + -resourceFilteringMethod $resourceFilteringMethod -machineNames $machineNames -enableCopyPrerequisites $enableCopyPrerequisites ` + -connectedServiceName $connectedServiceName -vstsAccessToken $vstsAccessToken + + $azureVMsCredentials = Get-AzureVMsCredentials -vmsAdminUserName $vmsAdminUserName -vmsAdminPassword $vmsAdminPassword + + # Get Invoke-RemoteScript parameters + $invokeRemoteScriptParams = Get-InvokeRemoteScriptParameters -azureVMResourcesProperties $azureVMResourcesProperties ` + -networkCredentials $azureVMsCredentials ` + -skipCACheck $skipCACheck + + # Copies files on azureVMs + Copy-FilesToAzureVMsFromStorageContainer -targetMachineNames $invokeRemoteScriptParams.targetMachineNames ` + -credential $invokeRemoteScriptParams.credential ` + -protocol $invokeRemoteScriptParams.protocol ` + -sessionOption $invokeRemoteScriptParams.sessionOption ` + -blobStorageEndpoint $blobStorageEndpoint ` + -containerName $containerName ` + -targetPath $targetPath ` + -cleanTargetBeforeCopy $cleanTargetBeforeCopy ` + -copyFilesInParallel $copyFilesInParallel ` + -additionalArguments $additionalArgumentsForVMCopy ` + -azCopyToolLocation $azCopyLocation ` + -fileCopyJobScript $AzureFileCopyRemoteJob ` + -enableDetailedLogging $enableDetailedLogging ` + -useSanitizerActivate $useSanitizerActivate + + Write-Output (Get-VstsLocString -Key "AFC_CopySuccessful" -ArgumentList $sourcePath, $environmentName) + } + catch { + Write-Verbose $_.Exception.ToString() + + Write-Telemetry "Task_InternalError" "CopyingToAzureVMFailed" + throw + } + finally { + Remove-AzureContainer -containerName $containerName -storageContext $storageContext + Remove-EndpointSecrets + Write-Verbose "Completed Azure File Copy Task for Azure VMs Destination" -Verbose + Trace-VstsLeavingInvocation $MyInvocation + } +} +finally { + Disconnect-AzureAndClearContext -authScheme $endpoint.Auth.Scheme -ErrorAction SilentlyContinue +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/AzureFileCopyRemoteJob.ps1 b/_generated/AzureFileCopyV6_Node20/AzureFileCopyRemoteJob.ps1 new file mode 100644 index 000000000000..06a529b070f3 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/AzureFileCopyRemoteJob.ps1 @@ -0,0 +1,117 @@ +$AzureFileCopyRemoteJob = { + param( + [string]$containerURL, + [string]$targetPath, + [string]$containerSasToken, + [string]$additionalArguments, + [switch]$CleanTargetBeforeCopy, + [switch]$EnableDetailedLogging, + [switch]$useSanitizerActivate + ) + + function Write-DetailLogs + { + [CmdletBinding()] + param( + [string]$message + ) + + if($EnableDetailedLogging) + { + Write-Verbose $message + } + } + + try + { + $useDefaultArguments = ($additionalArguments -eq "") + + # Argument to check whether azcopy.exe needs to be downloaded on VM or it is already present on VM + $shouldDownload = $false + + if($CleanTargetBeforeCopy) + { + if (Test-Path $targetPath -PathType Container) + { + Get-ChildItem -Path $targetPath -Recurse -Force | Remove-Item -Force -Recurse + Write-DetailLogs "Destination location cleaned" + } + else + { + Write-DetailLogs "Folder at path $targetPath not found for cleanup." + } + } + + try + { + $azCopyVersionCommand = azcopy --version + $azCopyVersion = $azCopyVersionCommand.split(' ')[2] + if([version]$azCopyVersion -lt [version]"10.12.2") + { + $shouldDownload = $true + } + } + catch + { + $shouldDownload = $true + } + + if($shouldDownload) + { + try + { + $azCopyFolderName = "ADO_AzCopyV10" + $azCopyFolderPath = Join-Path -Path $env:systemdrive -ChildPath $azCopyFolderName + + New-Item -ItemType Directory -Force -Path $azCopyFolderPath + $azCopyZipPath = Join-Path -Path $azCopyFolderPath -ChildPath "AzCopy.zip" + + # Downloading AzCopy from URL and copying it in $azcopyZipPath + $webclient = New-Object System.Net.WebClient + $webclient.DownloadFile('https://vstsagenttools.blob.core.windows.net/tools/azcopy/10.12/AzCopy.zip',$azCopyZipPath) + + #Unzipping the azcopy zip to $azcopyFolderPath + Expand-Archive $azCopyZipPath -DestinationPath $azCopyFolderPath -Force + + $azCopyFolderEnvPath = Join-Path -Path $azCopyFolderPath -ChildPath "AzCopy" + + #setting path at machine level so that when user again do copy on VM, there is no need to download the azcopy.exe again + [Environment]::SetEnvironmentVariable("Path", $azCopyFolderEnvPath + ';' + $env:Path, [System.EnvironmentVariableTarget]::Machine) + + #setting $env:Path at user level to include azcopy.exe path as the above command used do set the path at machine level and not at user level + $env:Path = $azCopyFolderEnvPath + ';' + $env:Path + } + catch + { + $exceptionMessage = $_.Exception.Message.ToString() + throw "Failed while downloading azcopy.exe from the URL with exception $exceptionMessage. Please download azcopy.exe 10.12.2 and set this extracted path in env:Path" + } + } + + if($useDefaultArguments) + { + # Adding default optional arguments: + # log-level: Defines the log verbosity for the log file. Default is INFO(all requests/responses) + # recursive: Recursive copy + + Write-DetailLogs "Using default AzCopy arguments for dowloading to VM" + $additionalArguments = "--recursive --log-level=INFO" + } + + if ($useSanitizerActivate) { + # Splitting arguments on space, but not on space inside quotes + $sanitizedArguments = [regex]::Split($additionalArguments, ' (?=(?:[^"]|"[^"]*")*$)') + Write-DetailLogs "##[command] & azcopy copy `"$containerURL*****`" `"$targetPath`" $sanitizedArguments" + & azcopy copy "$containerURL/*$containerSasToken" "$targetPath" $sanitizedArguments + } else { + Write-DetailLogs "##[command] & azcopy copy `"$containerURL*****`" `"$targetPath`" $additionalArguments" + $azCopyCommand = "& azcopy copy `"$containerURL/*$containerSasToken`" `"$targetPath`" $additionalArguments" + Invoke-Expression $azCopyCommand + } + } + catch + { + Write-Verbose "AzureFileCopyRemoteJob threw exception" + throw + } +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/AzureUtilityARM.ps1 b/_generated/AzureFileCopyV6_Node20/AzureUtilityARM.ps1 new file mode 100644 index 000000000000..6a0be6c25766 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/AzureUtilityARM.ps1 @@ -0,0 +1,525 @@ +# This file implements IAzureUtility for AzureRM PowerShell + +. "$PSScriptRoot/AzureUtilityRest.ps1" + +$featureFlags = @{ + retireAzureRM = [System.Convert]::ToBoolean($env:RETIRE_AZURERM_POWERSHELL_MODULE) +} + +function Get-AzureStorageAccountResourceGroupName +{ + param([string]$storageAccountName) + + $ARMStorageAccountResourceType = "Microsoft.Storage/storageAccounts" + if (-not [string]::IsNullOrEmpty($storageAccountName)) + { + Write-Verbose "[Azure Call]Getting resource details for azure storage account resource: $storageAccountName with resource type: $ARMStorageAccountResourceType" + if ($featureFlags.retireAzureRM) + { + $azureStorageAccountResourceDetails = Get-AzStorageAccount -ErrorAction Stop | Where-Object { $_.StorageAccountName -eq $storageAccountName } + } + else + { + $azureStorageAccountResourceDetails = Get-AzureRmStorageAccount -ErrorAction Stop | Where-Object { $_.StorageAccountName -eq $storageAccountName } + } + Write-Verbose "[Azure Call]Retrieved resource details successfully for azure storage account resource: $storageAccountName with resource type: $ARMStorageAccountResourceType" + + $azureResourceGroupName = $azureStorageAccountResourceDetails.ResourceGroupName + if ([string]::IsNullOrEmpty($azureResourceGroupName)) + { + Write-Verbose "(ARM)Storage account: $storageAccountName not found" + Write-Telemetry "Task_InternalError" "RMStorageAccountNotFound" + Throw (Get-VstsLocString -Key "AFC_StorageAccountNotFound" -ArgumentList $storageAccountName) + } + + return $azureResourceGroupName + } +} + +function Create-AzureStorageContext +{ + param([string]$storageAccountName, + [string]$storageAccountKey) + + if(-not [string]::IsNullOrEmpty($storageAccountName) -and -not [string]::IsNullOrEmpty($storageAccountKey)) + { + Write-Verbose "[Azure Call]Creating AzureStorageContext for storage account: $storageAccountName" + if ($featureFlags.retireAzureRM) + { + $storageContext = New-AzStorageContext -StorageAccountName $storageAccountName -StorageAccountKey $storageAccountKey -ErrorAction Stop + } + else + { + $storageContext = New-AzureStorageContext -StorageAccountName $storageAccountName -StorageAccountKey $storageAccountKey -ErrorAction Stop + } + Write-Verbose "[Azure Call]Created AzureStorageContext for storage account: $storageAccountName" + + return $storageContext + } +} + +# Create a context object using Azure AD credentials +function Create-AzureStorageContextWithConnectedAcc +{ + param([string]$storageAccountName) + + if(-not [string]::IsNullOrEmpty($storageAccountName)) + { + Write-Verbose "[Azure Call]Creating AzStorageContext for storage account: $storageAccountName" + $storageContext = New-AzStorageContext -StorageAccountName $storageAccountName -UseConnectedAccount -ErrorAction Stop + Write-Verbose "[Azure Call]Created AzStorageContext for storage account: $storageAccountName" + + return $storageContext + } +} + +function Create-AzureContainer +{ + param([string]$containerName, + [object]$storageContext) + + if(-not [string]::IsNullOrEmpty($containerName) -and $storageContext) + { + $storageAccountName = $storageContext.StorageAccountName + + Write-Verbose "[Azure Call]Creating container: $containerName in storage account: $storageAccountName" + if ($featureFlags.retireAzureRM) + { + $container = New-AzStorageContainer -Name $containerName -Context $storageContext -Permission Off -ErrorAction Stop + } + else + { + $container = New-AzureStorageContainer -Name $containerName -Context $storageContext -Permission Off -ErrorAction Stop + } + Write-Verbose "[Azure Call]Created container: $containerName successfully in storage account: $storageAccountName" + } +} + +function Get-AzureContainer +{ + param([string]$containerName, + [object]$storageContext) + + $container = $null + + if(-not [string]::IsNullOrEmpty($containerName) -and $storageContext) + { + $storageAccountName = $storageContext.StorageAccountName + + Write-Verbose "[Azure Call]Getting container: $containerName in storage account: $storageAccountName" + try + { + if ($featureFlags.retireAzureRM) + { + $container = Get-AzStorageContainer -Name $containerName -Context $storageContext -ErrorAction Stop + } + else + { + $container = Get-AzureStorageContainer -Name $containerName -Context $storageContext -ErrorAction Stop + } + } + catch + { + Write-Verbose "Container: $containerName does not exist in storage account: $storageAccountName" + } + } + + return $container +} + +function Remove-AzureContainer +{ + param([string]$containerName, + [object]$storageContext) + + if(-not [string]::IsNullOrEmpty($containerName) -and $storageContext) + { + $storageAccountName = $storageContext.StorageAccountName + + Write-Verbose "[Azure Call]Deleting container: $containerName in storage account: $storageAccountName" + if ($featureFlags.retireAzureRM) + { + Remove-AzStorageContainer -Name $containerName -Context $storageContext -Force -ErrorAction SilentlyContinue + } + else + { + Remove-AzureStorageContainer -Name $containerName -Context $storageContext -Force -ErrorAction SilentlyContinue + } + + Write-Verbose "[Azure Call]Deleted container: $containerName in storage account: $storageAccountName" + } +} + +function Get-AzureRMVMsInResourceGroup +{ + param([string]$resourceGroupName) + + If(-not [string]::IsNullOrEmpty($resourceGroupName)) + { + try + { + Write-Verbose "[Azure Call]Getting resource group:$resourceGroupName RM virtual machines type resources" + if ($featureFlags.retireAzureRM) + { + $azureRMVMResources = Get-AzVM -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + else + { + $azureRMVMResources = Get-AzureRMVM -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + Write-Verbose "[Azure Call]Count of resource group:$resourceGroupName RM virtual machines type resource is $($azureRMVMResources.Count)" + + return $azureRMVMResources + } + catch [Hyak.Common.CloudException], [Microsoft.Rest.Azure.CloudException] + { + $exceptionMessage = $_.Exception.Message.ToString() + Write-Verbose "ExceptionMessage: $exceptionMessage" + + Write-Telemetry "Task_InternalError" "ResourceGroupNotFound" + throw (Get-VstsLocString -Key "AFC_ResourceGroupNotFound" -ArgumentList $resourceGroupName) + } + } +} + +function Get-AzureRMResourceGroupResourcesDetails +{ + param([string]$resourceGroupName, + [object]$azureRMVMResources) + + [hashtable]$azureRGResourcesDetails = @{} + [hashtable]$loadBalancerDetails = @{} + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and $azureRMVMResources) + { + Write-Verbose "[Azure Call]Getting network interfaces in resource group $resourceGroupName" + if ($featureFlags.retireAzureRM) + { + $networkInterfaceResources = Get-AzNetworkInterface -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + else + { + $networkInterfaceResources = Get-AzureRMNetworkInterface -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + Write-Verbose "[Azure Call]Got network interfaces in resource group $resourceGroupName" + $azureRGResourcesDetails.Add("networkInterfaceResources", $networkInterfaceResources) + + Write-Verbose "[Azure Call]Getting public IP Addresses in resource group $resourceGroupName" + if ($featureFlags.retireAzureRM) + { + $publicIPAddressResources = Get-AzPublicIpAddress -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + else + { + $publicIPAddressResources = Get-AzureRMPublicIpAddress -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + Write-Verbose "[Azure Call]Got public IP Addresses in resource group $resourceGroupName" + $azureRGResourcesDetails.Add("publicIPAddressResources", $publicIPAddressResources) + + Write-Verbose "[Azure Call]Getting load balancers in resource group $resourceGroupName" + if ($featureFlags.retireAzureRM) + { + $lbGroup = Get-AzLoadBalancer -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + else + { + $lbGroup = Get-AzureRMLoadBalancer -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + Write-Verbose "[Azure Call]Got load balancers in resource group $resourceGroupName" + + if($lbGroup) + { + foreach($lb in $lbGroup) + { + $lbDetails = @{} + Write-Verbose "[Azure Call]Getting load balancer in resource group $resourceGroupName" + if ($featureFlags.retireAzureRM) + { + $loadBalancer = Get-AzLoadBalancer -Name $lb.Name -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + else + { + $loadBalancer = Get-AzureRMLoadBalancer -Name $lb.Name -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + } + Write-Verbose "[Azure Call]Got load balancer in resource group $resourceGroupName" + + Write-Verbose "[Azure Call]Getting LoadBalancer Frontend Ip Config" + if ($featureFlags.retireAzureRM) + { + $frontEndIPConfigs = Get-AzLoadBalancerFrontendIpConfig -LoadBalancer $loadBalancer -ErrorAction Stop -Verbose + } + else + { + $frontEndIPConfigs = Get-AzureRMLoadBalancerFrontendIpConfig -LoadBalancer $loadBalancer -ErrorAction Stop -Verbose + } + Write-Verbose "[Azure Call]Got LoadBalancer Frontend Ip Config" + + Write-Verbose "[Azure Call]Getting Azure LoadBalancer Inbound NatRule Config" + if ($featureFlags.retireAzureRM) + { + $inboundRules = Get-AzLoadBalancerInboundNatRuleConfig -LoadBalancer $loadBalancer -ErrorAction Stop -Verbose + } + else + { + $inboundRules = Get-AzureRMLoadBalancerInboundNatRuleConfig -LoadBalancer $loadBalancer -ErrorAction Stop -Verbose + } + Write-Verbose "[Azure Call]Got Azure LoadBalancer Inbound NatRule Config" + + $lbDetails.Add("frontEndIPConfigs", $frontEndIPConfigs) + $lbDetails.Add("inboundRules", $inboundRules) + $loadBalancerDetails.Add($lb.Name, $lbDetails) + } + + $azureRGResourcesDetails.Add("loadBalancerResources", $loadBalancerDetails) + } + } + + return $azureRGResourcesDetails +} + +function Generate-AzureStorageContainerSASToken +{ + param([string]$containerName, + [object]$storageContext, + [System.Int32]$tokenTimeOutInMinutes) + + if(-not [string]::IsNullOrEmpty($containerName) -and $storageContext) + { + $storageAccountName = $storageContext.StorageAccountName + + Write-Verbose "[Azure Call]Generating SasToken for container: $containerName in storage: $storageAccountName with expiry time: $tokenTimeOutInMinutes minutes" + if ($featureFlags.retireAzureRM) + { + $containerSasToken = New-AzStorageContainerSASToken -Name $containerName -ExpiryTime (Get-Date).AddMinutes($tokenTimeOutInMinutes) -Context $storageContext -Permission rwdl + } + else + { + $containerSasToken = New-AzureStorageContainerSASToken -Name $containerName -ExpiryTime (Get-Date).AddMinutes($tokenTimeOutInMinutes) -Context $storageContext -Permission rwdl + } + $containerSasToken = New-AzStorageContainerSASToken -Name $containerName -ExpiryTime (Get-Date).AddMinutes($tokenTimeOutInMinutes) -Context $storageContext -Permission rwdl + Write-Verbose "[Azure Call]Generated SasToken: $containerSasToken successfully for container: $containerName in storage: $storageAccountName" + + return $containerSasToken + } +} + +function Get-AzureMachineStatus +{ + param([string]$resourceGroupName, + [string]$name) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($name)) + { + Write-Host (Get-VstsLocString -Key "AFC_GetVMStatus" -ArgumentList $name) + if ($featureFlags.retireAzureRM) + { + $status = Get-AzVM -ResourceGroupName $resourceGroupName -Name $name -Status -ErrorAction Stop -Verbose + } + else + { + $status = Get-AzureRmVM -ResourceGroupName $resourceGroupName -Name $name -Status -ErrorAction Stop -Verbose + } + Write-Host (Get-VstsLocString -Key "AFC_GetVMStatusComplete" -ArgumentList $name) + } + + return $status +} + +function Set-AzureMachineCustomScriptExtension +{ + param([string]$resourceGroupName, + [string]$vmName, + [string]$name, + [string[]]$fileUri, + [string]$run, + [string]$argument, + [string]$location) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmName) -and -not [string]::IsNullOrEmpty($name)) + { + Write-Host (Get-VstsLocString -Key "AFC_SetCustomScriptExtension" -ArgumentList $name, $vmName) + Write-Verbose "Set-AzureRmVMCustomScriptExtension -ResourceGroupName $resourceGroupName -VMName $vmName -Name $name -FileUri $fileUri -Run $run -Argument $argument -Location $location -ErrorAction Stop -Verbose" + if ($featureFlags.retireAzureRM) + { + $result = Set-AzVMCustomScriptExtension -ResourceGroupName $resourceGroupName -VMName $vmName -Name $name -FileUri $fileUri -Run $run -Argument $argument -Location $location -ErrorAction Stop -Verbose + } + else + { + $result = Set-AzureRmVMCustomScriptExtension -ResourceGroupName $resourceGroupName -VMName $vmName -Name $name -FileUri $fileUri -Run $run -Argument $argument -Location $location -ErrorAction Stop -Verbose + } + Write-Host (Get-VstsLocString -Key "AFC_SetCustomScriptExtensionComplete" -ArgumentList $name, $vmName) + if($result.IsSuccessStatusCode -eq $true) + { + $responseJObject = [Newtonsoft.Json.Linq.JObject]::Parse(($result | ConvertTo-Json)) + $result = $responseJObject.ToObject([System.Collections.Hashtable]) + $result.Status = "Succeeded" + } + } + + return $result +} + +function Get-NetworkSecurityGroups +{ + param([string]$resourceGroupName, + [string]$vmId) + + $securityGroups = New-Object System.Collections.Generic.List[System.Object] + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmId)) + { + Write-Verbose "[Azure Call]Getting network interfaces in resource group $resourceGroupName for vm $vmId" + if ($featureFlags.retireAzureRM) + { + $networkInterfaces = Get-AzNetworkInterface -ResourceGroupName $resourceGroupName | Where-Object { $_.VirtualMachine.Id -eq $vmId } + } + else + { + $networkInterfaces = Get-AzureRmNetworkInterface -ResourceGroupName $resourceGroupName | Where-Object { $_.VirtualMachine.Id -eq $vmId } + } + Write-Verbose "[Azure Call]Got network interfaces in resource group $resourceGroupName" + + if($networkInterfaces) + { + $noOfNics = $networkInterfaces.Count + Write-Verbose "Number of network interface cards present in the vm: $noOfNics" + + foreach($networkInterface in $networkInterfaces) + { + $networkSecurityGroupEntry = $networkInterface.NetworkSecurityGroup + if($networkSecurityGroupEntry) + { + $nsId = $networkSecurityGroupEntry.Id + Write-Verbose "Network Security Group Id: $nsId" + + $securityGroupName = $nsId.Split('/')[-1] + $sgResourceGroup = $nsId.Split('/')[4] + Write-Verbose "Security Group name is $securityGroupName and the related resource group $sgResourceGroup" + + # Get the network security group object + Write-Verbose "[Azure Call]Getting network security group $securityGroupName in resource group $sgResourceGroup" + if ($featureFlags.retireAzureRM) + { + $securityGroup = Get-AzNetworkSecurityGroup -ResourceGroupName $sgResourceGroup -Name $securityGroupName + } + else + { + $securityGroup = Get-AzureRmNetworkSecurityGroup -ResourceGroupName $sgResourceGroup -Name $securityGroupName + } + Write-Verbose "[Azure Call]Got network security group $securityGroupName in resource group $sgResourceGroup" + + $securityGroups.Add($securityGroup) + } + } + } + else + { + throw (Get-VstsLocString -Key "AFC_NoNetworkInterface" -ArgumentList $vmid , $resourceGroupName) + } + } + else + { + throw (Get-VstsLocString -Key "AFC_NullOrEmptyResourceGroup") + } + + return $securityGroups +} + +function Add-NetworkSecurityRuleConfig +{ + param([string]$resourceGroupName, + [object]$securityGroups, + [string]$ruleName, + [string]$rulePriotity, + [string]$winrmHttpsPort) + + if($securityGroups.Count -gt 0) + { + foreach($securityGroup in $securityGroups) + { + $securityGroupName = $securityGroup.Name + try + { + $winRMConfigRule = $null + + Write-Verbose "[Azure Call]Getting network security rule config $ruleName under security group $securityGroupName" + if ($featureFlags.retireAzureRM) + { + $winRMConfigRule = Get-AzNetworkSecurityRuleConfig -NetworkSecurityGroup $securityGroup -Name $ruleName -EA SilentlyContinue + } + else + { + $winRMConfigRule = Get-AzureRmNetworkSecurityRuleConfig -NetworkSecurityGroup $securityGroup -Name $ruleName -EA SilentlyContinue + } + Write-Verbose "[Azure Call]Got network security rule config $ruleName under security group $securityGroupName" + } + catch + { + #Ignore the exception + } + + # Add the network security rule if it doesn't exists + if(-not $winRMConfigRule) + { + $maxRetries = 3 + for($retryCnt=1; $retryCnt -le $maxRetries; $retryCnt++) + { + try + { + Write-Verbose "[Azure Call]Adding inbound network security rule config $ruleName with priority $rulePriotity for port $winrmHttpsPort under security group $securityGroupName" + if ($featureFlags.retireAzureRM) + { + $securityGroup = Add-AzNetworkSecurityRuleConfig -NetworkSecurityGroup $securityGroup -Name $ruleName -Direction Inbound -Access Allow -SourceAddressPrefix '*' -SourcePortRange '*' -DestinationAddressPrefix '*' -DestinationPortRange $winrmHttpsPort -Protocol * -Priority $rulePriotity + } + else + { + $securityGroup = Add-AzureRmNetworkSecurityRuleConfig -NetworkSecurityGroup $securityGroup -Name $ruleName -Direction Inbound -Access Allow -SourceAddressPrefix '*' -SourcePortRange '*' -DestinationAddressPrefix '*' -DestinationPortRange $winrmHttpsPort -Protocol * -Priority $rulePriotity + } + Write-Verbose "[Azure Call]Added inbound network security rule config $ruleName with priority $rulePriotity for port $winrmHttpsPort under security group $securityGroupName" + + Write-Verbose "[Azure Call]Setting the azure network security group" + if ($featureFlags.retireAzureRM) + { + $result = Set-AzNetworkSecurityGroup -NetworkSecurityGroup $securityGroup + } + else + { + $result = Set-AzureRmNetworkSecurityGroup -NetworkSecurityGroup $securityGroup + } + Write-Verbose "[Azure Call]Set the azure network security group" + } + catch + { + Write-Verbose "Failed to add inbound network security rule config $ruleName with priority $rulePriotity for port $winrmHttpsPort under security group $securityGroupName : $_.Exception.Message" + + $newPort = [convert]::ToInt32($rulePriotity, 10) + 50; + $rulePriotity = $newPort.ToString() + + Write-Verbose "[Azure Call]Getting network security group $securityGroupName in resource group $resourceGroupName" + if ($featureFlags.retireAzureRM) + { + $securityGroup = Get-AzNetworkSecurityGroup -ResourceGroupName $resourceGroupName -Name $securityGroupName + } + else + { + $securityGroup = Get-AzureRmNetworkSecurityGroup -ResourceGroupName $resourceGroupName -Name $securityGroupName + } + Write-Verbose "[Azure Call]Got network security group $securityGroupName in resource group $resourceGroupName" + + + if($retryCnt -eq $maxRetries) + { + throw $_ + } + + continue + } + + Write-Verbose "Successfully added the network security group rule $ruleName with priority $rulePriotity for port $winrmHttpsPort" + break + } + } + } + } +} + diff --git a/_generated/AzureFileCopyV6_Node20/AzureUtilityAz1.0.ps1 b/_generated/AzureFileCopyV6_Node20/AzureUtilityAz1.0.ps1 new file mode 100644 index 000000000000..1200c55d451a --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/AzureUtilityAz1.0.ps1 @@ -0,0 +1,395 @@ +# This file implements IAzureUtility for Az PowerShell + +. "$PSScriptRoot/AzureUtilityRest.ps1" + +function Get-AzureStorageAccountResourceGroupName +{ + param([string]$storageAccountName) + + $ARMStorageAccountResourceType = "Microsoft.Storage/storageAccounts" + if (-not [string]::IsNullOrEmpty($storageAccountName)) + { + Write-Verbose "[Azure Call]Getting resource details for azure storage account resource: $storageAccountName with resource type: $ARMStorageAccountResourceType" + $azureStorageAccountResourceDetails = (Get-AzResource -ErrorAction Stop) | Where-Object { ($_.ResourceType -eq $ARMStorageAccountResourceType) -and ($_.Name -eq $storageAccountName)} + + Write-Verbose "[Azure Call]Retrieved resource details successfully for azure storage account resource: $storageAccountName with resource type: $ARMStorageAccountResourceType" + + $azureResourceGroupName = $azureStorageAccountResourceDetails.ResourceGroupName + if ([string]::IsNullOrEmpty($azureResourceGroupName)) + { + Write-Verbose "(ARM)Storage account: $storageAccountName not found" + Write-Telemetry "Task_InternalError" "RMStorageAccountNotFound" + Throw (Get-VstsLocString -Key "AFC_StorageAccountNotFound" -ArgumentList $storageAccountName) + } + + return $azureResourceGroupName + } +} + +function Create-AzureStorageContext +{ + param([string]$storageAccountName, + [string]$storageAccountKey) + + if(-not [string]::IsNullOrEmpty($storageAccountName) -and -not [string]::IsNullOrEmpty($storageAccountKey)) + { + Write-Verbose "[Azure Call]Creating AzStorageContext for storage account: $storageAccountName" + $storageContext = New-AzStorageContext -StorageAccountName $storageAccountName -StorageAccountKey $storageAccountKey -ErrorAction Stop + Write-Verbose "[Azure Call]Created AzStorageContext for storage account: $storageAccountName" + + return $storageContext + } +} + +# Create a context object using Azure AD credentials +function Create-AzureStorageContextWithConnectedAcc +{ + param([string]$storageAccountName) + + if(-not [string]::IsNullOrEmpty($storageAccountName)) + { + Write-Verbose "[Azure Call]Creating AzStorageContext for storage account: $storageAccountName" + $storageContext = New-AzStorageContext -StorageAccountName $storageAccountName -UseConnectedAccount -ErrorAction Stop + Write-Verbose "[Azure Call]Created AzStorageContext for storage account: $storageAccountName" + + return $storageContext + } +} + +function Create-AzureContainer +{ + param([string]$containerName, + [object]$storageContext) + + if(-not [string]::IsNullOrEmpty($containerName) -and $storageContext) + { + $storageAccountName = $storageContext.StorageAccountName + + Write-Verbose "[Azure Call]Creating container: $containerName in storage account: $storageAccountName" + $container = New-AzStorageContainer -Name $containerName -Context $storageContext -Permission Off -ErrorAction Stop + Write-Verbose "[Azure Call]Created container: $containerName successfully in storage account: $storageAccountName" + } +} + +function Get-AzureContainer +{ + param([string]$containerName, + [object]$storageContext) + + $container = $null + + if(-not [string]::IsNullOrEmpty($containerName) -and $storageContext) + { + $storageAccountName = $storageContext.StorageAccountName + + Write-Verbose "[Azure Call]Getting container: $containerName in storage account: $storageAccountName" + try + { + $container = Get-AzStorageContainer -Name $containerName -Context $storageContext -ErrorAction Stop + } + catch + { + Write-Verbose "Container: $containerName does not exist in storage account: $storageAccountName" + } + } + + return $container +} + +function Remove-AzureContainer +{ + param([string]$containerName, + [object]$storageContext) + + if(-not [string]::IsNullOrEmpty($containerName) -and $storageContext) + { + $storageAccountName = $storageContext.StorageAccountName + + Write-Verbose "[Azure Call]Deleting container: $containerName in storage account: $storageAccountName" + Remove-AzStorageContainer -Name $containerName -Context $storageContext -Force -ErrorAction SilentlyContinue + Write-Verbose "[Azure Call]Deleted container: $containerName in storage account: $storageAccountName" + } +} + +function Get-AzureRMVMsInResourceGroup +{ + param([string]$resourceGroupName) + + If(-not [string]::IsNullOrEmpty($resourceGroupName)) + { + try + { + Write-Verbose "[Azure Call]Getting resource group:$resourceGroupName RM virtual machines type resources" + $azureRMVMResources = Get-AzVM -ResourceGroupName $resourceGroupName -ErrorAction Stop -WarningAction SilentlyContinue -Verbose + Write-Verbose "[Azure Call]Count of resource group:$resourceGroupName RM virtual machines type resource is $($azureRMVMResources.Count)" + + return $azureRMVMResources + } + catch [Hyak.Common.CloudException], [Microsoft.Rest.Azure.CloudException] + { + $exceptionMessage = $_.Exception.Message.ToString() + Write-Verbose "ExceptionMessage: $exceptionMessage" + + Write-Telemetry "Task_InternalError" "ResourceGroupNotFound" + throw (Get-VstsLocString -Key "AFC_ResourceGroupNotFound" -ArgumentList $resourceGroupName) + } + } +} + +function Get-AzureRMResourceGroupResourcesDetails +{ + param([string]$resourceGroupName, + [object]$azureRMVMResources) + + [hashtable]$azureRGResourcesDetails = @{} + [hashtable]$loadBalancerDetails = @{} + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and $azureRMVMResources) + { + Write-Verbose "[Azure Call]Getting network interfaces in resource group $resourceGroupName" + $networkInterfaceResources = Get-AzNetworkInterface -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + Write-Verbose "[Azure Call]Got network interfaces in resource group $resourceGroupName" + $azureRGResourcesDetails.Add("networkInterfaceResources", $networkInterfaceResources) + + Write-Verbose "[Azure Call]Getting public IP Addresses in resource group $resourceGroupName" + $publicIPAddressResources = Get-AzPublicIpAddress -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + Write-Verbose "[Azure Call]Got public IP Addresses in resource group $resourceGroupName" + $azureRGResourcesDetails.Add("publicIPAddressResources", $publicIPAddressResources) + + Write-Verbose "[Azure Call]Getting load balancers in resource group $resourceGroupName" + $lbGroup = Get-AzLoadBalancer -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + Write-Verbose "[Azure Call]Got load balancers in resource group $resourceGroupName" + + if($lbGroup) + { + foreach($lb in $lbGroup) + { + $lbDetails = @{} + Write-Verbose "[Azure Call]Getting load balancer in resource group $resourceGroupName" + $loadBalancer = Get-AzLoadBalancer -Name $lb.Name -ResourceGroupName $resourceGroupName -ErrorAction Stop -Verbose + Write-Verbose "[Azure Call]Got load balancer in resource group $resourceGroupName" + + Write-Verbose "[Azure Call]Getting LoadBalancer Frontend Ip Config" + $frontEndIPConfigs = Get-AzLoadBalancerFrontendIpConfig -LoadBalancer $loadBalancer -ErrorAction Stop -Verbose + Write-Verbose "[Azure Call]Got LoadBalancer Frontend Ip Config" + + Write-Verbose "[Azure Call]Getting Azure LoadBalancer Inbound NatRule Config" + $inboundRules = Get-AzLoadBalancerInboundNatRuleConfig -LoadBalancer $loadBalancer -ErrorAction Stop -Verbose + Write-Verbose "[Azure Call]Got Azure LoadBalancer Inbound NatRule Config" + + $lbDetails.Add("frontEndIPConfigs", $frontEndIPConfigs) + $lbDetails.Add("inboundRules", $inboundRules) + $loadBalancerDetails.Add($lb.Name, $lbDetails) + } + + $azureRGResourcesDetails.Add("loadBalancerResources", $loadBalancerDetails) + } + } + + return $azureRGResourcesDetails +} + +function Generate-AzureStorageContainerSASToken +{ + param([string]$containerName, + [object]$storageContext, + [System.Int32]$tokenTimeOutInMinutes) + + if(-not [string]::IsNullOrEmpty($containerName) -and $storageContext) + { + $storageAccountName = $storageContext.StorageAccountName + + Write-Verbose "[Azure Call]Generating SasToken for container: $containerName in storage: $storageAccountName with expiry time: $tokenTimeOutInMinutes minutes" + $containerSasToken = New-AzStorageContainerSASToken -Name $containerName -ExpiryTime (Get-Date).AddMinutes($tokenTimeOutInMinutes) -Context $storageContext -Permission rwdl + Write-Verbose "[Azure Call]Generated SasToken: $containerSasToken successfully for container: $containerName in storage: $storageAccountName" + + return $containerSasToken + } +} + +function Get-AzureMachineStatus +{ + param([string]$resourceGroupName, + [string]$name) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($name)) + { + Write-Host (Get-VstsLocString -Key "AFC_GetVMStatus" -ArgumentList $name) + $status = Get-AzVM -ResourceGroupName $resourceGroupName -Name $name -Status -ErrorAction Stop -WarningAction SilentlyContinue -Verbose + Write-Host (Get-VstsLocString -Key "AFC_GetVMStatusComplete" -ArgumentList $name) + } + + return $status +} + +function Set-AzureMachineCustomScriptExtension +{ + param([string]$resourceGroupName, + [string]$vmName, + [string]$name, + [string[]]$fileUri, + [string]$run, + [string]$argument, + [string]$location) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmName) -and -not [string]::IsNullOrEmpty($name)) + { + Write-Host (Get-VstsLocString -Key "AFC_SetCustomScriptExtension" -ArgumentList $name, $vmName) + Write-Verbose "Set-AzVMCustomScriptExtension -ResourceGroupName $resourceGroupName -VMName $vmName -Name $name -FileUri $fileUri -Run $run -Argument $argument -Location $location -ErrorAction Stop -Verbose" + $result = Set-AzVMCustomScriptExtension -ResourceGroupName $resourceGroupName -VMName $vmName -Name $name -FileUri $fileUri -Run $run -Argument $argument -Location $location -ErrorAction Stop -Verbose + Write-Host (Get-VstsLocString -Key "AFC_SetCustomScriptExtensionComplete" -ArgumentList $name, $vmName) + if($result.IsSuccessStatusCode -eq $true) + { + $responseJObject = [Newtonsoft.Json.Linq.JObject]::Parse(($result | ConvertTo-Json)) + $result = $responseJObject.ToObject([System.Collections.Hashtable]) + $result.Status = "Succeeded" + } + } + + return $result +} + +function Get-NetworkSecurityGroups +{ + param([string]$resourceGroupName, + [string]$vmId) + + $securityGroups = New-Object System.Collections.Generic.List[System.Object] + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmId)) + { + Write-Verbose "[Azure Call]Getting network interfaces in resource group $resourceGroupName for vm $vmId" + $networkInterfaces = Get-AzNetworkInterface -ResourceGroupName $resourceGroupName | Where-Object { $_.VirtualMachine.Id -eq $vmId } + Write-Verbose "[Azure Call]Got network interfaces in resource group $resourceGroupName" + + if($networkInterfaces) + { + $noOfNics = $networkInterfaces.Count + Write-Verbose "Number of network interface cards present in the vm: $noOfNics" + + foreach($networkInterface in $networkInterfaces) + { + $networkSecurityGroupEntry = $networkInterface.NetworkSecurityGroup + if($networkSecurityGroupEntry) + { + $nsId = $networkSecurityGroupEntry.Id + Write-Verbose "Network Security Group Id: $nsId" + + $securityGroupName = $nsId.Split('/')[-1] + $sgResourceGroup = $nsId.Split('/')[4] + Write-Verbose "Security Group name is $securityGroupName and the related resource group $sgResourceGroup" + + # Get the network security group object + Write-Verbose "[Azure Call]Getting network security group $securityGroupName in resource group $sgResourceGroup" + $securityGroup = Get-AzNetworkSecurityGroup -ResourceGroupName $sgResourceGroup -Name $securityGroupName + Write-Verbose "[Azure Call]Got network security group $securityGroupName in resource group $sgResourceGroup" + + $securityGroups.Add($securityGroup) + } + } + } + else + { + throw (Get-VstsLocString -Key "AFC_NoNetworkInterface" -ArgumentList $vmid , $resourceGroupName) + } + } + else + { + throw (Get-VstsLocString -Key "AFC_NullOrEmptyResourceGroup") + } + + return $securityGroups +} + +function Add-NetworkSecurityRuleConfig +{ + param([string]$resourceGroupName, + [object]$securityGroups, + [string]$ruleName, + [string]$rulePriotity, + [string]$winrmHttpsPort) + + if($securityGroups.Count -gt 0) + { + foreach($securityGroup in $securityGroups) + { + $securityGroupName = $securityGroup.Name + try + { + $winRMConfigRule = $null + + Write-Verbose "[Azure Call]Getting network security rule config $ruleName under security group $securityGroupName" + $winRMConfigRule = Get-AzNetworkSecurityRuleConfig -NetworkSecurityGroup $securityGroup -Name $ruleName -EA SilentlyContinue + Write-Verbose "[Azure Call]Got network security rule config $ruleName under security group $securityGroupName" + } + catch + { + #Ignore the exception + } + + # Add the network security rule if it doesn't exists + if(-not $winRMConfigRule) + { + $maxRetries = 3 + for($retryCnt=1; $retryCnt -le $maxRetries; $retryCnt++) + { + try + { + Write-Verbose "[Azure Call]Adding inbound network security rule config $ruleName with priority $rulePriotity for port $winrmHttpsPort under security group $securityGroupName" + $securityGroup = Add-AzNetworkSecurityRuleConfig -NetworkSecurityGroup $securityGroup -Name $ruleName -Direction Inbound -Access Allow -SourceAddressPrefix '*' -SourcePortRange '*' -DestinationAddressPrefix '*' -DestinationPortRange $winrmHttpsPort -Protocol * -Priority $rulePriotity + Write-Verbose "[Azure Call]Added inbound network security rule config $ruleName with priority $rulePriotity for port $winrmHttpsPort under security group $securityGroupName" + + Write-Verbose "[Azure Call]Setting the azure network security group" + $result = Set-AzNetworkSecurityGroup -NetworkSecurityGroup $securityGroup + Write-Verbose "[Azure Call]Set the azure network security group" + } + catch + { + Write-Verbose "Failed to add inbound network security rule config $ruleName with priority $rulePriotity for port $winrmHttpsPort under security group $securityGroupName : $_.Exception.Message" + + $newPort = [convert]::ToInt32($rulePriotity, 10) + 50; + $rulePriotity = $newPort.ToString() + + Write-Verbose "[Azure Call]Getting network security group $securityGroupName in resource group $resourceGroupName" + $securityGroup = Get-AzNetworkSecurityGroup -ResourceGroupName $resourceGroupName -Name $securityGroupName + Write-Verbose "[Azure Call]Got network security group $securityGroupName in resource group $resourceGroupName" + + + if($retryCnt -eq $maxRetries) + { + throw $_ + } + + continue + } + + Write-Verbose "Successfully added the network security group rule $ruleName with priority $rulePriotity for port $winrmHttpsPort" + break + } + } + } + } +} + +function Import-AzModule +{ + param([string]$moduleName) + + if (!(Get-Module $moduleName)) + { + $module = Get-Module -Name $moduleName -ListAvailable | Sort-Object Version -Descending | Select-Object -First 1 + if (!$module) { + Write-Verbose "No module found with name: $moduleName" + } + else { + # Import the module. + Write-Host "##[command]Import-Module -Name $($module.Path) -Global" + $module = Import-Module -Name $module.Path -Global -PassThru -Force + } + } +} + +Import-AzModule -moduleName "Az.Resources" +Import-AzModule -moduleName "Az.Storage" +Import-AzModule -moduleName "Az.Compute" +Import-AzModule -moduleName "Az.Network" diff --git a/_generated/AzureFileCopyV6_Node20/AzureUtilityRest.ps1 b/_generated/AzureFileCopyV6_Node20/AzureUtilityRest.ps1 new file mode 100644 index 000000000000..d1119903394a --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/AzureUtilityRest.ps1 @@ -0,0 +1,160 @@ +Import-Module $PSScriptRoot\ps_modules\VstsAzureRestHelpers_ + +function Get-AzureStorageKeyFromARM +{ + param([string]$storageAccountName, + [object]$serviceEndpoint, + [string][Parameter(Mandatory=$false)]$connectedServiceNameARM, + [string][Parameter(Mandatory=$false)]$vstsAccessToken) + + if (-not [string]::IsNullOrEmpty($storageAccountName)) + { + # get azure storage account resource group name + $azureResourceGroupName = Get-AzureStorageAccountResourceGroupName -storageAccountName $storageAccountName + + Write-Verbose "[Azure Call]Retrieving storage key for the storage account: $storageAccount in resource group: $azureResourceid" + + $storageKeyDetails = Get-AzRMStorageKeys $azureResourceGroupName $storageAccountName $serviceEndpoint $connectedServiceNameARM $vstsAccessToken + $storageKey = $storageKeyDetails.Key1 + Write-Verbose "[Azure Call]Retrieved storage key successfully for the storage account: $storageAccount in resource group: $azureResourceGroupName" + + return $storageKey + } +} + +function Get-AzureBlobStorageEndpointFromARM +{ + param([string]$storageAccountName, + [object]$endpoint, + [string]$connectedServiceNameARM, + [string]$vstsAccessToken) + + if(-not [string]::IsNullOrEmpty($storageAccountName)) + { + # get azure storage account resource group name + $azureResourceGroupName = Get-AzureStorageAccountResourceGroupName -storageAccountName $storageAccountName + + Write-Verbose "[Azure Call]Retrieving storage account endpoint for the storage account: $storageAccount in resource group: $azureResourceGroupName" + + $storageAccountInfo = Get-AzRMStorageAccount $azureResourceGroupName $storageAccountName $endpoint $connectedServiceNameARM $vstsAccessToken -ErrorAction Stop + $storageAccountEnpoint = $storageAccountInfo.PrimaryEndpoints[0].blob + Write-Verbose "[Azure Call]Retrieved storage account endpoint successfully for the storage account: $storageAccount in resource group: $azureResourceGroupName" + + return $storageAccountEnpoint + } +} + +function Get-AzureStorageAccountTypeFromARM +{ + param([string]$storageAccountName, + [object]$endpoint, + [string]$connectedServiceNameARM, + [string]$vstsAccessToken) + + if(-not [string]::IsNullOrEmpty($storageAccountName)) + { + # get azure storage account resource group name + $azureResourceGroupName = Get-AzureStorageAccountResourceGroupName -storageAccountName $storageAccountName + + Write-Verbose "[Azure Call]Retrieving storage account type for the storage account: $storageAccount in resource group: $azureResourceGroupName" + $storageAccountInfo = Get-AzRMStorageAccount $azureResourceGroupName $storageAccountName $endpoint $connectedServiceNameARM $vstsAccessToken -ErrorAction Stop + $storageAccountType = $storageAccountInfo.sku.tier + Write-Verbose "[Azure Call]Retrieved storage account type successfully for the storage account: $storageAccount in resource group: $azureResourceGroupName" + + return $storageAccountType + } +} + +function Get-AzureMachineCustomScriptExtension +{ + param([string]$resourceGroupName, + [string]$vmName, + [string]$name, + [object]$endpoint, + [string]$connectedServiceNameARM, + [string]$vstsAccessToken) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmName)) + { + Write-Host (Get-VstsLocString -Key "AFC_GetCustomScriptExtension" -ArgumentList $name, $vmName) + $customScriptExtension = Get-AzRmVmCustomScriptExtension $resourceGroupName $vmName $name $endpoint $connectedServiceNameARM $vstsAccessToken + Write-Host (Get-VstsLocString -Key "AFC_GetCustomScriptExtensionComplete" -ArgumentList $name, $vmName) + } + + return $customScriptExtension +} + +function Remove-AzureMachineCustomScriptExtension +{ + param([string]$resourceGroupName, + [string]$vmName, + [string]$name, + [object]$endpoint, + [string]$connectedServiceNameARM, + [string]$vstsAccessToken) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmName) -and -not [string]::IsNullOrEmpty($name)) + { + Write-Host (Get-VstsLocString -Key "AFC_RemoveCustomScriptExtension" -ArgumentList $name, $vmName) + $response = Remove-AzRmVMCustomScriptExtension $resourceGroupName $vmName $name $endpoint $connectedServiceNameARM $vstsAccessToken + Write-Host (Get-VstsLocString -Key "AFC_RemoveCustomScriptExtensionComplete" -ArgumentList $name, $vmName) + } + + return $response +} + +function Get-AzureRMResourceGroupResourcesDetailsForAzureStack +{ + param([string]$resourceGroupName, + [object]$azureRMVMResources, + [object]$endpoint, + [string]$connectedServiceNameARM, + [string]$vstsAccessToken) + + [hashtable]$azureRGResourcesDetails = @{} + [hashtable]$loadBalancerDetails = @{} + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and $azureRMVMResources) + { + Write-Verbose "[Azure Call]Getting network interfaces in resource group $resourceGroupName" + $networkInterfaceResources = Get-AzureNetworkInterfaceDetails $resourceGroupName $endpoint $connectedServiceNameARM $vstsAccessToken + Write-Verbose "[Azure Call]Got network interfaces in resource group $resourceGroupName" + $azureRGResourcesDetails.Add("networkInterfaceResources", $networkInterfaceResources) + + Write-Verbose "[Azure Call]Getting public IP Addresses in resource group $resourceGroupName" + $publicIPAddressResources = Get-AzurePublicIpAddressDetails $resourceGroupName $endpoint $connectedServiceNameARM $vstsAccessToken + Write-Verbose "[Azure Call]Got public IP Addresses in resource group $resourceGroupName" + $azureRGResourcesDetails.Add("publicIPAddressResources", $publicIPAddressResources) + + Write-Verbose "[Azure Call]Getting load balancers in resource group $resourceGroupName" + $lbGroup = Get-AzureLoadBalancersDetails $resourceGroupName $endpoint $connectedServiceNameARM $vstsAccessToken + Write-Verbose "[Azure Call]Got load balancers in resource group $resourceGroupName" + + if($lbGroup) + { + foreach($lb in $lbGroup) + { + $lbDetails = @{} + Write-Verbose "[Azure Call]Getting load balancer in resource group $resourceGroupName" + $loadBalancer = Get-AzureLoadBalancerDetails $resourceGroupName $lb.Name $endpoint $connectedServiceNameARM $vstsAccessToken + Write-Verbose "[Azure Call]Got load balancer in resource group $resourceGroupName" + + Write-Verbose "[Azure Call]Getting LoadBalancer Frontend Ip Config" + $frontEndIPConfigs = Get-AzureRMLoadBalancerFrontendIpConfigDetails -LoadBalancer $loadBalancer + Write-Verbose "[Azure Call]Got LoadBalancer Frontend Ip Config" + + Write-Verbose "[Azure Call]Getting Azure LoadBalancer Inbound NatRule Config" + $inboundRules = Get-AzureRMLoadBalancerInboundNatRuleConfigDetails -LoadBalancer $loadBalancer + Write-Verbose "[Azure Call]Got Azure LoadBalancer Inbound NatRule Config" + + $lbDetails.Add("frontEndIPConfigs", $frontEndIPConfigs) + $lbDetails.Add("inboundRules", $inboundRules) + $loadBalancerDetails.Add($lb.Name, $lbDetails) + } + + $azureRGResourcesDetails.Add("loadBalancerResources", $loadBalancerDetails) + } + } + + return $azureRGResourcesDetails +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/MimeMapping.json b/_generated/AzureFileCopyV6_Node20/MimeMapping.json new file mode 100644 index 000000000000..bcca3431f02d --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/MimeMapping.json @@ -0,0 +1,559 @@ +{ + "MIMETypeMapping": { + ".323": "text/h323", + ".3g2": "video/3gpp2", + ".3gp": "video/3gpp", + ".3gp2": "video/3gpp2", + ".3gpp": "video/3gpp", + ".7z": "application/x-7z-compressed", + ".aca": "application/octet-stream", + ".accda": "application/msaccess.addin", + ".accdb": "application/msaccess", + ".accdc": "application/msaccess.cab", + ".accde": "application/msaccess", + ".accdr": "application/msaccess.runtime", + ".accdt": "application/msaccess", + ".accdw": "application/msaccess.webapplication", + ".accft": "application/msaccess.ftemplate", + ".acx": "application/internet-property-stream", + ".AddIn": "text/xml", + ".ade": "application/msaccess", + ".adobebridge": "application/x-bridge-url", + ".adp": "application/msaccess", + ".ADT": "audio/vnd.dlna.adts", + ".ADTS": "audio/aac", + ".afm": "application/octet-stream", + ".ai": "application/postscript", + ".aif": "audio/x-aiff", + ".aifc": "audio/aiff", + ".aiff": "audio/aiff", + ".air": "application/vnd.adobe.air-application-installer-package+zip", + ".amc": "application/x-mpeg", + ".application": "application/x-ms-application", + ".art": "image/x-jg", + ".asa": "application/xml", + ".asax": "application/xml", + ".ascx": "application/xml", + ".asd": "application/octet-stream", + ".asf": "video/x-ms-asf", + ".ashx": "application/xml", + ".asi": "application/octet-stream", + ".asm": "text/plain", + ".asmx": "application/xml", + ".aspx": "application/xml", + ".asr": "video/x-ms-asf", + ".asx": "video/x-ms-asf", + ".atom": "application/atom+xml", + ".au": "audio/basic", + ".avi": "video/x-msvideo", + ".axs": "application/olescript", + ".bas": "text/plain", + ".bcpio": "application/x-bcpio", + ".bin": "application/octet-stream", + ".bmp": "image/bmp", + ".c": "text/plain", + ".cab": "application/octet-stream", + ".caf": "audio/x-caf", + ".calx": "application/vnd.ms-office.calx", + ".cat": "application/vnd.ms-pki.seccat", + ".cc": "text/plain", + ".cd": "text/plain", + ".cdda": "audio/aiff", + ".cdf": "application/x-cdf", + ".cer": "application/x-x509-ca-cert", + ".chm": "application/octet-stream", + ".class": "application/x-java-applet", + ".clp": "application/x-msclip", + ".cmx": "image/x-cmx", + ".cnf": "text/plain", + ".cod": "image/cis-cod", + ".config": "application/xml", + ".contact": "text/x-ms-contact", + ".coverage": "application/xml", + ".cpio": "application/x-cpio", + ".cpp": "text/plain", + ".crd": "application/x-mscardfile", + ".crl": "application/pkix-crl", + ".crt": "application/x-x509-ca-cert", + ".cs": "text/plain", + ".csdproj": "text/plain", + ".csh": "application/x-csh", + ".csproj": "text/plain", + ".css": "text/css", + ".csv": "text/csv", + ".cur": "application/octet-stream", + ".cxx": "text/plain", + ".dat": "application/octet-stream", + ".datasource": "application/xml", + ".dbproj": "text/plain", + ".dcr": "application/x-director", + ".def": "text/plain", + ".deploy": "application/octet-stream", + ".der": "application/x-x509-ca-cert", + ".dgml": "application/xml", + ".dib": "image/bmp", + ".dif": "video/x-dv", + ".dir": "application/x-director", + ".disco": "text/xml", + ".dll": "application/x-msdownload", + ".dll.config": "text/xml", + ".dlm": "text/dlm", + ".doc": "application/msword", + ".docm": "application/vnd.ms-word.document.macroEnabled.12", + ".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document", + ".dot": "application/msword", + ".dotm": "application/vnd.ms-word.template.macroEnabled.12", + ".dotx": "application/vnd.openxmlformats-officedocument.wordprocessingml.template", + ".dsp": "application/octet-stream", + ".dsw": "text/plain", + ".dtd": "text/xml", + ".dtsConfig": "text/xml", + ".dv": "video/x-dv", + ".dvi": "application/x-dvi", + ".dwf": "drawing/x-dwf", + ".dwp": "application/octet-stream", + ".dxr": "application/x-director", + ".eml": "message/rfc822", + ".emz": "application/octet-stream", + ".eot": "application/octet-stream", + ".eps": "application/postscript", + ".etl": "application/etl", + ".etx": "text/x-setext", + ".evy": "application/envoy", + ".exe": "application/octet-stream", + ".exe.config": "text/xml", + ".fdf": "application/vnd.fdf", + ".fif": "application/fractals", + ".filters": "Application/xml", + ".fla": "application/octet-stream", + ".flr": "x-world/x-vrml", + ".flv": "video/x-flv", + ".fsscript": "application/fsharp-script", + ".fsx": "application/fsharp-script", + ".generictest": "application/xml", + ".gif": "image/gif", + ".group": "text/x-ms-group", + ".gsm": "audio/x-gsm", + ".gtar": "application/x-gtar", + ".gz": "application/x-gzip", + ".h": "text/plain", + ".hdf": "application/x-hdf", + ".hdml": "text/x-hdml", + ".hhc": "application/x-oleobject", + ".hhk": "application/octet-stream", + ".hhp": "application/octet-stream", + ".hlp": "application/winhlp", + ".hpp": "text/plain", + ".hqx": "application/mac-binhex40", + ".hta": "application/hta", + ".htc": "text/x-component", + ".htm": "text/html", + ".html": "text/html", + ".htt": "text/webviewhtml", + ".hxa": "application/xml", + ".hxc": "application/xml", + ".hxd": "application/octet-stream", + ".hxe": "application/xml", + ".hxf": "application/xml", + ".hxh": "application/octet-stream", + ".hxi": "application/octet-stream", + ".hxk": "application/xml", + ".hxq": "application/octet-stream", + ".hxr": "application/octet-stream", + ".hxs": "application/octet-stream", + ".hxt": "text/html", + ".hxv": "application/xml", + ".hxw": "application/octet-stream", + ".hxx": "text/plain", + ".i": "text/plain", + ".ico": "image/x-icon", + ".ics": "application/octet-stream", + ".idl": "text/plain", + ".ief": "image/ief", + ".iii": "application/x-iphone", + ".inc": "text/plain", + ".inf": "application/octet-stream", + ".inl": "text/plain", + ".ins": "application/x-internet-signup", + ".ipa": "application/x-itunes-ipa", + ".ipg": "application/x-itunes-ipg", + ".ipproj": "text/plain", + ".ipsw": "application/x-itunes-ipsw", + ".iqy": "text/x-ms-iqy", + ".isp": "application/x-internet-signup", + ".ite": "application/x-itunes-ite", + ".itlp": "application/x-itunes-itlp", + ".itms": "application/x-itunes-itms", + ".itpc": "application/x-itunes-itpc", + ".IVF": "video/x-ivf", + ".jar": "application/java-archive", + ".java": "application/octet-stream", + ".jck": "application/liquidmotion", + ".jcz": "application/liquidmotion", + ".jfif": "image/pjpeg", + ".jnlp": "application/x-java-jnlp-file", + ".jpb": "application/octet-stream", + ".jpe": "image/jpeg", + ".jpeg": "image/jpeg", + ".jpg": "image/jpeg", + ".js": "application/x-javascript", + ".json": "application/json", + ".jsx": "text/jscript", + ".jsxbin": "text/plain", + ".latex": "application/x-latex", + ".library-ms": "application/windows-library+xml", + ".lit": "application/x-ms-reader", + ".loadtest": "application/xml", + ".lpk": "application/octet-stream", + ".lsf": "video/x-la-asf", + ".lst": "text/plain", + ".lsx": "video/x-la-asf", + ".lzh": "application/octet-stream", + ".m13": "application/x-msmediaview", + ".m14": "application/x-msmediaview", + ".m1v": "video/mpeg", + ".m2t": "video/vnd.dlna.mpeg-tts", + ".m2ts": "video/vnd.dlna.mpeg-tts", + ".m2v": "video/mpeg", + ".m3u": "audio/x-mpegurl", + ".m3u8": "audio/x-mpegurl", + ".m4a": "audio/m4a", + ".m4b": "audio/m4b", + ".m4p": "audio/m4p", + ".m4r": "audio/x-m4r", + ".m4v": "video/x-m4v", + ".mac": "image/x-macpaint", + ".mak": "text/plain", + ".man": "application/x-troff-man", + ".manifest": "application/x-ms-manifest", + ".map": "text/plain", + ".master": "application/xml", + ".mda": "application/msaccess", + ".mdb": "application/x-msaccess", + ".mde": "application/msaccess", + ".mdp": "application/octet-stream", + ".me": "application/x-troff-me", + ".mfp": "application/x-shockwave-flash", + ".mht": "message/rfc822", + ".mhtml": "message/rfc822", + ".mid": "audio/mid", + ".midi": "audio/mid", + ".mix": "application/octet-stream", + ".mk": "text/plain", + ".mmf": "application/x-smaf", + ".mno": "text/xml", + ".mny": "application/x-msmoney", + ".mod": "video/mpeg", + ".mov": "video/quicktime", + ".movie": "video/x-sgi-movie", + ".mp2": "video/mpeg", + ".mp2v": "video/mpeg", + ".mp3": "audio/mpeg", + ".mp4": "video/mp4", + ".mp4v": "video/mp4", + ".mpa": "video/mpeg", + ".mpe": "video/mpeg", + ".mpeg": "video/mpeg", + ".mpf": "application/vnd.ms-mediapackage", + ".mpg": "video/mpeg", + ".mpp": "application/vnd.ms-project", + ".mpv2": "video/mpeg", + ".mqv": "video/quicktime", + ".ms": "application/x-troff-ms", + ".msi": "application/octet-stream", + ".mso": "application/octet-stream", + ".mts": "video/vnd.dlna.mpeg-tts", + ".mtx": "application/xml", + ".mvb": "application/x-msmediaview", + ".mvc": "application/x-miva-compiled", + ".mxp": "application/x-mmxp", + ".nc": "application/x-netcdf", + ".nsc": "video/x-ms-asf", + ".nws": "message/rfc822", + ".ocx": "application/octet-stream", + ".oda": "application/oda", + ".odc": "text/x-ms-odc", + ".odh": "text/plain", + ".odl": "text/plain", + ".odp": "application/vnd.oasis.opendocument.presentation", + ".ods": "application/oleobject", + ".odt": "application/vnd.oasis.opendocument.text", + ".one": "application/onenote", + ".onea": "application/onenote", + ".onepkg": "application/onenote", + ".onetmp": "application/onenote", + ".onetoc": "application/onenote", + ".onetoc2": "application/onenote", + ".orderedtest": "application/xml", + ".osdx": "application/opensearchdescription+xml", + ".p10": "application/pkcs10", + ".p12": "application/x-pkcs12", + ".p7b": "application/x-pkcs7-certificates", + ".p7c": "application/pkcs7-mime", + ".p7m": "application/pkcs7-mime", + ".p7r": "application/x-pkcs7-certreqresp", + ".p7s": "application/pkcs7-signature", + ".pbm": "image/x-portable-bitmap", + ".pcast": "application/x-podcast", + ".pct": "image/pict", + ".pcx": "application/octet-stream", + ".pcz": "application/octet-stream", + ".pdf": "application/pdf", + ".pfb": "application/octet-stream", + ".pfm": "application/octet-stream", + ".pfx": "application/x-pkcs12", + ".pgm": "image/x-portable-graymap", + ".pic": "image/pict", + ".pict": "image/pict", + ".pkgdef": "text/plain", + ".pkgundef": "text/plain", + ".pko": "application/vnd.ms-pki.pko", + ".pls": "audio/scpls", + ".pma": "application/x-perfmon", + ".pmc": "application/x-perfmon", + ".pml": "application/x-perfmon", + ".pmr": "application/x-perfmon", + ".pmw": "application/x-perfmon", + ".png": "image/png", + ".pnm": "image/x-portable-anymap", + ".pnt": "image/x-macpaint", + ".pntg": "image/x-macpaint", + ".pnz": "image/png", + ".pot": "application/vnd.ms-powerpoint", + ".potm": "application/vnd.ms-powerpoint.template.macroEnabled.12", + ".potx": "application/vnd.openxmlformats-officedocument.presentationml.template", + ".ppa": "application/vnd.ms-powerpoint", + ".ppam": "application/vnd.ms-powerpoint.addin.macroEnabled.12", + ".ppm": "image/x-portable-pixmap", + ".pps": "application/vnd.ms-powerpoint", + ".ppsm": "application/vnd.ms-powerpoint.slideshow.macroEnabled.12", + ".ppsx": "application/vnd.openxmlformats-officedocument.presentationml.slideshow", + ".ppt": "application/vnd.ms-powerpoint", + ".pptm": "application/vnd.ms-powerpoint.presentation.macroEnabled.12", + ".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation", + ".prf": "application/pics-rules", + ".prm": "application/octet-stream", + ".prx": "application/octet-stream", + ".ps": "application/postscript", + ".psc1": "application/PowerShell", + ".psd": "application/octet-stream", + ".psess": "application/xml", + ".psm": "application/octet-stream", + ".psp": "application/octet-stream", + ".pub": "application/x-mspublisher", + ".pwz": "application/vnd.ms-powerpoint", + ".qht": "text/x-html-insertion", + ".qhtm": "text/x-html-insertion", + ".qt": "video/quicktime", + ".qti": "image/x-quicktime", + ".qtif": "image/x-quicktime", + ".qtl": "application/x-quicktimeplayer", + ".qxd": "application/octet-stream", + ".ra": "audio/x-pn-realaudio", + ".ram": "audio/x-pn-realaudio", + ".rar": "application/octet-stream", + ".ras": "image/x-cmu-raster", + ".rat": "application/rat-file", + ".rc": "text/plain", + ".rc2": "text/plain", + ".rct": "text/plain", + ".rdlc": "application/xml", + ".resx": "application/xml", + ".rf": "image/vnd.rn-realflash", + ".rgb": "image/x-rgb", + ".rgs": "text/plain", + ".rm": "application/vnd.rn-realmedia", + ".rmi": "audio/mid", + ".rmp": "application/vnd.rn-rn_music_package", + ".roff": "application/x-troff", + ".rpm": "audio/x-pn-realaudio-plugin", + ".rqy": "text/x-ms-rqy", + ".rtf": "application/rtf", + ".rtx": "text/richtext", + ".ruleset": "application/xml", + ".s": "text/plain", + ".safariextz": "application/x-safari-safariextz", + ".scd": "application/x-msschedule", + ".sct": "text/scriptlet", + ".sd2": "audio/x-sd2", + ".sdp": "application/sdp", + ".sea": "application/octet-stream", + ".searchConnector-ms": "application/windows-search-connector+xml", + ".setpay": "application/set-payment-initiation", + ".setreg": "application/set-registration-initiation", + ".settings": "application/xml", + ".sgimb": "application/x-sgimb", + ".sgml": "text/sgml", + ".sh": "application/x-sh", + ".shar": "application/x-shar", + ".shtml": "text/html", + ".sit": "application/x-stuffit", + ".sitemap": "application/xml", + ".skin": "application/xml", + ".sldm": "application/vnd.ms-powerpoint.slide.macroEnabled.12", + ".sldx": "application/vnd.openxmlformats-officedocument.presentationml.slide", + ".slk": "application/vnd.ms-excel", + ".sln": "text/plain", + ".slupkg-ms": "application/x-ms-license", + ".smd": "audio/x-smd", + ".smi": "application/octet-stream", + ".smx": "audio/x-smd", + ".smz": "audio/x-smd", + ".snd": "audio/basic", + ".snippet": "application/xml", + ".snp": "application/octet-stream", + ".sol": "text/plain", + ".sor": "text/plain", + ".spc": "application/x-pkcs7-certificates", + ".spl": "application/futuresplash", + ".src": "application/x-wais-source", + ".srf": "text/plain", + ".SSISDeploymentManifest": "text/xml", + ".ssm": "application/streamingmedia", + ".sst": "application/vnd.ms-pki.certstore", + ".stl": "application/vnd.ms-pki.stl", + ".sv4cpio": "application/x-sv4cpio", + ".sv4crc": "application/x-sv4crc", + ".svc": "application/xml", + ".swf": "application/x-shockwave-flash", + ".t": "application/x-troff", + ".tar": "application/x-tar", + ".tcl": "application/x-tcl", + ".testrunconfig": "application/xml", + ".testsettings": "application/xml", + ".tex": "application/x-tex", + ".texi": "application/x-texinfo", + ".texinfo": "application/x-texinfo", + ".tgz": "application/x-compressed", + ".thmx": "application/vnd.ms-officetheme", + ".thn": "application/octet-stream", + ".tif": "image/tiff", + ".tiff": "image/tiff", + ".tlh": "text/plain", + ".tli": "text/plain", + ".toc": "application/octet-stream", + ".tr": "application/x-troff", + ".trm": "application/x-msterminal", + ".trx": "application/xml", + ".ts": "video/vnd.dlna.mpeg-tts", + ".tsv": "text/tab-separated-values", + ".ttf": "application/octet-stream", + ".tts": "video/vnd.dlna.mpeg-tts", + ".txt": "text/plain", + ".u32": "application/octet-stream", + ".uls": "text/iuls", + ".user": "text/plain", + ".ustar": "application/x-ustar", + ".vb": "text/plain", + ".vbdproj": "text/plain", + ".vbk": "video/mpeg", + ".vbproj": "text/plain", + ".vbs": "text/vbscript", + ".vcf": "text/x-vcard", + ".vcproj": "Application/xml", + ".vcs": "text/plain", + ".vcxproj": "Application/xml", + ".vddproj": "text/plain", + ".vdp": "text/plain", + ".vdproj": "text/plain", + ".vdx": "application/vnd.ms-visio.viewer", + ".vml": "text/xml", + ".vscontent": "application/xml", + ".vsct": "text/xml", + ".vsd": "application/vnd.visio", + ".vsi": "application/ms-vsi", + ".vsix": "application/vsix", + ".vsixlangpack": "text/xml", + ".vsixmanifest": "text/xml", + ".vsmdi": "application/xml", + ".vspscc": "text/plain", + ".vss": "application/vnd.visio", + ".vsscc": "text/plain", + ".vssettings": "text/xml", + ".vssscc": "text/plain", + ".vst": "application/vnd.visio", + ".vstemplate": "text/xml", + ".vsto": "application/x-ms-vsto", + ".vsw": "application/vnd.visio", + ".vsx": "application/vnd.visio", + ".vtx": "application/vnd.visio", + ".wav": "audio/wav", + ".wave": "audio/wav", + ".wax": "audio/x-ms-wax", + ".wbk": "application/msword", + ".wbmp": "image/vnd.wap.wbmp", + ".wcm": "application/vnd.ms-works", + ".wdb": "application/vnd.ms-works", + ".wdp": "image/vnd.ms-photo", + ".webarchive": "application/x-safari-webarchive", + ".webtest": "application/xml", + ".wiq": "application/xml", + ".wiz": "application/msword", + ".wks": "application/vnd.ms-works", + ".WLMP": "application/wlmoviemaker", + ".wlpginstall": "application/x-wlpg-detect", + ".wlpginstall3": "application/x-wlpg3-detect", + ".wm": "video/x-ms-wm", + ".wma": "audio/x-ms-wma", + ".wmd": "application/x-ms-wmd", + ".wmf": "application/x-msmetafile", + ".wml": "text/vnd.wap.wml", + ".wmlc": "application/vnd.wap.wmlc", + ".wmls": "text/vnd.wap.wmlscript", + ".wmlsc": "application/vnd.wap.wmlscriptc", + ".wmp": "video/x-ms-wmp", + ".wmv": "video/x-ms-wmv", + ".wmx": "video/x-ms-wmx", + ".wmz": "application/x-ms-wmz", + ".wpl": "application/vnd.ms-wpl", + ".wps": "application/vnd.ms-works", + ".wri": "application/x-mswrite", + ".wrl": "x-world/x-vrml", + ".wrz": "x-world/x-vrml", + ".wsc": "text/scriptlet", + ".wsdl": "text/xml", + ".wvx": "video/x-ms-wvx", + ".x": "application/directx", + ".xaf": "x-world/x-vrml", + ".xaml": "application/xaml+xml", + ".xap": "application/x-silverlight-app", + ".xbap": "application/x-ms-xbap", + ".xbm": "image/x-xbitmap", + ".xdr": "text/plain", + ".xht": "application/xhtml+xml", + ".xhtml": "application/xhtml+xml", + ".xla": "application/vnd.ms-excel", + ".xlam": "application/vnd.ms-excel.addin.macroEnabled.12", + ".xlc": "application/vnd.ms-excel", + ".xld": "application/vnd.ms-excel", + ".xlk": "application/vnd.ms-excel", + ".xll": "application/vnd.ms-excel", + ".xlm": "application/vnd.ms-excel", + ".xls": "application/vnd.ms-excel", + ".xlsb": "application/vnd.ms-excel.sheet.binary.macroEnabled.12", + ".xlsm": "application/vnd.ms-excel.sheet.macroEnabled.12", + ".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + ".xlt": "application/vnd.ms-excel", + ".xltm": "application/vnd.ms-excel.template.macroEnabled.12", + ".xltx": "application/vnd.openxmlformats-officedocument.spreadsheetml.template", + ".xlw": "application/vnd.ms-excel", + ".xml": "text/xml", + ".xmta": "application/xml", + ".xof": "x-world/x-vrml", + ".XOML": "text/plain", + ".xpm": "image/x-xpixmap", + ".xps": "application/vnd.ms-xpsdocument", + ".xrm-ms": "text/xml", + ".xsc": "application/xml", + ".xsd": "text/xml", + ".xsf": "text/xml", + ".xsl": "text/xml", + ".xslt": "text/xml", + ".xsn": "application/octet-stream", + ".xss": "application/xml", + ".xtp": "application/octet-stream", + ".xwd": "image/x-xwindowdump", + ".z": "application/x-compress", + ".zip": "application/x-zip-compressed" + } + } \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/PreJobExecutionAzureFileCopy.ts b/_generated/AzureFileCopyV6_Node20/PreJobExecutionAzureFileCopy.ts new file mode 100644 index 000000000000..f0bacc48a816 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/PreJobExecutionAzureFileCopy.ts @@ -0,0 +1,54 @@ +import tl = require('azure-pipelines-task-lib/task'); +import path = require('path'); +import fs = require('fs') +import armStorage = require('azure-pipelines-tasks-azure-arm-rest/azure-arm-storage'); +import msRestAzure = require('azure-pipelines-tasks-azure-arm-rest/azure-arm-common'); +import { AzureRMEndpoint } from 'azure-pipelines-tasks-azure-arm-rest/azure-arm-endpoint'; +import { AzureEndpoint, StorageAccount } from 'azure-pipelines-tasks-azure-arm-rest/azureModels'; + +function isNonEmpty(str: string): boolean { + return (!!str && !!str.trim()); +} + +function getResourceGroupNameFromUri(resourceUri: string): string { + if (isNonEmpty(resourceUri)) { + resourceUri = resourceUri.toLowerCase(); + return resourceUri.substring(resourceUri.indexOf("resourcegroups/") + "resourcegroups/".length, resourceUri.indexOf("/providers")); + } + + return ""; +} + +async function run(): Promise { + let tempDirectory: string = tl.getVariable('Agent.TempDirectory'); + let fileName: string = Math.random().toString(36).replace('0.', ''); + let file: string = path.resolve(tempDirectory, fileName); + try { + const taskManifestPath = path.join(__dirname, "task.json"); + tl.debug("Setting resource path to " + taskManifestPath); + tl.setResourcePath(taskManifestPath); + let connectionType = tl.getInput('ConnectedServiceNameSelector', false); + if(connectionType === 'ConnectedServiceNameARM') { + let connectedServiceName = tl.getInput('ConnectedServiceNameARM', true); + let storageAccountName = tl.getInput('StorageAccountRM', true); + var azureEndpoint: AzureEndpoint = await new AzureRMEndpoint(connectedServiceName).getEndpoint(); + const storageArmClient = new armStorage.StorageManagementClient(azureEndpoint.applicationTokenCredentials, azureEndpoint.subscriptionID); + let storageAccount: StorageAccount = await storageArmClient.storageAccounts.get(storageAccountName); + let storageAccountResourceGroupName = getResourceGroupNameFromUri(storageAccount.id); + let accessKeys = await storageArmClient.storageAccounts.listKeys(storageAccountResourceGroupName, storageAccountName, null); + let accessKey: string = accessKeys[0]; + let data: string = `/DestKey:\"${accessKey}\"`; + let options = { encoding : "utf8" } + fs.writeFileSync(file, data, options); + tl.setTaskVariable('AFC_V2_ARM_STORAGE_KEY_FILE', file); + tl.debug("Response file created"); + } + } catch(error) { + if (fs.existsSync(file)) { + fs.unlinkSync(file); + } + console.log(tl.loc("AFC_PreexecutionJob_UnableToGetStorageKey", error)); + } +} + +run() \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/README.md b/_generated/AzureFileCopyV6_Node20/README.md new file mode 100644 index 000000000000..d563b42b68d9 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/README.md @@ -0,0 +1,116 @@ +# Azure File Copy + +### Overview + +The task is used to copy application files and other artifacts that are required to install the application on Azure VMs like PowerShell scripts, PowerShell-DSC modules etc. The task provides the ability to copy files to an Azure blob or directly to Azure VMs. Even when the target is Azure VMs, Azure blobs are used as an intermediary and the files are copied to it first and then downloaded to the VMs. The tasks uses [AzCopy](https://azure.microsoft.com/en-in/documentation/articles/storage-use-azcopy/), the command-line utility built for fast copying of data from and into Azure storage accounts. + +### Contact Information + +Please report a problem at [Developer Community Forum](https://developercommunity.visualstudio.com/spaces/21/index.html) if you are facing problems in making this task work. You can also share feedback about the task like, what more functionality should be added to the task, what other tasks you would like to have, at the same place. + +### Prerequisite for the task + +**Azure Subscription** + +To deploy to Azure, an Azure subscription has to be linked to Team Foundation Server or to Azure Pipelines using the Services tab in the Account Administration section. Add the Azure subscription to use in the Build or Release Management definition by opening the Account Administration screen (gear icon on the top-right of the screen) and then click on the Services Tab. + + - Use 'Azure Resource Manager' endpoint type to create a ARM endpoint, for more details follow the steps listed in the link [here](https://go.microsoft.com/fwlink/?LinkID=623000&clcid=0x409). + - As this version of task uses AzCopy 10, service principal needs to have one of these `Storage Blob Data Contributor` or `Storage Blob Data Owner` roles assigned to access resources. + 1. Click on `Manage` link next to Azure Subscription + 2. Click `Manage Service Principal` which will redirect you to the Application Registration of the Service Principal. Copy the name. + 3. Go back and click `Manage service connection roles` which will redirect you to the IAM blade of the Azure Subscription. Here you need to assign a role to the service principal. Use name copied in previous step to search service principal + +**PowerShell** + +The task needs at least version 3.0 of Powershell on the target machine. + +**Azure PowerShell** + +The task needs Az modules to be installed on the automation agent, and that can be done easily using https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-7.0.0. + +**Azure Virtual Machines** + +The task can copy files to the Azure Virtual Machines that are created either using the [new azure portal](https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-tutorial/). For copying the files to VMs, they are first copied to an automatically generated container in the Azure storage account, and then from there to the VMs. The container is deleted after the files are copied successfully to the VMs. + +To dynamically deploy Azure resource groups with virtual machines in them use the [Azure Resource Group Deployment](https://github.com/Microsoft/vsts-tasks/tree/master/Tasks/DeployAzureResourceGroup) task. The task has a sample template that can setup the WinRM HTTPS protocol on the virtual machines, open the 5986 port in the Firewall, and install the test certificate. After this the virtual machines are ready for use in the deployment task. + +If the VMs have been created without opening the WinRM HTTPS ports then follow the steps below to setup the machine for WinRM HTTPS: + +- In the target machine, the WinRM HTTPS port (default 5986) should be open in the Firewall. Disable [UAC remote restrictions](https://support.microsoft.com/en-us/kb/951016) and the credentials should be in the format of username like vmuser, where vmuser is the admin user of the VM. +- The trusted certificate should be installed in the Automation agent, and if the trusted certificate is not installed in the Automation agent, then ensure that the Test Certificate option is selected in the task for the application deployment to work. +- For more guidance refer this [blog](https://blogs.msdn.com/b/muthus_blog/archive/2015/11/04/pre-requisites-for-using-azure-vms-in-winrm-based-tasks-in-build-and-rm-workflows.aspx). + +### Parameters of the task: + +The parameters of the task are described in details, including examples, to show how to input the parameters. The parameters listed with a * are required parameters for the task: + +* **Azure Subscription**: The name of Azure subscription, where the Azure storage account is located. The storage account is accessed using the stored credentials of the Azure account in the Services tab. + +* **Source**: The source of the files. As described above using pre-defined system variables like $(Build.Repository.LocalPath) make it easy to specify the location of the build on the Build Automation Agent machine. The variables resolve to the working folder on the agent machine, when the task is run on it. Note that wild cards like *\.zip are not supported. + +* **Storage Account**: The name of an existing storage account in the Azure Subscription specified earlier. + +* **Destination**: The target for copying the files and is either an Azure blob or VMs. The section below details the parameters that need to be filled-out if the target is Azure VMs. + + * **Resource Group**: Name of the resource group that contains the Azure VMs. + + * **Select Machines By**: The parameter is used to copy the files to a subset of VMs and the subset can be specified by the host name of the VMs or the tags on them. [Tags](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/) are supported for resources created via the Azure Resource Manager only. + + * **Filter Criteria**: If you are copying to a subset of VMs using machine names filter, you can provide a comma separated list of the VM host names for example, ffweb, ffdb1, ffdb2. If you are using tags then you can specify tags in the format “:, :” for example, role:web, db; OS:win7. The default behavior is to copy to all the VMs in the Resource Group. Note the delimiters used for tags are ,(comma), :(colon) and ;(semicolon). + + * **Admin Login**: Administrator Username for all the Azure VMs in the Resource Group. + + * **Password**: Administrator Username password for all the Azure VMs in the Resource Group. + + * **Destination Folder**: The folder in the Azure VMs where the files will be copied to. Environment variables are also supported like $env:windir, $env:systemroot etc. An example of the destination folder is $env:windir\FabrikamFibre\Web or c:\FabrikamFibre. + + * **Enable Copy Prerequisites**: Enabling this option configures Windows Remote Management (WinRM) listener over HTTPS protocol on port 5986, using a self-signed certificate. This configuration is required for performing copy operation on Azure machines. If the target Virtual Machines are backed by a Load balancer, ensure Inbound NAT rules are configured for target port (5986). If the target Virtual Machines are associated with a Network security group (NSG), configure Inbound security rules for Destination port (5986). Applicable only for ARM VMs. + + * **Copy in Parallel**: Selecting this option will copy files to all the VMs in the Resource Group in-parallel, hence speeding up the process of copying. + + * **Clean Target**: Selecting this option will clean the destination folder prior to copying the files to it. When destination type is AzureBlob, it will delete all the folders/files in that container and If blob prefix is provided then it will delete all the folders/files in that blob prefix. + + * **Test Certificate**: This setting is required while copying the files from the blob containers to the Azure VMs. The copy operation is initiated over the WinRM HTTPS protocol and if the VM has a test certificate installed on it, then select this option to to skip the validation that the server certificate is signed by a trusted certificate authority (CA). + +* **Destination**: If the target is Azure blob then the following parameters need to be filled out. + + * **Container Name**: The name of the container where the files will be copied to. If the container does not exist then a new one will be created with the name provided in this parameter. + + * **Blob Prefix**: A prefix for the Blobs that can be used to filter the blobs like appending the Build number to the blobs, so that all the blobs with the same build number can be downloaded from the Container. + +* **Additional Arguments**: Additional [AzCopy.exe](https://azure.microsoft.com/en-us/documentation/articles/storage-use-azcopy/) arguments that will be applied for uploading to blob and same will be applied for downloading while copy to VM. + * **Blob Destination**: Supported additional arguments for copy to blob are listed in https://docs.microsoft.com/en-us/azure/storage/common/storage-ref-azcopy-copy?toc=/azure/storage/blobs/toc.json. + + * **VM Destination**: Supported additional arguments for copy to blob are listed in https://docs.microsoft.com/en-us/azure/storage/common/storage-ref-azcopy-copy?toc=/azure/storage/blobs/toc.json. + +### Output Variables + +The task creates the following as output variables: +* **StorageContainerUri**: When copying files to an Azure container, this parameter returns the Uri of the container were the files were copied to. +* **StorageContainerSasToken**: When copying files to an Azure container, a SasToken is created and returned. By default, this token expires after 4 hours. + +Following the [output variables](https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#use-output-variables-from-tasks) documentation and naming the step, we can then reference the variables like so: + +```yaml +- task: AzureFileCopy@5 + inputs: + SourcePath: 'Readme.md' + azureSubscription: 'Azure' + Destination: 'AzureBlob' + storage: 'storageAccount' + ContainerName: 'containerName' + BlobPrefix: '' + name: AzureFileCopy + +- script: | + echo $(AzureFileCopy.StorageContainerUri) + echo $(AzureFileCopy.StorageContainerSasToken) +``` + +### Known Limitations : + +* If resource group contains both [resource manager](https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-tutorial/) and [classic](https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-windows-tutorial-classic-portal/) VMs, then copy operation will be performed only on resource manager VMs. + +### Earlier Versions + +If you want to work with earlier version of this task, please refer README.md present at https://github.com/microsoft/azure-pipelines-tasks/tree/releases/m195/Tasks/AzureFileCopyV4/ . diff --git a/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/de-DE/resources.resjson b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/de-DE/resources.resjson new file mode 100644 index 000000000000..28987d5df569 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/de-DE/resources.resjson @@ -0,0 +1,94 @@ +{ + "loc.friendlyName": "Azure-Dateikopiervorgang", + "loc.helpMarkDown": "[Weitere Informationen zu dieser Aufgabe](https://aka.ms/azurefilecopyreadme)", + "loc.description": "Hiermit werden Dateien in Azure Blob Storage oder auf virtuelle Computer kopiert.", + "loc.instanceNameFormat": "$(Destination)-Dateikopiervorgang", + "loc.releaseNotes": "Neuerungen in Version 5.0:
   Unterstützung von AzCopy.exe-Version 10.12.2", + "loc.input.label.SourcePath": "Quelle", + "loc.input.help.SourcePath": "Der absolute Pfad des Quellordners oder der Datei auf dem lokalen Computer oder eine UNC-Freigabe. Der Ausdruck muss einen einzelnen Ordner oder eine Datei zurückgeben. Das Platzhaltersymbol (*) wird an beliebiger Stelle im Dateipfad oder im Dateinamen unterstützt.", + "loc.input.label.ConnectedServiceNameARM": "Azure-Abonnement", + "loc.input.help.ConnectedServiceNameARM": "Azure Resource Manager-Abonnement, das als Ziel für den Kopiervorgang von Dateien dient.", + "loc.input.label.Destination": "Zieltyp", + "loc.input.help.Destination": "Wählen Sie als Ziel entweder Azure-Blob oder Azure-VMs aus.", + "loc.input.label.StorageAccountRM": "RM-Speicherkonto", + "loc.input.help.StorageAccountRM": "Geben Sie ein bereits vorhandenes ARM-Speicherkonto an. Es wird auch als Zwischenspeicher zum Kopieren von Dateien in virtuelle Azure-Maschinen verwendet.", + "loc.input.label.ContainerName": "Containername", + "loc.input.help.ContainerName": "Der Name des Containers zum Hochladen der Dateien. Wenn im angegebenen Speicherkonto kein Container mit dem angegebenen Namen vorhanden ist, wird er automatisch erstellt.
Wenn Sie ein virtuelles Verzeichnis innerhalb des Containers erstellen möchten, verwenden Sie die unten aufgeführte Blobpräfixeingabe.
Beispiel: Wenn der Zielort https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/ lautet, geben Sie mycontainer als Containername und vd1/vd2 als Blobpräfix an.", + "loc.input.label.BlobPrefix": "Blobpräfix", + "loc.input.help.BlobPrefix": "Nützlich zum Filtern von Dateien, z. B. das Anfügen der Buildnummer an alle Blobs, um nur Dateien aus diesem Build herunterzuladen. Beispiel: Wenn Sie das Blobpräfix als myvd1/ angeben, wird innerhalb des Containers ein virtuelles Verzeichnis mit diesem Namen erstellt. Das Blobpräfix mit dem nachstehenden \"/\" wird als virtuelles Verzeichnis betrachtet. Andernfalls wird es als Datei behandelt, es sei denn, das Element, das kopiert wird, ist selbst ein Ordner. Die Quelldateien werden in https://myaccount.blob.core.windows.net/mycontainer/myvd1/ kopiert.", + "loc.input.label.EnvironmentNameRM": "Ressourcengruppe", + "loc.input.help.EnvironmentNameRM": "Der Name der Zielressourcengruppe, in die Dateien kopiert werden sollen.", + "loc.input.label.ResourceFilteringMethod": "Computer auswählen nach", + "loc.input.help.ResourceFilteringMethod": "Wählen Sie optional eine Teilmenge der virtuellen Maschinen in der Ressourcengruppe durch Angeben des Hostnamens oder der Tags der virtuellen Maschinen aus. [Tags](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/) werden nur für Ressourcen unterstützt, die über den Azure Resource Manager erstellt werden.", + "loc.input.label.MachineNames": "Filterkriterien", + "loc.input.help.MachineNames": "Stellen Sie eine Liste der VM-Hostnamen (z. B. \"ffweb\", \"ffdb\") oder Tags (z. B. \"Role:DB\", \"Web; OS:Win8.1\" bereit. Beachten Sie, dass die für Tags verwendeten Trennzeichen \",\" (Komma), \":\" (Doppelpunkt) und \";\" (Semikolon) sind. Wenn mehrere Tags angegeben werden, wird der Task auf allen virtuellen Maschinen mit den angegebenen Tags ausgeführt. Standardmäßig wird der Task auf allen virtuellen Maschinen ausgeführt.", + "loc.input.label.vmsAdminUserName": "Administratoranmeldung", + "loc.input.help.vmsAdminUserName": "Der Benutzername des Administrators der virtuellen Maschinen.", + "loc.input.label.vmsAdminPassword": "Kennwort", + "loc.input.help.vmsAdminPassword": "Das Administratorkennwort der VMs.
Die in den Build- oder Releasepipelines als \"$(passwordVariable)\" festgelegten Variablen werden akzeptiert.
Sie können die Variable als \"secret\" markieren, um sie abzusichern.", + "loc.input.label.TargetPath": "Zielordner", + "loc.input.help.TargetPath": "Lokaler Pfad auf den Zielcomputern zum Kopieren der Dateien aus der Quelle. Die Umgebungsvariable kann wie folgt verwendet werden: $env:windir\\BudgetIT\\Web.", + "loc.input.label.AdditionalArgumentsForBlobCopy": "Optionale Argumente (für das Hochladen von Dateien in das Blob)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "Optionale AzCopy.exe-Argumente, die beim Hochladen in ein Blob angewendet werden, z. B. --check-length=true. Werden hier keine optionalen Argumente angegeben, werden standardmäßig die folgenden optionalen Argumente hinzugefügt.
--log-level=INFO (verwenden Sie bei Ausführung der Pipeline im Debugmodus \"--log-level=DEBUG\"),
--recursive (nur, wenn der Containername nicht \"$root\" lautet),
--blob-type=PageBlob (nur, wenn das angegebene Speicherkonto ein Premium-Konto ist)", + "loc.input.label.AdditionalArgumentsForVMCopy": "Optionale Argumente (für das Herunterladen von Dateien auf die VM)", + "loc.input.help.AdditionalArgumentsForVMCopy": "Optionale AzCopy.exe-Argumente, die beim Herunterladen auf eine VM angewendet werden, z. B. --check-length=true. Werden hier keine optionalen Argumente angegeben, werden standardmäßig die folgenden optionalen Argumente hinzugefügt.
--log-level=INFO (verwenden Sie bei Ausführung der Pipeline im Debugmodus \"--log-level=DEBUG\"),
--recursive", + "loc.input.label.sasTokenTimeOutInMinutes": "Gültigkeitsdauer des SAS-Tokens in Minuten", + "loc.input.help.sasTokenTimeOutInMinutes": "Geben Sie die Zeit in Minuten an, nach der das SAS-Token für den Container abläuft. Dieses Token läuft standardmäßig nach 4 Stunden ab.", + "loc.input.label.enableCopyPrerequisites": "Kopiervoraussetzungen aktivieren", + "loc.input.help.enableCopyPrerequisites": "Durch das Aktivieren dieser Option wird der Listener der Windows-Remoteverwaltung (Windows Remote Management, WinRM) über das HTTPS-Protokoll an Port 5986 mithilfe eines selbstsignierten Zertifikats konfiguriert. Diese Konfiguration ist zum Ausführen des Kopiervorgangs auf Azure-Computern erforderlich. Wenn die virtuellen Zielcomputer durch Lastenausgleich gesichert werden, stellen Sie sicher, dass die Regeln für eingehenden NAT-Datenverkehr für den Zielport (5986) konfiguriert sind. Gilt nur für virtuelle ARM-Computer.", + "loc.input.label.CopyFilesInParallel": "Parallel kopieren", + "loc.input.help.CopyFilesInParallel": "Wenn diese Option auf \"True\" festgelegt ist, werden Dateien parallel auf die Zielcomputer kopiert.", + "loc.input.label.CleanTargetBeforeCopy": "Ziel bereinigen", + "loc.input.help.CleanTargetBeforeCopy": "Wenn diese Option auf \"True\" festgelegt ist, wird der Zielordner vor dem Kopieren der Dateien bereinigt.", + "loc.input.label.skipCACheck": "Testzertifikat", + "loc.input.help.skipCACheck": "Wenn diese Option ausgewählt wird, überspringt der Client die Überprüfung, ob das Serverzertifikat von einer vertrauenswürdigen Zertifizierungsstelle (CA) signiert wurde, wenn eine Verbindung über HTTPS (Hypertext Transfer Protocol über Secure Socket Layer) hergestellt wird.", + "loc.messages.AFC_StorageAccountNotFound": "Das Speicherkonto \"{0}\" wurde nicht gefunden. Die ausgewählte Dienstverbindung \"Dienstprinzipal\" unterstützt nur Speicherkonten des Azure Resource Manager-Typs.", + "loc.messages.AFC_ResourceGroupNotFound": "Die angegebene Ressourcengruppe \"{0}\" ist nicht vorhanden.", + "loc.messages.AFC_GetVMStatus": "[Azure-Aufruf]Der Status für den virtuellen Computer \"{0}\" wird abgerufen.", + "loc.messages.AFC_GetVMStatusComplete": "[Azure-Aufruf]Der Status für den virtuellen Computer \"{0}\" wurde abgerufen.", + "loc.messages.AFC_GetCustomScriptExtension": "[Azure-Aufruf]Die benutzerdefinierte Skripterweiterung \"{0}\" für den virtuellen Computer \"{1}\" wird abgerufen.", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Azure-Aufruf]Die benutzerdefinierte Skripterweiterung \"{0}\" für den virtuellen Computer \"{1}\" wurde abgerufen.", + "loc.messages.AFC_SetCustomScriptExtension": "[Azure-Aufruf]Die benutzerdefinierte Skripterweiterung \"{0}\" für den virtuellen Computer \"{1}\" wird festgelegt.", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Azure-Aufruf]Die benutzerdefinierte Skripterweiterung \"{0}\" für den virtuellen Computer \"{1}\" wird festgelegt.", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Azure-Aufruf]Die benutzerdefinierte Skripterweiterung \"{0}\" für den virtuellen Computer \"{1}\" wird entfernt.", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Azure-Aufruf]Die benutzerdefinierte Skripterweiterung \"{0}\" für den virtuellen Computer \"{1}\" wurde entfernt.", + "loc.messages.AFC_NoNetworkInterface": "[Azure-Aufruf]Es wurde keine Netzwerkschnittstelle mit der ID \"{0}\" des virtuellen Computers unter der Ressourcengruppe \"{1}\" gefunden.", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Azure-Aufruf]Der Name der Ressourcengruppe und die ID des virtuellen Computers dürfen nicht NULL oder leer sein.", + "loc.messages.AFC_AzurePSNotInstalled": "Die erforderliche Mindestversion {0} der Azure PowerShell-Cmdlets ist nicht installiert. Sie können die Anweisungen unter https://azure.microsoft.com/en-in/documentation/articles/powershell-install-configure/ befolgen, um das aktuellste Azure PowerShell-Modul abzurufen.", + "loc.messages.AFC_ClassicStorageAccountNotFound": "Das Speicherkonto \"{0}\" wurde nicht gefunden. Die ausgewählte Dienstverbindung \"Zertifikat\" unterstützt nur Speicherkonten des Typs \"Azure klassisch\".", + "loc.messages.AFC_GenericStorageAccountNotFound": "Das Speicherkonto \"{0}\" wurde nicht gefunden. Bitte geben Sie ein vorhandenes Speicherkonto an.", + "loc.messages.AFC_AzureFileCopyMoreHelp": "Weitere Informationen finden Sie unter {0}.", + "loc.messages.AFC_UploadFilesStorageAccount": "Dateien werden aus dem Quellpfad \"{0}\" in das Speicherkonto \"{1}\" im Container \"{2}\" mit dem Blobpräfix \"{3}\" hochgeladen.", + "loc.messages.AFC_UploadContainerStorageAccount": "Fehler beim Hochladen in den Container \"{0}\" im Speicherkonto \"{1}\" mit dem Blobpräfix \"{2}\": \"{3}\"", + "loc.messages.AFC_UploadFileSuccessful": "Dateien wurden aus dem Quellpfad \"{0}\" in das Speicherkonto \"{1}\" im Container \"{2}\" mit dem Blobpräfix \"{3}\" erfolgreich hochgeladen.", + "loc.messages.AFC_IncorrectTags": "Tags wurden falsch angegeben. Sie müssen das folgende Format aufweisen: \"Role:Web,DB;Location:East US;Dept.:Finance,HR\".", + "loc.messages.AFC_MachineDoesNotExist": "Die folgenden Computer sind in der Ressourcengruppe nicht vorhanden, oder ihre Namen wurde nicht richtig angegeben: {0}. Geben Sie die genauen Namen der Computer an, die in der Ressourcengruppe vorhanden sind. Verwenden Sie Kommas, um mehrere Computernamen zu trennen.", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "\"{0}\" für alle Ressourcen in der folgenden ResourceGroup können nicht abgerufen werden: \"{1}\"", + "loc.messages.AFC_MachineNameFromIdError": "\"{0}\" für \"{1}\"-Ressourcen in der folgenden ResourceGroup können nicht abgerufen werden: \"{2}\"", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "Die Ressource \"{1}\" kann mithilfe der ausgewählten Dienstverbindung \"{0}\" nicht gefunden werden. Die ausgewählte Dienstverbindung \"{0}\" unterstützt nur klassische Ressourcen (Dienstverwaltungsmodell).", + "loc.messages.AFC_NoClassicVMResources": "Unter der Ressourcengruppe \"{0}\" ist kein Computer zum Kopieren vorhanden. Die ausgewählte Dienstverbindung \"{1}\" unterstützt nur virtuelle Computer des Typs \"Azure klassisch\".", + "loc.messages.AFC_NoARMVMResources": "Unter der Ressourcengruppe \"{0}\" ist kein Computer zum Kopieren vorhanden. Die ausgewählte Dienstverbindung \"{1}\" unterstützt nur virtuelle Computer des Typs \"Azure Resource Manager\".", + "loc.messages.AFC_NoGenericVMResources": "Unter der Ressourcengruppe \"{0}\" ist kein Computer zum Kopieren vorhanden.", + "loc.messages.AFC_FilteringNoVMResources": "Unter der Ressourcengruppe ist kein Computer vorhanden: \"{0}\" mit den folgenden {1} \"{2}\".", + "loc.messages.AFC_CopyStarted": "Der Kopiervorgang wurde für den Computer gestartet: \"{0}\"", + "loc.messages.AFC_CopyCompleted": "Kopierstatus für den Computer \"{0}\": \"{1}\"", + "loc.messages.AFC_WinRMHelpMessage": "Wählen Sie zum Beheben von Problemen, die sich auf die WinRM-Dienstverbindung beziehen, die Option \"Kopiervoraussetzungen aktivieren\" in der Aufgabe aus. Wenn diese Einstellung bereits festgelegt ist und die virtuellen Zielcomputer durch einen Lastenausgleich gesichert sind, stellen Sie sicher, dass die Regeln für eingehenden NAT-Datenverkehr für den Zielport (5986) konfiguriert sind. Gilt nur für virtuelle ARM-Computer.", + "loc.messages.AFC_CopyFailed": "Fehler beim Kopieren auf dem Computer \"{0}\". Weitere Informationen finden Sie in den Protokollen.", + "loc.messages.AFC_ParallelCopyFailed": "Fehler beim Kopieren auf mindestens einen Computer. Weitere Informationen finden Sie in den Protokollen.", + "loc.messages.AFC_CopySuccessful": "Dateien wurden erfolgreich aus dem Quellpfad \"{0}\" auf virtuelle Azure-Zielcomputer in der Ressourcengruppe \"{1}\" kopiert.", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "Fehler beim Festlegen der benutzerdefinierten Skripterweiterung \"{0}\" für den virtuellen Computer \"{1}\": {2}", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "Fehler beim Hinzufügen der Netzwerksicherheitsregel: {0}", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "Die benutzerdefinierte Skripterweiterung \"{0}\" kann nicht für den virtuellen Computer \"{1}\" festgelegt werden: {2}", + "loc.messages.AFC_CopyPrereqsFailed": "Fehler beim Aktivieren der Kopiervoraussetzungen. {0}", + "loc.messages.AFC_BlobStorageNotFound": "Das Speicherkonto \"{0}\" wurde nicht gefunden. Bitte geben Sie ein vorhandenes Speicherkonto an.", + "loc.messages.AFC_RootContainerAndDirectory": "Die Option \"/S\" gilt nicht für \"$root\"-Container.", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "Der HTTP-Antwortcode \"{0}\" ist kein gültiger Umleitungsstatuscode.", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "Der Adressheader der Umleitungsantwort ist NULL.", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "\"AzCopy.exe\" wurde mit einem Exitcode ungleich null beendet, während Dateien in den Blobspeicher hochgeladen wurden.", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "Der Speicherkontoschlüssel konnte nicht abgerufen werden. Fehler: {0}", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "Deinstallieren Sie das benutzerdefinierte WinRM-Skript manuell, und wiederholen Sie die Bereitstellung.", + "loc.messages.ExpiredServicePrincipal": "Das Zugriffstoken für Azure konnte nicht abgerufen werden. Stellen Sie sicher, dass der verwendete Dienstprinzipal gültig und nicht abgelaufen ist.", + "loc.messages.UnsupportedAuthScheme": "Nicht unterstütztes Authentifizierungsschema \"{0}\" für Endpunkt.", + "loc.messages.ServicePrincipalError": "Fehler im für die Bereitstellung verwendeten Dienstprinzipal.", + "loc.messages.AzModuleNotFound": "Die Module \"Az.Accounts\" wurden nicht gefunden. Wenn das Modul vor kurzem installiert wurde, wiederholen Sie den Vorgang nach einem Neustart des Azure Pipelines-Task-Agents." +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/en-US/resources.resjson b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/en-US/resources.resjson new file mode 100644 index 000000000000..972283046275 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/en-US/resources.resjson @@ -0,0 +1,92 @@ +{ + "loc.friendlyName": "Azure file copy", + "loc.helpMarkDown": "[Learn more about this task](https://aka.ms/azurefilecopyreadme) and to report any issues with this new version of the task [here](https://github.com/microsoft/azure-pipelines-tasks/issues/new?assignees=&labels=regression%2Cbug&projects=&template=1.regression.yml&title=%5BREGRESSION%5D%3A+)", + "loc.description": "Copy files to Azure Blob Storage or virtual machines", + "loc.instanceNameFormat": "$(Destination) File Copy", + "loc.releaseNotes": "What's new in Version 6.0:
   Support Workload identity federation and [Azure RBAC](https://learn.microsoft.com/en-us/azure/storage/blobs/assign-azure-role-data-access?tabs=portal)", + "loc.input.label.SourcePath": "Source", + "loc.input.help.SourcePath": "Absolute path of the source folder, or file on the local machine, or a UNC share. Expression should return a single folder or a file. Wild card symbol (*) is supported anywhere in the file path or file name.", + "loc.input.label.ConnectedServiceNameARM": "Azure Subscription", + "loc.input.help.ConnectedServiceNameARM": "Azure Resource Manager subscription to target for copying the files.", + "loc.input.label.Destination": "Destination Type", + "loc.input.help.Destination": "Select the destination, either Azure Blob or Azure VMs.", + "loc.input.label.StorageAccountRM": "RM Storage Account", + "loc.input.help.StorageAccountRM": "Specify a pre-existing ARM storage account. It is also used as an intermediary for copying files to Azure VMs", + "loc.input.label.ContainerName": "Container Name", + "loc.input.help.ContainerName": "Name of the Container for uploading the files. If a container with the given name does not exist in the specified storage account, it will automatically be created.
If you need to create a virtual directory inside the container, use the blob prefix input below.
Example: If your target location is https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/, then specify mycontainer as container name and vd1/vd2/ as blob prefix.", + "loc.input.label.BlobPrefix": "Blob Prefix", + "loc.input.help.BlobPrefix": "Useful for filtering files, for example, append build number to all the blobs to download files from that build only. Example: If you specify blob prefix as myvd1/, a virtual directory with this name will be created inside the container. Blob prefix with a trailing '/' will be considered a virtual directory. Otherwise, it will be treated as a file, unless the item being copied is itself a folder. The source files will be copied to https://myaccount.blob.core.windows.net/mycontainer/myvd1/.", + "loc.input.label.EnvironmentNameRM": "Resource Group", + "loc.input.help.EnvironmentNameRM": "Name of the target Resource Group for copying files to.", + "loc.input.label.ResourceFilteringMethod": "Select Machines By", + "loc.input.help.ResourceFilteringMethod": "Optionally, select a subset of VMs in resource group either by providing VMs host name or tags. [Tags](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/) are supported for resources created via the Azure Resource Manager only.", + "loc.input.label.MachineNames": "Filter Criteria", + "loc.input.help.MachineNames": "Provide a list of VMs host name like ffweb, ffdb, or tags like Role:DB, Web; OS:Win8.1. Note the delimiters used for tags are ,(comma), :(colon) and ;(semicolon). If multiple tags are provided, then the task will run in all the VMs with the specified tags. The default is to run the task in all the VMs.", + "loc.input.label.vmsAdminUserName": "Admin Login", + "loc.input.help.vmsAdminUserName": "Administrator Username of the VMs.", + "loc.input.label.vmsAdminPassword": "Password", + "loc.input.help.vmsAdminPassword": "The administrator password of the VMs.
It can accept variable defined in build or release pipelines as '$(passwordVariable)'.
You may mark variable as 'secret' to secure it.", + "loc.input.label.TargetPath": "Destination Folder", + "loc.input.help.TargetPath": "Local path on the target machines for copying the files from the source. Environment variable can be used like $env:windir\\BudgetIT\\Web.", + "loc.input.label.AdditionalArgumentsForBlobCopy": "Optional Arguments (for uploading files to blob)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "Optional AzCopy.exe arguments that will be applied when uploading to blob like, --check-length=true. If no optional arguments are specified here, the following optional arguments will be added by default.
--log-level=INFO (if the pipeline is running in debug mode set --log-level=DEBUG),
--recursive (only if container name is not $root),
--blob-type=PageBlob (only if specified storage account is a premium account).", + "loc.input.label.AdditionalArgumentsForVMCopy": "Optional Arguments (for downloading files to VM)", + "loc.input.help.AdditionalArgumentsForVMCopy": "Optional AzCopy.exe arguments that will be applied when downloading to VM like, --check-length=true. If no optional arguments are specified here, the following optional arguments will be added by default.
--log-level=INFO (if the pipeline is running in debug mode set --log-level=DEBUG),
--recursive", + "loc.input.label.enableCopyPrerequisites": "Enable Copy Prerequisites", + "loc.input.help.enableCopyPrerequisites": "Enabling this option configures Windows Remote Management (WinRM) listener over HTTPS protocol on port 5986, using a self-signed certificate. This configuration is required for performing copy operation on Azure machines. If the target Virtual Machines are backed by a Load balancer, ensure Inbound NAT rules are configured for target port (5986). Applicable only for ARM VMs.", + "loc.input.label.CopyFilesInParallel": "Copy in Parallel", + "loc.input.help.CopyFilesInParallel": "Setting it to true will copy files in parallel to the target machines.", + "loc.input.label.CleanTargetBeforeCopy": "Clean Target", + "loc.input.help.CleanTargetBeforeCopy": "Setting it to true will clean-up the destination folder before copying the files.", + "loc.input.label.skipCACheck": "Test Certificate", + "loc.input.help.skipCACheck": "If this option is selected, client skips the validation that the server certificate is signed by a trusted certificate authority (CA) when connecting over Hypertext Transfer Protocol over Secure Socket Layer (HTTPS).", + "loc.messages.AFC_StorageAccountNotFound": "Storage account: {0} not found. The selected service connection 'Service Principal' supports storage accounts of Azure Resource Manager type only.", + "loc.messages.AFC_ResourceGroupNotFound": "Provided resource group '{0}' does not exist.", + "loc.messages.AFC_GetVMStatus": "[Azure Call]Getting the status for vm '{0}'", + "loc.messages.AFC_GetVMStatusComplete": "[Azure Call]Got the status for vm '{0}'", + "loc.messages.AFC_GetCustomScriptExtension": "[Azure Call]Getting the custom script extension '{0}' for vm '{1}'", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Azure Call]Got the custom script extension '{0}' for vm '{1}'", + "loc.messages.AFC_SetCustomScriptExtension": "[Azure Call]Setting the custom script extension '{0}' for vm '{1}'", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Azure Call]Set the custom script extension '{0}' for vm '{1}'", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Azure Call]Removing the custom script extension '{0}' for vm '{1}'", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Azure Call]Removed the custom script extension '{0}' for vm '{1}'", + "loc.messages.AFC_NoNetworkInterface": "[Azure Call]No network interface found with virtual machine ID {0} under resource group {1}", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Azure Call]Resource group name and virtual machine ID should not be null or empty", + "loc.messages.AFC_AzurePSNotInstalled": "The required minimum version {0} of the Azure Powershell Cmdlets are not installed. You can follow the instructions at https://azure.microsoft.com/en-in/documentation/articles/powershell-install-configure/ to get the latest Azure powershell", + "loc.messages.AFC_ClassicStorageAccountNotFound": "Storage account: {0} not found. The selected service connection 'Certificate' supports storage accounts of Azure Classic type only.", + "loc.messages.AFC_GenericStorageAccountNotFound": "Storage account: {0} not found. Please specify existing storage account", + "loc.messages.AFC_AzureFileCopyMoreHelp": "For more info please refer to {0}", + "loc.messages.AFC_UploadFilesStorageAccount": "Uploading files from source path: '{0}' to storage account: '{1}' in container: '{2}' with blob prefix: '{3}'", + "loc.messages.AFC_UploadContainerStorageAccount": "Upload to container: '{0}' in storage account: '{1}' with blob prefix: '{2}' failed with error: '{3}'", + "loc.messages.AFC_UploadFileSuccessful": "Uploaded files successfully from source path: '{0}' to storage account: '{1}' in container: '{2}' with blob prefix: '{3}'", + "loc.messages.AFC_IncorrectTags": "Tags have been incorrectly specified. They have to be in the format Role:Web,DB;Location:East US;Dept.:Finance,HR", + "loc.messages.AFC_MachineDoesNotExist": "The following machines either do not exist in the resource group or their names have not been specified correctly: {0}. Provide the exact same machine names present in the resource group. Use comma to separate multiple machine names.", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "Unable to get {0} for all resources in ResourceGroup : '{1}'", + "loc.messages.AFC_MachineNameFromIdError": "Unable to get {0} for '{1}' resources in ResourceGroup : '{2}'", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "Unable to find the resource '{1}' using selected service connection '{0}'. Selected service connection '{0}' supports classic resources only (Service Management model).", + "loc.messages.AFC_NoClassicVMResources": "No machine exists under resource group: '{0}' for copy. Selected service connection '{1}' supports Virtual Machines of Azure Classic type only.", + "loc.messages.AFC_NoARMVMResources": "No machine exists under resource group: '{0}' for copy. Selected service connection '{1}' supports Virtual Machines of Azure Resource Manager type only.", + "loc.messages.AFC_NoGenericVMResources": "No machine exists under resource group: '{0}' for copy.", + "loc.messages.AFC_FilteringNoVMResources": "No machine exists under resource group: '{0}' with the following {1} '{2}'.", + "loc.messages.AFC_CopyStarted": "Copy started for machine: '{0}'", + "loc.messages.AFC_CopyCompleted": "Copy status for machine '{0}' : '{1}'", + "loc.messages.AFC_WinRMHelpMessage": "To fix WinRM service connection related issues, select the 'Enable Copy Prerequisites' option in the task. If set already, and the target Virtual Machines are backed by a Load balancer, ensure Inbound NAT rules are configured for target port (5986). Applicable only for ARM VMs.", + "loc.messages.AFC_CopyFailed": "Copy failed on machine '{0}'. Refer logs for more details.", + "loc.messages.AFC_ParallelCopyFailed": "Copy to one or more machines failed. Refer logs for more details.", + "loc.messages.AFC_CopySuccessful": "Copied files from source path: '{0}' to target azure VMs in resource group: '{1}' successfully", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "Setting the custom script extension '{0}' for virtual machine '{1}' failed with error : {2}", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "Failed to add the network security rule: {0}", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "Unable to set the custom script extension '{0}' for virtual machine '{1}': {2}", + "loc.messages.AFC_CopyPrereqsFailed": "Failed to enable copy prerequisites. {0}", + "loc.messages.AFC_BlobStorageNotFound": "Storage account: {0} not found. Please specify existing storage account", + "loc.messages.AFC_RootContainerAndDirectory": "'/S' option is not valid for $root containers.", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "The HTTP response code: '{0}' is not a valid redirect status code", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "Redirect response location header is null.", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "AzCopy.exe exited with non-zero exit code while uploading files to blob storage.", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "Unable to fetch storage account key. Error: '{0}'", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "Uninstall WinRM custom script manually and retry deployment.", + "loc.messages.ExpiredServicePrincipal": "Could not fetch access token for Azure. Verify if the Service Principal used is valid and not expired.", + "loc.messages.UnsupportedAuthScheme": "Unsupported authentication scheme '{0}' for endpoint.", + "loc.messages.ServicePrincipalError": "There was an error with the service principal used for the deployment.", + "loc.messages.AzModuleNotFound": "Could not find the modules: 'Az.Accounts'. If the module was recently installed, retry after restarting the Azure Pipelines task agent." +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/es-ES/resources.resjson b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/es-ES/resources.resjson new file mode 100644 index 000000000000..30ba52347712 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/es-ES/resources.resjson @@ -0,0 +1,94 @@ +{ + "loc.friendlyName": "Copia de archivos de Azure", + "loc.helpMarkDown": "[Obtener más información acerca de esta tarea](https://aka.ms/azurefilecopyreadme)", + "loc.description": "Copiar archivos en Azure Blob Storage o en máquinas virtuales", + "loc.instanceNameFormat": "Copia de archivo $(Destination)", + "loc.releaseNotes": "Novedades de la versión 5.0:
   Compatibilidad con AzCopy.exe versión 10.12.2", + "loc.input.label.SourcePath": "Origen", + "loc.input.help.SourcePath": "Ruta de acceso absoluta de la carpeta de origen, archivo en la máquina local o recurso compartido UNC. La expresión debe devolver un único archivo o carpeta. El uso del símbolo de comodín (*) se admite en cualquier parte de la ruta de acceso del archivo o del nombre de este.", + "loc.input.label.ConnectedServiceNameARM": "Suscripción a Azure", + "loc.input.help.ConnectedServiceNameARM": "Suscripción de Azure Resource Manager de destino para la copia de los archivos.", + "loc.input.label.Destination": "Tipo de destino", + "loc.input.help.Destination": "Seleccione un destino, ya sea un blob de Azure o máquinas virtuales de Azure.", + "loc.input.label.StorageAccountRM": "Cuenta de almacenamiento del Administrador de recursos", + "loc.input.help.StorageAccountRM": "Especifique una cuenta de almacenamiento de ARM preexistente. Se utiliza también como agente intermedio para copiar archivos a máquinas virtuales de Azure.", + "loc.input.label.ContainerName": "Nombre del contenedor", + "loc.input.help.ContainerName": "Nombre del contenedor para cargar los archivos. Si no existe un contenedor con el nombre especificado en la cuenta de almacenamiento especificada, se creará automáticamente.
Si necesita crear un directorio virtual dentro del contenedor, use la entrada de prefijo de blob siguiente.
Ejemplo: Si la ubicación de destino es https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/, especifique mycontainer como nombre de contenedor y vd1/vd2/ como prefijo de blob.", + "loc.input.label.BlobPrefix": "Prefijo de blob", + "loc.input.help.BlobPrefix": "Es útil para filtrar archivos, por ejemplo, anexar el número de compilación a todos los blobs para descargar solo los archivos de esa compilación. Ejemplo: Si especifica el prefijo de blob como myvd1/, se creará un directorio virtual con este nombre dentro del contenedor. El prefijo de blob con un \"/\" final se considerará un directorio virtual. De lo contrario, se tratará como un archivo, a menos que el elemento que se copia sea en sí una carpeta. Los archivos de origen se copiarán en https://myaccount.blob.core.windows.net/mycontainer/myvd1/.", + "loc.input.label.EnvironmentNameRM": "Grupo de recursos", + "loc.input.help.EnvironmentNameRM": "Nombre del Grupo de recursos de destino en el que copiar los archivos.", + "loc.input.label.ResourceFilteringMethod": "Seleccionar máquinas por", + "loc.input.help.ResourceFilteringMethod": "También puede seleccionar un subconjunto de máquinas virtuales del grupo de recursos si proporciona las etiquetas o el nombre de host de las máquinas virtuales. Las [etiquetas](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/) solo son compatibles con los recursos creados mediante Azure Resource Manager.", + "loc.input.label.MachineNames": "Criterios de filtro", + "loc.input.help.MachineNames": "Proporcione una lista de nombres de host de las máquinas virtuales, como ffweb o ffdb, o etiquetas, como Role:DB, Web; OS:Win8.1. Tenga en cuenta que los delimitadores usados para las etiquetas son ,(coma), :(dos puntos) y ;(punto y coma). Si se proporcionan varias etiquetas, la tarea se ejecutará en todas las máquinas virtuales que tengan las etiquetas especificadas. La opción predeterminada es ejecutar la tarea en todas las máquinas virtuales.", + "loc.input.label.vmsAdminUserName": "Inicio de sesión del administrador", + "loc.input.help.vmsAdminUserName": "Nombre de usuario del administrador de las máquinas virtuales.", + "loc.input.label.vmsAdminPassword": "Contraseña", + "loc.input.help.vmsAdminPassword": "La contraseña del administrador de las máquinas virtuales.
Puede aceptar una variable definida en las canalizaciones de compilación o versión como '$(passwordVariable)'.
Marque el tipo de variable como 'secret' para protegerlo.", + "loc.input.label.TargetPath": "Carpeta de destino", + "loc.input.help.TargetPath": "La ruta de acceso local de las máquinas de destino para copiar los archivos del origen. Puede usarse una variable de entorno, por ejemplo, $env:windir\\BudgetIT\\Web.", + "loc.input.label.AdditionalArgumentsForBlobCopy": "Argumentos opcionales (para cargar archivos en el blob)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "Argumentos opcionales de AzCopy.exe que se aplicarán al cargar en blob, como --check-length=true. Si no se especifican argumentos opcionales aquí, se agregarán los siguientes de forma predeterminada.
--log-level=INFO (si la canalización se ejecuta en modo de depuración, establezca --log-level=DEBUG);
--recursive (solo si el nombre del contenedor no es $root);
--blob-type=PageBlob (solo si la cuenta de almacenamiento especificada es una cuenta Premium)", + "loc.input.label.AdditionalArgumentsForVMCopy": "Argumentos opcionales (para descargar archivos en la máquina virtual)", + "loc.input.help.AdditionalArgumentsForVMCopy": "Argumentos opcionales de AzCopy.exe que se aplicarán al descargar en una instancia de VM, como --check-length=true. Si no se especifican argumentos opcionales aquí, se agregarán los siguientes de forma predeterminada.
--log-level=INFO (si la canalización se ejecuta en modo de depuración, establezca --log-level=DEBUG);
--recursive", + "loc.input.label.sasTokenTimeOutInMinutes": "Período de expiración del token de SAS en minutos", + "loc.input.help.sasTokenTimeOutInMinutes": "Especifique el tiempo, en minutos, transcurrido el cual expirará el token de SAS del contenedor. De forma predeterminada, este token expira después de 4 horas.", + "loc.input.label.enableCopyPrerequisites": "Habilitar los requisitos previos de copia", + "loc.input.help.enableCopyPrerequisites": "Al habilitar esta opción, se configura el agente de escucha de Administración remota de Windows (WinRM) a través del protocolo HTTPS en el puerto 5986, mediante un certificado autofirmado. Esta configuración es necesaria para realizar operaciones de copia en máquinas de Azure. Si las máquinas virtuales de destino están respaldadas por un equilibrador de carga, asegúrese de que haya reglas NAT de entrada configuradas para el puerto de destino (5986). Solo se aplica a máquinas virtuales de ARM.", + "loc.input.label.CopyFilesInParallel": "Copiar en paralelo", + "loc.input.help.CopyFilesInParallel": "Si se establece en true, copiará los archivos en paralelo en las máquinas de destino.", + "loc.input.label.CleanTargetBeforeCopy": "Limpiar destino", + "loc.input.help.CleanTargetBeforeCopy": "Si se establece en true, limpiará la carpeta de destino antes de copiar los archivos.", + "loc.input.label.skipCACheck": "Certificado de prueba", + "loc.input.help.skipCACheck": "Si esta opción está seleccionada, el cliente omite la validación relativa a si el certificado del servidor está firmado por una entidad de certificación de confianza al conectar a través del Protocolo de transferencia de hipertexto con cifrado de Capa de sockets seguros (HTTPS).", + "loc.messages.AFC_StorageAccountNotFound": "No se encontró la cuenta de almacenamiento {0}. La conexión de servicio seleccionada 'Entidad de servicio' admite solo cuentas de almacenamiento del tipo Azure Resource Manager.", + "loc.messages.AFC_ResourceGroupNotFound": "El grupo de recursos proporcionado '{0}' no existe.", + "loc.messages.AFC_GetVMStatus": "[Llamada de Azure] Obteniendo el estado de la máquina virtual '{0}'", + "loc.messages.AFC_GetVMStatusComplete": "[Llamada de Azure] Se ha obtenido el estado de la máquina virtual '{0}'", + "loc.messages.AFC_GetCustomScriptExtension": "[Llamada de Azure] Obteniendo la extensión de script personalizado '{0}' para la máquina virtual '{1}'", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Llamada de Azure] Se ha obtenido la extensión de script personalizado '{0}' para la máquina virtual '{1}'", + "loc.messages.AFC_SetCustomScriptExtension": "[Llamada de Azure] Estableciendo la extensión de script personalizado '{0}' para la máquina virtual '{1}'", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Llamada de Azure] Establecer la extensión de script personalizado '{0}' para la máquina virtual '{1}'", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Llamada de Azure] Quitando la extensión de script personalizado '{0}' para la máquina virtual '{1}'", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Llamada de Azure]Se ha quitado la extensión de script personalizado '{0}' para la máquina virtual '{1}'", + "loc.messages.AFC_NoNetworkInterface": "[Llamada de Azure] No se encontró ninguna interfaz de red con el identificador de máquina virtual {0} en el grupo de recursos {1}", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Llamada de Azure] El nombre del grupo de recursos y el id. de máquina virtual no deben ser un valor nulo ni quedarse vacíos", + "loc.messages.AFC_AzurePSNotInstalled": "No está instalada la versión mínima requerida {0} de los cmdlets de Azure PowerShell. Puede seguir las instrucciones de https://azure.microsoft.com/en-in/documentation/articles/powershell-install-configure/ para obtener la versión más reciente de Azure PowerShell", + "loc.messages.AFC_ClassicStorageAccountNotFound": "No se encontró la cuenta de almacenamiento {0}. La conexión de servicio seleccionada 'Certificate' admite solo cuentas de almacenamiento del tipo Azure clásico.", + "loc.messages.AFC_GenericStorageAccountNotFound": "No se encontró la cuenta de almacenamiento: {0}. Especifique una cuenta de almacenamiento existente.", + "loc.messages.AFC_AzureFileCopyMoreHelp": "Para más información, consulte {0}", + "loc.messages.AFC_UploadFilesStorageAccount": "Cargando archivos de la ruta de acceso de origen '{0}' en el contenedor '{1}' de la cuenta de almacenamiento '{2}' con el prefijo de blob '{3}'", + "loc.messages.AFC_UploadContainerStorageAccount": "No se pudo realizar la carga en el contenedor '{0}' de la cuenta de almacenamiento '{1}' con el prefijo de blob '{2}' debido al siguiente error: '{3}'", + "loc.messages.AFC_UploadFileSuccessful": "Los archivos se cargaron correctamente de la ruta de acceso de origen '{0}' a la cuenta de almacenamiento '{1}' en el contenedor '{2}' con el prefijo de blob '{3}'", + "loc.messages.AFC_IncorrectTags": "Las etiquetas se han especificado incorrectamente. Tienen que estar en el formato Role:Web,DB;Location:East US;Dept.:Finance,HR", + "loc.messages.AFC_MachineDoesNotExist": "Las siguientes máquinas no existen en el grupo de recursos o sus nombres no se han especificado correctamente: {0}. Especifique los nombres exactos de las máquinas tal como están en el grupo de recursos, separados por comas.", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "No se pueden obtener {0} para todos los recursos de ResourceGroup: '{1}'", + "loc.messages.AFC_MachineNameFromIdError": "No se puede obtener {0} para '{1}' recursos en ResourceGroup: '{2}'", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "No se encuentra el recurso '{1}' mediante la conexión de servicio seleccionada '{0}'. La conexión de servicio seleccionada '{0}' solo admite recursos clásicos (modelo de administración de servicios).", + "loc.messages.AFC_NoClassicVMResources": "No hay ninguna máquina en el grupo de recursos '{0}' para copiar. La conexión de servicio '{1}' seleccionada admite solo máquinas virtuales de tipo Azure clásico.", + "loc.messages.AFC_NoARMVMResources": "No hay ninguna máquina en el grupo de recursos '{0}' para copiar. La conexión de servicio '{1}' seleccionada admite solo máquinas virtuales de tipo Azure Resource Manager.", + "loc.messages.AFC_NoGenericVMResources": "No existe ninguna máquina en el grupo de recursos: '{0}' para la copia.", + "loc.messages.AFC_FilteringNoVMResources": "No existe ninguna máquina en el grupo de recursos: '{0}' con el siguiente {1} '{2}'.", + "loc.messages.AFC_CopyStarted": "Copia iniciada para la máquina: '{0}'", + "loc.messages.AFC_CopyCompleted": "Estado de copia de la máquina '{0}': '{1}'", + "loc.messages.AFC_WinRMHelpMessage": "Para solucionar problemas relacionados con la conexión de servicio de WinRM, seleccione la opción 'Habilitar los requisitos previos de copia' en la tarea. Si ya están establecidos, y las máquinas virtuales de destino están respaldadas por un equilibrador de carga, asegúrese de que las reglas NAT de entrada están configuradas para el puerto de destino (5986). Solo es aplicable a las máquinas virtuales de ARM.", + "loc.messages.AFC_CopyFailed": "No se pudo copiar en la máquina '{0}'. Consulte los registros para obtener más detalles.", + "loc.messages.AFC_ParallelCopyFailed": "No se pudo copiar en una o varias máquinas. Consulte los registros para obtener más detalles.", + "loc.messages.AFC_CopySuccessful": "Archivos copiados correctamente desde la ruta de origen '{0}' a las máquinas virtuales de Azure de destino en el grupo de recursos: '{1}'", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "No se pudo establecer la extensión de script personalizado '{0}' para la máquina virtual '{1}'. Error: {2}", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "No se pudo agregar la regla de seguridad de red: {0}", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "No se puede establecer la extensión de script personalizado '{0}' para la máquina virtual '{1}': {2}", + "loc.messages.AFC_CopyPrereqsFailed": "No se pudieron habilitar los requisitos previos de copia. {0}", + "loc.messages.AFC_BlobStorageNotFound": "No se encontró la cuenta de almacenamiento: {0}. Especifique una cuenta de almacenamiento existente.", + "loc.messages.AFC_RootContainerAndDirectory": "La opción '/S' no es válida para contenedores de $root.", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "El código de respuesta HTTP '{0}' no es un código de estado de redireccionamiento válido", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "El encabezado de ubicación de la respuesta de redireccionamiento es NULL.", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "AzCopy.exe terminó con el código de salida distinto de cero al cargar archivos en el almacenamiento de blobs.", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "No se puede recuperar la clave de la cuenta de almacenamiento. Error: '{0}'", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "Desinstale el script personalizado de WinRM de forma manual y reintente la implementación.", + "loc.messages.ExpiredServicePrincipal": "No se pudo capturar el token de acceso de Azure. Compruebe que la entidad de servicio usada es válida y no ha expirado.", + "loc.messages.UnsupportedAuthScheme": "Esquema de autenticación no admitido '{0}' para el punto de conexión.", + "loc.messages.ServicePrincipalError": "Error con la entidad de servicio que se usó para la implementación.", + "loc.messages.AzModuleNotFound": "No se pudieron encontrar los módulos: 'Az.Accounts'. Si el módulo se instaló recientemente, vuelva a intentarlo después de reiniciar el agente de tareas de Azure Pipelines." +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/fr-FR/resources.resjson b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/fr-FR/resources.resjson new file mode 100644 index 000000000000..c4cb43f509da --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/fr-FR/resources.resjson @@ -0,0 +1,94 @@ +{ + "loc.friendlyName": "Copie de fichiers Azure", + "loc.helpMarkDown": "[En savoir plus sur cette tâche](https://aka.ms/azurefilecopyreadme)", + "loc.description": "Copier des fichiers sur le Stockage Blob Azure ou des machines virtuelles", + "loc.instanceNameFormat": "Copie de fichiers $(Destination)", + "loc.releaseNotes": "Nouveautés de la version 5.0 :
   Prise en charge d'AzCopy.exe version 10.12.2", + "loc.input.label.SourcePath": "Source", + "loc.input.help.SourcePath": "Chemin absolu du dossier ou fichier source sur la machine locale, ou partage UNC. L'expression doit retourner un seul dossier ou fichier. Le symbole de caractère générique (*) est pris en charge n'importe où dans le chemin ou le nom de fichier.", + "loc.input.label.ConnectedServiceNameARM": "Abonnement Azure", + "loc.input.help.ConnectedServiceNameARM": "Abonnement Azure Resource Manager à cibler pour la copie des fichiers.", + "loc.input.label.Destination": "Type de destination", + "loc.input.help.Destination": "Sélectionnez la destination, objet blob ou machines virtuelles Azure.", + "loc.input.label.StorageAccountRM": "Compte de stockage RM", + "loc.input.help.StorageAccountRM": "Spécifiez un compte de stockage ARM préexistant. Il sert également d'intermédiaire pour la copie de fichiers vers des machines virtuelles Azure", + "loc.input.label.ContainerName": "Nom du conteneur", + "loc.input.help.ContainerName": "Nom du conteneur pour le chargement des fichiers. Si un conteneur portant le nom indiqué n'existe pas dans le compte de stockage spécifié, il est automatiquement créé.
Si vous devez créer un répertoire virtuel dans le conteneur, utilisez l'entrée de préfixe d'objet blob ci-dessous.
Exemple : Si votre emplacement cible est https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/, spécifiez mycontainer comme nom de conteneur et vd1/vd2 comme préfixe d’objet blob.", + "loc.input.label.BlobPrefix": "Préfixe d’objet blob", + "loc.input.help.BlobPrefix": "Utile pour filtrer les fichiers, par exemple, ajouter le numéro de build à tous les objets blob pour télécharger les fichiers à partir de cette build uniquement. Exemple : si vous spécifiez le préfixe d’objet blob myvd1/, un répertoire virtuel portant ce nom est créé dans le conteneur. Le préfixe d’objet blob avec un '/' de fin sera considéré comme un répertoire virtuel. Sinon, il sera traité comme un fichier, sauf si l’élément en cours de copie est lui-même un dossier. Les fichiers sources seront copiés dans https://myaccount.blob.core.windows.net/mycontainer/myvd1/.", + "loc.input.label.EnvironmentNameRM": "Groupe de ressources", + "loc.input.help.EnvironmentNameRM": "Nom du groupe de ressources cible où copier les fichiers.", + "loc.input.label.ResourceFilteringMethod": "Sélectionner les machines par", + "loc.input.help.ResourceFilteringMethod": "Vous pouvez également sélectionner un sous-ensemble de machines virtuelles dans le groupe de ressources, en indiquant les noms d’hôtes ou les balises des machines virtuelles. Les [balises](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/) sont prises en charge pour les ressources créées via Azure Resource Manager uniquement.", + "loc.input.label.MachineNames": "Critères de filtre", + "loc.input.help.MachineNames": "Indiquez une liste de noms d'hôtes de machines virtuelles, par exemple ffweb, ffdb, ou des balises telles que Role:DB, Web; OS:Win8.1. Notez que les délimiteurs employés pour les balises sont ,(virgule), :(deux-points) et ;(point-virgule). Si plusieurs balises sont fournies, la tâche s'exécute sur toutes les machines virtuelles correspondant aux balises spécifiées. Par défaut, la tâche s'exécute sur toutes les machines virtuelles.", + "loc.input.label.vmsAdminUserName": "Connexion d'administrateur", + "loc.input.help.vmsAdminUserName": "Nom d'utilisateur d'administrateur des machines virtuelles.", + "loc.input.label.vmsAdminPassword": "Mot de passe", + "loc.input.help.vmsAdminPassword": "Mot de passe d'administrateur des machines virtuelles.
Il peut accepter une variable définie dans les pipelines de build ou de mise en production sous la forme '$(passwordVariable)'.
Vous pouvez marquer la variable comme étant de type 'secret' pour la sécuriser.", + "loc.input.label.TargetPath": "Dossier de destination", + "loc.input.help.TargetPath": "Chemin d'accès local sur les machines cibles pour la copie des fichiers à partir de la source. Une variable d'environnement peut être utilisée, par ex., $env:windir\\BudgetIT\\Web.", + "loc.input.label.AdditionalArgumentsForBlobCopy": "Arguments facultatifs (pour le chargement des fichiers vers un objet blob)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "Arguments AzCopy.exe facultatifs copiés durant le chargement dans l'objet blob, par exemple --check-length=true. Si aucun argument facultatif n'est spécifié ici, les arguments facultatifs suivants sont ajoutés par défaut.
--log-level=INFO (si le pipeline s'exécute en mode de débogage défini --log-level=DEBUG),
--recursive (uniquement si le nom du conteneur n'est pas $root),
--blob-type=PageBlob (uniquement si le compte de stockage spécifié est un compte premium).", + "loc.input.label.AdditionalArgumentsForVMCopy": "Arguments facultatifs (pour le téléchargement des fichiers sur une machine virtuelle)", + "loc.input.help.AdditionalArgumentsForVMCopy": "Arguments AzCopy.exe facultatifs appliqués durant le téléchargement sur une machine virtuelle, par exemple --check-length=true. Si aucun argument facultatif n'est spécifié ici, les arguments facultatifs suivants sont ajoutés par défaut.
--log-level=INFO (si le pipeline s'exécute en mode de débogage défini --log-level=DEBUG),
--recursive", + "loc.input.label.sasTokenTimeOutInMinutes": "Délai d'expiration du jeton SAP en minutes", + "loc.input.help.sasTokenTimeOutInMinutes": "Indiquez la durée en minutes à partir de laquelle le jeton SAS du conteneur doit expirer. Par défaut, ce jeton expire au bout de 4 heures.", + "loc.input.label.enableCopyPrerequisites": "Activer les conditions préalables à la copie", + "loc.input.help.enableCopyPrerequisites": "L'activation de cette option configure l'écouteur Windows Remote Management (WinRM) via le protocole HTTPS sur le port 5986, à l'aide d'un certificat auto-signé. Cette configuration est obligatoire pour effectuer une opération de copie sur des machines Azure. Si les machines virtuelles cibles sont associées à un équilibreur de charge, vérifiez que des règles NAT de trafic entrant sont configurées pour le port cible (5986). S'applique uniquement aux machines virtuelles ARM.", + "loc.input.label.CopyFilesInParallel": "Copier en parallèle", + "loc.input.help.CopyFilesInParallel": "Si la valeur est true, les fichiers sont copiés en parallèle sur les machines cibles.", + "loc.input.label.CleanTargetBeforeCopy": "Nettoyer la cible", + "loc.input.help.CleanTargetBeforeCopy": "Si la valeur est true, le dossier de destination est nettoyé avant la copie des fichiers.", + "loc.input.label.skipCACheck": "Certificat de test", + "loc.input.help.skipCACheck": "Si cette option est sélectionnée, le client ignore la validation permettant de vérifier que le certificat du serveur est signé par une autorité de certification approuvée lors de la connexion via HTTP ou Secure Socket Layer (HTTPS).", + "loc.messages.AFC_StorageAccountNotFound": "Le compte de stockage {0} est introuvable. La connexion de service sélectionnée, 'Principal du service', prend uniquement en charge les comptes de stockage de type Azure Resource Manager.", + "loc.messages.AFC_ResourceGroupNotFound": "Le groupe de ressources indiqué '{0}' n'existe pas.", + "loc.messages.AFC_GetVMStatus": "[Appel Azure]Obtention de l'état de la machine virtuelle '{0}'", + "loc.messages.AFC_GetVMStatusComplete": "[Appel Azure]Obtention de l'état de la machine virtuelle '{0}'", + "loc.messages.AFC_GetCustomScriptExtension": "[Appel Azure]Obtention de l'extension de script personnalisé '{0}' pour la machine virtuelle '{1}'", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Appel Azure]Obtention réussie de l'extension de script personnalisé '{1}' pour la machine virtuelle '{0}'", + "loc.messages.AFC_SetCustomScriptExtension": "[Appel Azure]Définition de l'extension de script personnalisé '{0}' pour la machine virtuelle '{1}'", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Appel Azure]Définition de l'extension de script personnalisé '{0}' pour la machine virtuelle '{1}'", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Appel Azure]Suppression de l'extension de script personnalisé '{0}' pour la machine virtuelle '{1}'", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Appel Azure]Suppression réussie de l'extension de script personnalisé '{0}' pour la machine virtuelle '{1}'", + "loc.messages.AFC_NoNetworkInterface": "[Appel Azure]Interface réseau introuvable pour l'ID de machine virtuelle {0} dans le groupe de ressources {1}", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Appel Azure]Le nom du groupe de ressources et l'ID de machine virtuelle ne doivent pas avoir la valeur nul ou être vides", + "loc.messages.AFC_AzurePSNotInstalled": "La version minimale nécessaire {0} pour les applets de commande Azure PowerShell n'est pas installée. Vous pouvez suivre les instructions fournies sur https://azure.microsoft.com/fr-fr/documentation/articles/powershell-install-configure/ pour obtenir la dernière version d'Azure PowerShell", + "loc.messages.AFC_ClassicStorageAccountNotFound": "Le compte de stockage {0} est introuvable. La connexion de service sélectionnée, 'Certificat', prend uniquement en charge les comptes de stockage de type Azure Classic.", + "loc.messages.AFC_GenericStorageAccountNotFound": "Le compte de stockage {0} est introuvable. Spécifiez un compte de stockage existant", + "loc.messages.AFC_AzureFileCopyMoreHelp": "Pour plus d'informations, consultez {0}", + "loc.messages.AFC_UploadFilesStorageAccount": "Chargement des fichiers à partir du chemin source '{0}' vers le compte de stockage '{1}' dans le conteneur '{2}' ayant pour préfixe blob '{3}'", + "loc.messages.AFC_UploadContainerStorageAccount": "Échec du chargement vers le conteneur '{0}' dans le compte de stockage '{1}' ayant pour préfixe blob '{2}'. Erreur : '{3}'", + "loc.messages.AFC_UploadFileSuccessful": "Les fichiers ont été chargés correctement du chemin source '{0}' vers le compte de stockage '{1}' dans le conteneur '{2}' ayant pour préfixe blob '{3}'", + "loc.messages.AFC_IncorrectTags": "Les étiquettes ont été spécifiées de manière incorrecte. Elles doivent être au format Role:Web,DB;Location:East US;Dept.:Finance,HR", + "loc.messages.AFC_MachineDoesNotExist": "Les machines suivantes n'existent pas dans le groupe de ressources, ou leurs noms n'ont pas été spécifiés correctement : {0}. Indiquez le nom exact des machines présentes dans le groupe de ressources. Utilisez une virgule pour séparer plusieurs noms de machines.", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "Impossible d'obtenir {0} pour l'ensemble des ressources dans ResourceGroup : '{1}'", + "loc.messages.AFC_MachineNameFromIdError": "Impossible d'obtenir {0} pour les ressources '{1}' dans le ResourceGroup '{2}'", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "La ressource '{1}' est introuvable à l'aide de la connexion de service sélectionnée '{0}'. La connexion de service sélectionnée '{0}' prend en charge uniquement les ressources classiques (modèle de management des services).", + "loc.messages.AFC_NoClassicVMResources": "Il n'existe aucune machine à copier dans le groupe de ressources '{0}'. La connexion de service sélectionnée '{1}' prend uniquement en charge les machines virtuelles de type Azure Classic.", + "loc.messages.AFC_NoARMVMResources": "Il n'existe aucune machine à copier dans le groupe de ressources '{0}'. La connexion de service sélectionnée '{1}' prend uniquement en charge les machines virtuelles de type Azure Resource Manager.", + "loc.messages.AFC_NoGenericVMResources": "Il n'existe aucune machine à copier dans le groupe de ressources '{0}'.", + "loc.messages.AFC_FilteringNoVMResources": "Il n'existe aucune machine dans le groupe de ressources '{0}' avec pour {1} '{2}'.", + "loc.messages.AFC_CopyStarted": "Copie démarrée pour la machine '{0}'", + "loc.messages.AFC_CopyCompleted": "État de la copie pour la machine '{0}' : '{1}'", + "loc.messages.AFC_WinRMHelpMessage": "Pour corriger les problèmes de connexion de service de WinRM, sélectionnez la tâche 'Activer les conditions préalables à la copie' dans la tâche. Si cela est déjà fait, et si les machines virtuelles cibles sont associées à un équilibreur de charge, vérifiez que des règles NAT de trafic entrant sont configurées pour le port cible (5986). Ceci est applicable uniquement aux machines virtuelles ARM.", + "loc.messages.AFC_CopyFailed": "Échec de la copie sur la machine '{0}'. Pour plus d'informations, consultez les journaux.", + "loc.messages.AFC_ParallelCopyFailed": "Échec de la copie vers une ou plusieurs machines. Pour plus d'informations, consultez les journaux.", + "loc.messages.AFC_CopySuccessful": "Fichiers correctement copiés du chemin source '{0}' vers les machines virtuelles Azure cibles du groupe de ressources '{1}'", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "Échec de la définition de l'extension de script personnalisé '{0}' pour la machine virtuelle '{1}'. Erreur : {2}", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "Échec de l'ajout de la règle de sécurité réseau : {0}", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "Impossible de définir l'extension de script personnalisé '{0}' pour la machine virtuelle '{1}' : {2}", + "loc.messages.AFC_CopyPrereqsFailed": "Échec de l'activation des conditions préalables de copie. {0}", + "loc.messages.AFC_BlobStorageNotFound": "Le compte de stockage {0} est introuvable. Spécifiez un compte de stockage existant", + "loc.messages.AFC_RootContainerAndDirectory": "L'option '/S' est non valide pour les conteneurs $root.", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "Le code de réponse HTTP '{0}' n’est pas un code d’état de redirection valide", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "L'en-tête d'emplacement pour la réponse de redirection a une valeur nul.", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "AzCopy.exe s'est arrêté avec un code de sortie différent de zéro durant le chargement des fichiers vers le Stockage Blob.", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "Impossible de récupérer (fetch) la clé du compte de stockage. Erreur : '{0}'", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "Désinstallez manuellement le script personnalisé WinRM, puis réessayez d'effectuer le déploiement.", + "loc.messages.ExpiredServicePrincipal": "Impossible de récupérer (fetch) le jeton d'accès pour Azure. Vérifiez si le principal de service utilisé est valide et s'il n'a pas expiré.", + "loc.messages.UnsupportedAuthScheme": "Schéma d'authentification '{0}' non pris en charge pour le point de terminaison.", + "loc.messages.ServicePrincipalError": "Erreur liée au principal du service utilisé pour le déploiement.", + "loc.messages.AzModuleNotFound": "Les modules 'Az.Accounts' sont introuvables. Si le module a été installé récemment, réessayez l'opération après avoir redémarré l'agent de tâche Azure Pipelines." +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/it-IT/resources.resjson b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/it-IT/resources.resjson new file mode 100644 index 000000000000..6655b79b0087 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/it-IT/resources.resjson @@ -0,0 +1,94 @@ +{ + "loc.friendlyName": "Copia dei file di Azure", + "loc.helpMarkDown": "[Altre informazioni su questa attività](https://aka.ms/azurefilecopyreadme)", + "loc.description": "Copia i file in Archiviazione BLOB di Azure nelle macchine virtuali", + "loc.instanceNameFormat": "Copia dei file $(Destination)", + "loc.releaseNotes": "Novità della versione 5.0:
   Supporto di AzCopy.exe versione10.12.2", + "loc.input.label.SourcePath": "Origine", + "loc.input.help.SourcePath": "Percorso assoluto della cartella o del file di origine nel computer locale oppure condivisione UNC. L'espressione deve restituire una sola cartella o file. Il simbolo del carattere jolly (*) è supportato in qualsiasi punto del percorso o del nome file.", + "loc.input.label.ConnectedServiceNameARM": "Sottoscrizione di Azure", + "loc.input.help.ConnectedServiceNameARM": "Sottoscrizione di Azure Resource Manager usata come destinazione per la copia dei file.", + "loc.input.label.Destination": "Tipo di destinazione", + "loc.input.help.Destination": "Consente di selezionare la destinazione, nel BLOB o nelle macchine virtuali di Azure.", + "loc.input.label.StorageAccountRM": "Account di archiviazione di Gestione risorse", + "loc.input.help.StorageAccountRM": "Consente di specificare un account di archiviazione di ARM preesistente. Viene usato anche come intermediario per la copia dei file nelle macchine virtuali di Azure", + "loc.input.label.ContainerName": "Nome contenitore", + "loc.input.help.ContainerName": "Nome del contenitore per il caricamento dei file. Se nell'account di archiviazione non esiste un contenitore con il nome specificato, verrà creato automaticamente.
Se è necessario creare una directory virtuale all'interno del contenitore, usare il valore di input seguente come prefisso BLOB.
Esempio: se il percorso di destinazione è https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/, specificare contenitore come nome del contenitore e vd1/vd2/ come prefisso BLOB.", + "loc.input.label.BlobPrefix": "Prefisso BLOB", + "loc.input.help.BlobPrefix": "Utile per filtrare i file, ad esempio aggiungere il numero di build a tutti i BLOB per scaricare i file solo da quella build. Esempio: se si specifica il prefisso BLOB come myvd1/, all'interno del contenitore verrà creata una directory virtuale con questo nome. Il prefisso BLOB con '/' finale verrà considerato una directory virtuale. In caso contrario, verrà considerato come file, a meno che l'elemento da copiare non sia di per sé una cartella. I file di origine verranno copiati in https://myaccount.blob.core.windows.net/mycontainer/myvd1/.", + "loc.input.label.EnvironmentNameRM": "Gruppo di risorse", + "loc.input.help.EnvironmentNameRM": "Nome del gruppo di risorse di destinazione in cui copiare i file.", + "loc.input.label.ResourceFilteringMethod": "Seleziona computer per", + "loc.input.help.ResourceFilteringMethod": "Facoltativamente, selezionare un sottoinsieme di macchine virtuali nel gruppo di risorse specificando il nome host o i tag delle macchine virtuali. I [tag](https://learn.microsoft.com/it-it/azure/virtual-machines/tag-template/) sono supportati solo per le risorse create tramite Azure Resource Manager.", + "loc.input.label.MachineNames": "Criteri di filtro", + "loc.input.help.MachineNames": "Consente di specificare un elenco di nomi host di macchine virtuali, come ffweb, ffdb o tag come Role:DB, Web; OS:Win8.1. Nota: i delimitatori usati per i tag sono ,(virgola), :(due punti) e ;(punto e virgola). Se si specificano più tag, l'attività verrà eseguita in tutte le macchine virtuali con i tag specificati. Per impostazione predefinita, l'attività viene eseguita in tutte le macchine virtuali.", + "loc.input.label.vmsAdminUserName": "Account di accesso amministratore", + "loc.input.help.vmsAdminUserName": "Nome utente dell'amministratore delle macchine virtuali.", + "loc.input.label.vmsAdminPassword": "Password", + "loc.input.help.vmsAdminPassword": "Password dell'amministratore per le macchine virtuali.
Può accettare la variabile definita nelle pipeline di compilazione o versione come '$(passwordVariable)'.
Per proteggere la variabile, è possibile contrassegnarla come 'secret'.", + "loc.input.label.TargetPath": "Cartella di destinazione", + "loc.input.help.TargetPath": "Percorso locale nei computer di destinazione per la copia dei file dall'origine. È possibile usare una variabile di ambiente come $env:windir\\BudgetIT\\Web.", + "loc.input.label.AdditionalArgumentsForBlobCopy": "Argomenti facoltativi (per il caricamento dei file nel BLOB)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "Argomenti facoltativi di AzCopy.exe, come --check-length=true, che verranno applicati durante il caricamento nel BLOB. Se non si specifica alcun argomento facoltativo, gli argomenti facoltativi seguenti verranno aggiunti per impostazione predefinita.
--log-level=INFO (se la pipeline è in esecuzione nella modalità di debug impostata --log-level=DEBUG)
--recursive (solo se il nome del contenitore non è $root)
--blob-type=PageBlob (solo se l'account di archiviazione specificato è un account Premium).", + "loc.input.label.AdditionalArgumentsForVMCopy": "Argomenti facoltativi (per il download dei file nella macchina virtuale)", + "loc.input.help.AdditionalArgumentsForVMCopy": "Argomenti facoltativi di AzCopy.exe, come --check-length=true, che verranno applicati durante il download nella macchina virtuale. Se non si specifica alcun argomento facoltativo, gli argomenti facoltativi seguenti verranno aggiunti per impostazione predefinita.
--log-level=INFO (se la pipeline è in esecuzione nella modalità di debug impostata --log-level=DEBUG)
--recursive", + "loc.input.label.sasTokenTimeOutInMinutes": "Periodo di scadenza del token di firma di accesso condiviso in minuti", + "loc.input.help.sasTokenTimeOutInMinutes": "Specificare il tempo in minuti dopo il quale il token di firma di accesso condiviso per il contenitore scadrà. Per impostazione predefinita, questo token scade dopo 4 ore.", + "loc.input.label.enableCopyPrerequisites": "Abilita prerequisiti di copia", + "loc.input.help.enableCopyPrerequisites": "Se si abilita questa opzione, il listener di Gestione remota Windows (WinRM) verrà configurato con il protocollo HTTPS sulla porta 5986 usando un certificato autofirmato. Questa configurazione è necessaria per eseguire l'operazione di copia su computer Azure. Se le macchine virtuali di destinazione sono supportate da un servizio Load Balancer, assicurarsi che le regole NAT in ingresso siano configurate per la porta di destinazione (5986). Applicabile solo per le macchine virtuali ARM.", + "loc.input.label.CopyFilesInParallel": "Copia in parallelo", + "loc.input.help.CopyFilesInParallel": "Se è impostato su true, i file verranno copiati in parallelo nei computer di destinazione.", + "loc.input.label.CleanTargetBeforeCopy": "Pulisci destinazione", + "loc.input.help.CleanTargetBeforeCopy": "Se è impostato su true, la cartella di destinazione verrà pulita prima della copia dei file.", + "loc.input.label.skipCACheck": "Certificato di test", + "loc.input.help.skipCACheck": "Se questa opzione è selezionata, il client non esegue la convalida per verificare che il certificato server sia firmato da un'Autorità di certificazione (CA) attendibile quando si connette tramite il protocollo HTTPS (Hypertext Transfer Protocol over Secure Socket Layer).", + "loc.messages.AFC_StorageAccountNotFound": "L'account di archiviazione {0} non è stato trovato. La connessione al servizio selezionata 'Entità servizio' supporta solo account di archiviazione di tipo Azure Resource Manager.", + "loc.messages.AFC_ResourceGroupNotFound": "Il gruppo di risorse specificato '{0}' non esiste.", + "loc.messages.AFC_GetVMStatus": "[Chiamata di Azure]Recupero dello stato per la macchina virtuale '{0}'", + "loc.messages.AFC_GetVMStatusComplete": "[Chiamata di Azure]Lo stato della macchina virtuale '{0}' è stato recuperato", + "loc.messages.AFC_GetCustomScriptExtension": "[Chiamata di Azure]Recupero dell'estensione per script personalizzati '{0}' per la macchina virtuale '{1}'", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Chiamata di Azure]L'estensione per script personalizzati '{0}' per la macchina virtuale '{1}' è stata recuperata", + "loc.messages.AFC_SetCustomScriptExtension": "[Chiamata di Azure]Impostazione dell'estensione per script personalizzati '{0}' per la macchina virtuale '{1}'", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Chiamata di Azure]L'estensione per script personalizzati '{0}' per la macchina virtuale '{1}' è stata impostata", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Chiamata di Azure]Rimozione dell'estensione per script personalizzati '{0}' per la macchina virtuale '{1}'", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Chiamata di Azure]L'estensione per script personalizzati {0}' per la macchina virtuale '{1}' è stata rimossa", + "loc.messages.AFC_NoNetworkInterface": "[Chiamata di Azure]Non è stata trovata alcuna interfaccia di rete con l'ID macchina virtuale {0} nel gruppo di risorse {1}", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Chiamata di Azure]Il nome del gruppo di risorse e l'ID macchina virtuale non devono essere Null o vuoti", + "loc.messages.AFC_AzurePSNotInstalled": "La versione minima richiesta {0} dei cmdlet di Azure Powershell non è installata. Per scaricare la versione più recente di Azure Powershell, seguire le istruzioni disponibili all'indirizzo https://azure.microsoft.com/it-it/documentation/articles/powershell-install-configure/", + "loc.messages.AFC_ClassicStorageAccountNotFound": "L'account di archiviazione {0} non è stato trovato. La connessione al servizio selezionata 'Certificato' supporta solo account di archiviazione di tipo Azure classico.", + "loc.messages.AFC_GenericStorageAccountNotFound": "L'account di archiviazione {0} non è stato trovato. Specificarne uno esistente", + "loc.messages.AFC_AzureFileCopyMoreHelp": "Per altre informazioni, vedere {0}", + "loc.messages.AFC_UploadFilesStorageAccount": "Il caricamento dei file dal percorso di origine '{0}' nell'account di archiviazione '{1}' nel contenitore '{2}' con prefisso BLOB '{3}' è in corso", + "loc.messages.AFC_UploadContainerStorageAccount": "Il caricamento nel contenitore '{0}' nell'account di archiviazione '{1}' con prefisso BLOB '{2}' non è riuscito. Errore: '{3}'", + "loc.messages.AFC_UploadFileSuccessful": "Il caricamento dei file dal percorso di origine '{0}' nell'account di archiviazione '{1}' nel contenitore '{2}' con prefisso BLOB '{3}' è stato completato", + "loc.messages.AFC_IncorrectTags": "I tag specificati non sono corretti. Specificarli nel formato Ruolo:Web,DB;Località:Stati Uniti orientali;Reparto:Finanza,HR", + "loc.messages.AFC_MachineDoesNotExist": "I computer seguenti non esistono nel gruppo di risorse oppure i relativi nomi non sono stati specificati correttamente: {0}. Specificare gli stessi nomi di computer presenti nel gruppo di risorse e usare la virgola come delimitatore tra più nomi di computer.", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "Non è possibile ottenere {0} per tutte le risorse nel gruppo di risorse '{1}'", + "loc.messages.AFC_MachineNameFromIdError": "Non è possibile ottenere {0} per le risorse '{1}' nel gruppo di risorse '{2}'", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "La risorsa '{1}' non è stata trovata usando la connessione al servizio selezionata '{0}'. La connessione al servizio selezionata {0}' supporta solo risorse classiche (modello di gestione servizi).", + "loc.messages.AFC_NoClassicVMResources": "Nel gruppo di risorse '{0}' non esistono computer per la copia. La connessione al servizio selezionata '{1}' supporta solo macchine virtuali di tipo Azure classico.", + "loc.messages.AFC_NoARMVMResources": "Nel gruppo di risorse '{0}' non esistono computer per la copia. La connessione al servizio selezionata '{1}' supporta solo macchine virtuali di tipo Azure Resource Manager.", + "loc.messages.AFC_NoGenericVMResources": "Nel gruppo di risorse '{0}' non esiste alcun computer per la copia.", + "loc.messages.AFC_FilteringNoVMResources": "Nel gruppo di risorse '{0}' non esiste alcun computer con l'elemento {1} '{2}'.", + "loc.messages.AFC_CopyStarted": "Copia avviata per il computer: '{0}'", + "loc.messages.AFC_CopyCompleted": "Stato della copia per il computer '{0}': '{1}'", + "loc.messages.AFC_WinRMHelpMessage": "Per risolvere i problemi correlati alla connessione al servizio WinRM, selezionare l'opzione 'Abilita prerequisiti di copia' nell'attività. Se l'opzione è già impostata e le macchine virtuali di destinazione sono supportate da un servizio di bilanciamento del carico, assicurarsi che le regole NAT in ingresso siano configurate per la porta di destinazione (5986). Applicabile solo per le macchine virtuali ARM.", + "loc.messages.AFC_CopyFailed": "La copia nel computer '{0}' non è riuscita. Per maggiori dettagli, vedere i log.", + "loc.messages.AFC_ParallelCopyFailed": "La copia in uno o più computer non è riuscita. Per maggiori dettagli, vedere i log.", + "loc.messages.AFC_CopySuccessful": "La copia dei file dal percorso di origine '{0}' alle macchine virtuali di Azure di destinazione nel gruppo di risorse '{1}' è stata completata", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "L'impostazione dell'estensione per script personalizzati '{0}' per la macchina virtuale '{1}' non è riuscita. Errore: {2}", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "Non è stato possibile aggiungere la regola di sicurezza di rete: {0}", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "Non è possibile impostare l'estensione per script personalizzati '{0}' per la macchina virtuale '{1}': {2}", + "loc.messages.AFC_CopyPrereqsFailed": "Non è stato possibile abilitare i prerequisiti di copia. {0}", + "loc.messages.AFC_BlobStorageNotFound": "L'account di archiviazione {0} non è stato trovato. Specificarne uno esistente", + "loc.messages.AFC_RootContainerAndDirectory": "L'opzione '/S' non è valida per i contenitori $root.", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "Il codice di risposta HTTP '{0}' non è un codice di stato di reindirizzamento valido", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "L'intestazione del percorso della risposta di reindirizzamento è Null.", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "AzCopy.exe è stato terminato con il codice di uscita diverso da zero durante il caricamento dei file nell'archivio BLOB.", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "Non è possibile recuperare la chiave dell'account di archiviazione. Errore: '{0}'", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "Disinstallare manualmente lo script personalizzato di WinRM e ripetere la distribuzione.", + "loc.messages.ExpiredServicePrincipal": "Non è stato possibile recuperare il token di accesso per Azure. Verificare che l'entità servizio usata sia valida e non sia scaduta.", + "loc.messages.UnsupportedAuthScheme": "Lo schema di autenticazione '{0}' non è supportato per l'endpoint.", + "loc.messages.ServicePrincipalError": "Si è verificato un errore con l'entità servizio usata per la distribuzione.", + "loc.messages.AzModuleNotFound": "Non è stato possibile trovare i moduli 'Az.Accounts'. Se il modulo è stato installato di recente, riprovare dopo aver riavviato l'agente delle attività Azure Pipelines." +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/ja-JP/resources.resjson b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/ja-JP/resources.resjson new file mode 100644 index 000000000000..5a729f25484c --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/ja-JP/resources.resjson @@ -0,0 +1,94 @@ +{ + "loc.friendlyName": "Azure ファイル コピー", + "loc.helpMarkDown": "[このタスクに関する詳細](https://aka.ms/azurefilecopyreadme)", + "loc.description": "Azure Blob Storage または仮想マシンにファイルをコピーします", + "loc.instanceNameFormat": "$(Destination) ファイル コピー", + "loc.releaseNotes": "バージョン 5.0 の新機能:
   AzCopy.exe バージョン 10.12.2 のサポート", + "loc.input.label.SourcePath": "ソース", + "loc.input.help.SourcePath": "ソース フォルダーまたはローカル コンピューター上のファイルの絶対パス、もしくは UNC 共有。式は単一のフォルダーまたはファイルを返す必要があります。ワイルド カード記号 (*) はファイル パスまたはファイル名の任意の場所で使用できます。", + "loc.input.label.ConnectedServiceNameARM": "Azure サブスクリプション", + "loc.input.help.ConnectedServiceNameARM": "ファイルをコピーする対象の Azure Resource Manager サブスクリプション。", + "loc.input.label.Destination": "コピー先のタイプ", + "loc.input.help.Destination": "Azure BLOB または Azure VM のいずれかをコピー先として選択します。", + "loc.input.label.StorageAccountRM": "RM ストレージ アカウント", + "loc.input.help.StorageAccountRM": "既存の ARM ストレージ アカウントを指定します。Azure VM にファイルをコピーするための仲介役としても使用されます", + "loc.input.label.ContainerName": "コンテナー名", + "loc.input.help.ContainerName": "ファイルをアップロードするためのコンテナーの名前です。指定した名前のコンテナーが指定したストレージ アカウントに存在しない場合、自動的に作成されます。
そのコンテナー内に仮想ディレクトリを作成する必要がある場合は、BLOB プレフィックスの入力を以下のように使用します。
例: 対象の場所が https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/ であれば、コンテナー名を mycontainer と指定し、BLOB プレフィックスを vd1/vd2/ と指定します。", + "loc.input.label.BlobPrefix": "BLOB プレフィックス", + "loc.input.help.BlobPrefix": "ファイルをフィルター処理する場合に便利です。たとえば、すべての BLOB にビルド番号を追加して、そのビルドのみからファイルをダウンロードします。例: BLOB プレフィックスを myvd1/ として指定すると、この名前の仮想ディレクトリがコンテナー内に作成されます。末尾に '/' が付いた BLOB プレフィックスは、仮想ディレクトリとみなされます。それ以外の場合、コピーするアイテム自体がフォルダーでない限り、ファイルとして取り扱われます。ソース ファイルは https://myaccount.blob.core.windows.net/mycontainer/myvd1/ にコピーされます。", + "loc.input.label.EnvironmentNameRM": "リソース グループ", + "loc.input.help.EnvironmentNameRM": "ファイルのコピー先のターゲット リソース グループの名前。", + "loc.input.label.ResourceFilteringMethod": "以下の条件でコンピューターを選択", + "loc.input.help.ResourceFilteringMethod": "必要に応じて、VM ホスト名またはタグを指定してリソース グループ内での VM のサブセットを選びます。[タグ](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/) は、Azure Resource Manager を通して作成されたリソースでのみサポートされています。", + "loc.input.label.MachineNames": "フィルター条件", + "loc.input.help.MachineNames": "VM ホスト名 (ffweb, ffdb) またはタグ (Role:DB, Web; OS:Win8.1) のリストをご指定ください。タグに使用される区切り文字が ,(コンマ)、:(コロン) および ;(セミコロン) であることにご注意ください。複数のタグが指定されている場合、指定されたタグを含むすべての VM でタスクが実行されます。既定値ではすべての VM でタスクが実行されます。", + "loc.input.label.vmsAdminUserName": "管理者ログイン", + "loc.input.help.vmsAdminUserName": "VM の管理者ユーザー名。", + "loc.input.label.vmsAdminPassword": "パスワード", + "loc.input.help.vmsAdminPassword": "VM の管理者パスワード。
ビルドまたはリリース パイプラインで '$(passwordVariable)' として定義された変数を入力することができます。
変数を 'シークレット' とマークしてセキュリティで保護することもできます。", + "loc.input.label.TargetPath": "コピー先フォルダー", + "loc.input.help.TargetPath": "ソースからのファイルのコピー先となるターゲット コンピューター上のローカル パス。$env:windir\\BudgetIT\\Web のように、環境変更を使用できます。", + "loc.input.label.AdditionalArgumentsForBlobCopy": "オプションの引数 (BLOB へのファイルのアップロード用)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "BLOB にアップロードするときに適用される、 --check-length=true などのオプションの AzCopy.exe 引数です。ここでオプション引数を指定しない場合、既定で、次のオプション引数が追加されます。
--log-level=INFO (パイプラインがデバッグ モードで実行されている場合は、--log-level=DEBUG が設定されます)
--recursive (コンテナー名が $root 以外の場合のみ)
--blob-type=PageBlob (指定されたストレージ アカウントが Premium アカウントの場合のみ)。", + "loc.input.label.AdditionalArgumentsForVMCopy": "オプションの引数 (VM へのファイルのダウンロード用)", + "loc.input.help.AdditionalArgumentsForVMCopy": "VM にダウンロードするときに適用される、 --check-length=true などのオプションの AzCopy.exe 引数です。ここでオプション引数を指定しない場合、既定で、次のオプション引数が追加されます。
--log-level=INFO (パイプラインがデバッグ モードで実行されている場合は、--log-level=DEBUG が設定されます)
--recursive", + "loc.input.label.sasTokenTimeOutInMinutes": "SAS トークンの有効期間 (分)", + "loc.input.help.sasTokenTimeOutInMinutes": "コンテナーの SAS トークンの有効期限が切れるまでの時間を分単位で指定します。既定では、このトークンは 4 時間後に有効期限が切れます。", + "loc.input.label.enableCopyPrerequisites": "コピーの前提条件を有効にする", + "loc.input.help.enableCopyPrerequisites": "このオプションを有効にすると、自己署名証明書を使って、Windows リモート管理 (WinRM) リスナーをポート 5986 の HTTPS プロトコル経由で構成できます。この構成は Azure コンピューター上でコピー操作を実行するために必要です。ターゲットの仮想マシンがロード バランサーでバックアップされている場合は、インバウンド NAT 規則がターゲット ポート (5986) に対して構成されていることを確認します。ARM VM にのみ適用されます。", + "loc.input.label.CopyFilesInParallel": "並列でコピー", + "loc.input.help.CopyFilesInParallel": "true に設定すると、ファイルを並列でターゲット コンピューターにコピーします。", + "loc.input.label.CleanTargetBeforeCopy": "ターゲットをクリーンにする", + "loc.input.help.CleanTargetBeforeCopy": "true に設定すると、ファイルをコピーする前にコピー先フォルダーの内容を消去します。", + "loc.input.label.skipCACheck": "テスト証明書", + "loc.input.help.skipCACheck": "このオプションを選ぶと、クライアントは HTTPS (Hypertext Transfer Protocol over Secure Socket Layer) を介して接続するときに、サーバー証明書が信頼できる証明機関 (CA) によって署名されていることの検証をスキップします。", + "loc.messages.AFC_StorageAccountNotFound": "ストレージ アカウント: {0} は見つかりません。選択されたサービス接続 'Service Principal' は、種類が Azure Resource Manager のストレージ アカウントのみをサポートします。", + "loc.messages.AFC_ResourceGroupNotFound": "指定されたリソース グループ '{0}' は存在しません。", + "loc.messages.AFC_GetVMStatus": "[Azure の呼び出し]VM '{0}' の状態を取得しています", + "loc.messages.AFC_GetVMStatusComplete": "[Azure の呼び出し]VM '{0}' の状態を取得しました", + "loc.messages.AFC_GetCustomScriptExtension": "[Azure の呼び出し]VM '{1}' のカスタム スクリプト拡張機能 '{0}' を取得しています", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Azure の呼び出し]VM '{1}' のカスタム スクリプト拡張機能 '{0}' を取得しました", + "loc.messages.AFC_SetCustomScriptExtension": "[Azure の呼び出し]VM '{1}' のカスタム スクリプト拡張機能 '{0}' を設定しています", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Azure の呼び出し]VM '{1}' のカスタム スクリプト拡張機能 '{0}' を設定しました", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Azure の呼び出し]VM '{1}' のカスタム スクリプト拡張機能 '{0}' を削除しています", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Azure の呼び出し]VM '{1}' のカスタム スクリプト拡張機能 '{0}' を削除しました", + "loc.messages.AFC_NoNetworkInterface": "[Azure の呼び出し]リソース グループ {1} の下に仮想マシン ID が {0} のネットワーク インターフェイスが見つかりませんでした", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Azure の呼び出し]リソース グループ名と仮想マシン ID を null または空白にすることはできません", + "loc.messages.AFC_AzurePSNotInstalled": "Azure PowerShell コマンドレットの必須の最小バージョン {0} がインストールされていません。https://azure.microsoft.com/ja-jp/documentation/articles/powershell-install-configure/ にある指示に従って、最新の Azure PowerShell を入手できます", + "loc.messages.AFC_ClassicStorageAccountNotFound": "ストレージ アカウント: {0} 見つかりません。選択したサービス接続 'Certificate' では、Azure クラシック タイプのストレージ アカウントのみがサポートされます。", + "loc.messages.AFC_GenericStorageAccountNotFound": "ストレージ アカウント {0} が見つかりません。既存のストレージ アカウントを指定してください", + "loc.messages.AFC_AzureFileCopyMoreHelp": "詳細については、{0} を参照してください", + "loc.messages.AFC_UploadFilesStorageAccount": "ソース パス '{0}' からコンテナー: '{2}' 内のストレージ アカウント: '{1}' に BLOB プレフィックス: '{3}' でファイルをアップロードしています:", + "loc.messages.AFC_UploadContainerStorageAccount": "ストレージ アカウント: '{1}'(BLOB プレフィックス: '{2}') のコンテナー '{0}' へのアップロードは、エラー: '{3}' で失敗しました", + "loc.messages.AFC_UploadFileSuccessful": "ソース パス '{0}' からコンテナー: '{2}' のストレージ アカウント: '{1}' にファイルが BLOB プレフィックス: '{3}' で正常にアップロードされました", + "loc.messages.AFC_IncorrectTags": "タグが正しく指定されていません。次の形式にする必要があります: Role:Web,DB;Location:East US;Dept.:Finance,HR", + "loc.messages.AFC_MachineDoesNotExist": "次のコンピューターが、リソース グループ内に見つからないか、名前の指定が正しくありません: {0}。リソース グループ内に存在するコンピューター名と正確に同じコンピューター名を指定してください。複数のコンピューター名を区切るにはコンマを使用します。", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "ResourceGroup '{1}' のすべてのリソースに対して {0} を取得できません", + "loc.messages.AFC_MachineNameFromIdError": "ResourceGroup '{2}' の '{1}' つのリソースに対して {0} を取得できません", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "選択されたサービス接続 '{0}' を使用して、リソース '{1}' を見つけることができません。選択されたサービス接続 '{0}' は、クラシック リソース (サービス管理モデル) のみをサポートします。", + "loc.messages.AFC_NoClassicVMResources": "リソース グループ '{0}' の下にコピー対象のマシンは存在しません。選択したサービス接続 '{1}' は Azure クラシック タイプの仮想マシンのみをサポートしています。", + "loc.messages.AFC_NoARMVMResources": "リソース グループ '{0}' にコピー用のマシンが存在しません。選択したサービス接続 '{1}' では、Azure Resource Manager タイプの Virtual Machines のみがサポートされます。", + "loc.messages.AFC_NoGenericVMResources": "リソース グループ '{0}' にコピー用のマシンが存在しません。", + "loc.messages.AFC_FilteringNoVMResources": "リソース グループ '{0}' に次の {1} '{2}' を持つマシンが存在しません。", + "loc.messages.AFC_CopyStarted": "コンピューター: '{0}' のコピーが開始されました", + "loc.messages.AFC_CopyCompleted": "コンピューター '{0}' のコピーの状態: '{1}'", + "loc.messages.AFC_WinRMHelpMessage": "WinRM サービス接続に関連する問題を修正するには、タスクで [コピーの前提条件を有効にする] オプションを選びます。既に設定されており、対象の Virtual Machines がロード バランサーの対象となっている場合は、インバウンド NAT 規則がターゲット ポート (5986) 用に構成されていることを確認してください。ARM VM にのみ適用されます。", + "loc.messages.AFC_CopyFailed": "マシン '{0}' でコピーに失敗しました。詳細についてはログを参照してください。", + "loc.messages.AFC_ParallelCopyFailed": "1 台または複数のマシンへのコピーが失敗しました。詳細についてはログを参照してください。", + "loc.messages.AFC_CopySuccessful": "ソース パス '{0}' からリソース グループ '{1}' 内のターゲット Azure VM へのファイルのコピーが正常に完了しました", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "仮想マシン '{1}' のカスタム スクリプト拡張機能 '{0}' を設定できませんでした。エラー: {2}", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "ネットワークのセキュリティ規則を追加できませんでした: {0}", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "仮想マシン '{1}' のカスタム スクリプト拡張機能 '{0}' を設定できません: {2}", + "loc.messages.AFC_CopyPrereqsFailed": "コピーの前提条件を有効にすることができませんでした。{0}", + "loc.messages.AFC_BlobStorageNotFound": "ストレージ アカウント {0} が見つかりません。既存のストレージ アカウントを指定してください", + "loc.messages.AFC_RootContainerAndDirectory": "$root コンテナーには、'/S' オプションは無効です。", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "HTTP 応答コード: '{0}' は無効なリダイレクト状態コードです。", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "リダイレクト応答の場所ヘッダーが null です。", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "AzCopy.exe が Blob Storage にファイルをアップロードしている間に、ゼロ以外の終了コードで終了しました。", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "ストレージ アカウント キーをフェッチできません。エラー: '{0}'", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "WinRM カスタム スクリプトを手動でアンインストールしてから、デプロイを再試行してください。", + "loc.messages.ExpiredServicePrincipal": "Azure のアクセス トークンをフェッチできませんでした。使用されているサービス プリンシパルが有効であり、有効期限が切れていないことを確認してください。", + "loc.messages.UnsupportedAuthScheme": "'{0}' はエンドポイントではサポートされていない認証スキームです。", + "loc.messages.ServicePrincipalError": "デプロイに使用されたサービス プリンシパルにエラーがありました。", + "loc.messages.AzModuleNotFound": "モジュール 'Az.Accounts' が見つかりませんでした。モジュールが最近インストールされた場合は、Azure Pipelines タスク エージェントを再起動してから再試行してください。" +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/ko-KR/resources.resjson b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/ko-KR/resources.resjson new file mode 100644 index 000000000000..3a3942bd8693 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/ko-KR/resources.resjson @@ -0,0 +1,94 @@ +{ + "loc.friendlyName": "Azure 파일 복사", + "loc.helpMarkDown": "[이 작업에 대한 자세한 정보](https://aka.ms/azurefilecopyreadme)", + "loc.description": "Azure Blob Storage 또는 가상 머신에 파일을 복사합니다.", + "loc.instanceNameFormat": "$(Destination) 파일 복사", + "loc.releaseNotes": "버전 5.0의 새로운 기능:
   AzCopy.exe 버전 10.12.2 지원", + "loc.input.label.SourcePath": "원본", + "loc.input.help.SourcePath": "소스 폴더, 로컬 머신의 파일 또는 UNC 공유에 대한 절대 경로입니다. 식은 단일 폴더 또는 파일을 반환해야 합니다. 와일드카드 기호(*)는 파일 경로 또는 파일 이름의 모든 위치에서 지원됩니다.", + "loc.input.label.ConnectedServiceNameARM": "Azure 구독", + "loc.input.help.ConnectedServiceNameARM": "파일 복사를 위한 대상으로 지정할 Azure Resource Manager 구독입니다.", + "loc.input.label.Destination": "대상 유형", + "loc.input.help.Destination": "대상으로 Azure Blob 또는 Azure VM 중 하나를 선택합니다.", + "loc.input.label.StorageAccountRM": "RM 저장소 계정", + "loc.input.help.StorageAccountRM": "기존 ARM 저장소 계정을 지정합니다. 파일을 Azure VM에 복사하기 위한 중간자로도 사용됩니다.", + "loc.input.label.ContainerName": "컨테이너 이름", + "loc.input.help.ContainerName": "파일을 업로드하기 위한 컨테이너의 이름입니다. 지정한 스토리지 계정에 지정된 이름을 가진 컨테이너가 없을 경우 자동으로 만들어집니다.
컨테이너 안에 가상 디렉터리를 만들어야 하는 경우 아래 Blob 접두사 입력을 사용하세요.
예: 대상 위치가 https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/인 경우 mycontainer를 컨테이너 이름으로, vd1/vd2/를 Blob 접두사로 지정하세요.", + "loc.input.label.BlobPrefix": "Blob 접두사", + "loc.input.help.BlobPrefix": "파일을 필터링하는 데 유용합니다. 예를 들어 모든 Blob에 빌드 번호를 추가하여 해당 빌드에서만 파일을 다운로드할 수 있습니다. 예: Blob 접두사를 myvd1/로 지정하면 이 이름의 가상 디렉터리가 컨테이너 내부에 만들어집니다. 후행 '/'가 있는 Blob 접두사는 가상 디렉터리로 간주됩니다. 후행 '/'가 없으면 복사되는 항목 자체가 폴더가 아니라면 파일로 처리됩니다. 원본 파일이 https://myaccount.blob.core.windows.net/mycontainer/myvd1/로 복사됩니다.", + "loc.input.label.EnvironmentNameRM": "리소스 그룹", + "loc.input.help.EnvironmentNameRM": "파일을 복사할 대상 리소스 그룹의 이름입니다.", + "loc.input.label.ResourceFilteringMethod": "컴퓨터 선택 기준", + "loc.input.help.ResourceFilteringMethod": "필요한 경우 VM 호스트 이름이나 태그를 제공하여 리소스 그룹에서 VM의 하위 집합을 선택합니다. [태그](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/)는 Azure Resource Manager를 통해 만든 리소스에만 지원됩니다.", + "loc.input.label.MachineNames": "필터 조건", + "loc.input.help.MachineNames": "ffweb, ffdb 등과 같은 VMs 호스트 이름이나 Role:DB, Web; OS:Win8.1 등과 같은 태그의 목록을 지정하세요. 태그에 사용되는 구분 기호는 ,(쉼표), :(콜론) 및 ;(세미콜론)입니다. 여러 태그를 지정하는 경우 작업이 지정된 태그가 있는 모든 VM에서 실행됩니다. 기본값은 모든 VM에서 작업을 실행하는 것입니다.", + "loc.input.label.vmsAdminUserName": "관리자 로그인", + "loc.input.help.vmsAdminUserName": "VM의 관리자 사용자 이름입니다.", + "loc.input.label.vmsAdminPassword": "암호", + "loc.input.help.vmsAdminPassword": "VM의 관리자 암호입니다.
빌드 또는 릴리스 파이프라인에서 '$(passwordVariable)'(으)로 정의된 변수를 사용할 수 있습니다.
변수를 'secret'으로 표시하여 보호할 수도 있습니다.", + "loc.input.label.TargetPath": "대상 폴더", + "loc.input.help.TargetPath": "소스에서 파일을 복사하기 위한 대상 컴퓨터의 로컬 경로입니다. $env:windir\\BudgetIT\\Web과 같은 환경 변수를 사용할 수 있습니다.", + "loc.input.label.AdditionalArgumentsForBlobCopy": "선택적 인수(Blob에 파일을 업로드하는 경우)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "Blob으로 업로드할 때 적용되는 선택적 AzCopy.exe 인수(예: --check-length=true)입니다. 여기에서 선택적 인수를 지정하지 않으면 다음과 같은 선택적 인수가 기본적으로 추가됩니다.
--log-level=INFO(파이프라인이 디버그 모드에서 실행되는 경우 --log-level=DEBUG 설정),
--recursive(컨테이너 이름이 $root가 아닌 경우에만),
--blob-type=PageBlob(지정한 스토리지 계정이 프리미엄 계정인 경우에만)", + "loc.input.label.AdditionalArgumentsForVMCopy": "선택적 인수(VM에 파일을 다운로드하는 경우)", + "loc.input.help.AdditionalArgumentsForVMCopy": "VM으로 다운로드할 때 적용되는 선택적 AzCopy.exe 인수(예: --check-length=true)입니다. 여기에서 선택적 인수를 지정하지 않으면 다음과 같은 선택적 인수가 기본적으로 추가됩니다.
--log-level=INFO(파이프라인이 디버그 모드에서 실행되는 경우 --log-level=DEBUG 설정),
--recursive", + "loc.input.label.sasTokenTimeOutInMinutes": "SAS 토큰 만료 기간(분)", + "loc.input.help.sasTokenTimeOutInMinutes": "컨테이너에 대한 SAS 토큰이 만료되기까지의 시간(분)을 제공합니다. 기본적으로 이 토큰은 4시간 후에 만료됩니다.", + "loc.input.label.enableCopyPrerequisites": "복사 필수 구성 요소 사용", + "loc.input.help.enableCopyPrerequisites": "이 옵션을 사용하도록 설정하면 자체 서명된 인증서를 사용하여 포트 5986의 HTTP 프로토콜에서 WinRM(Windows 원격 관리) 수신기가 구성됩니다. 이 구성은 Azure 컴퓨터에서 복사 작업을 수행하는 데 필요합니다. 대상 가상 머신이 Load Balancer에서 지원되는 경우 인바운드 NAT 규칙이 대상 포트(5986)에 대해 구성되었는지 확인하세요. ARM VM에 대해서만 적용할 수 있습니다.", + "loc.input.label.CopyFilesInParallel": "동시 복사", + "loc.input.help.CopyFilesInParallel": "true로 설정하면 파일이 대상 컴퓨터에 동시에 복사됩니다.", + "loc.input.label.CleanTargetBeforeCopy": "클린 대상", + "loc.input.help.CleanTargetBeforeCopy": "true로 설정하면 파일을 복사하기 전에 대상 폴더가 정리됩니다.", + "loc.input.label.skipCACheck": "테스트 인증서", + "loc.input.help.skipCACheck": "이 옵션을 선택하면 클라이언트에서 HTTPS(Hypertext Transfer Protocol over Secure Socket Layer)를 통해 연결할 때 서버 인증서에 신뢰할 수 있는 CA(인증 기관)의 서명이 있는지 확인하는 단계를 건너뜁니다.", + "loc.messages.AFC_StorageAccountNotFound": "스토리지 계정 {0}을(를) 찾을 수 없습니다. 선택한 서비스 연결 'Service Principal'은 Azure Resource Manager 유형의 스토리지 계정만 지원합니다.", + "loc.messages.AFC_ResourceGroupNotFound": "제공된 리소스 그룹 '{0}'이(가) 없습니다.", + "loc.messages.AFC_GetVMStatus": "[Azure 호출]VM '{0}'의 상태를 가져오는 중", + "loc.messages.AFC_GetVMStatusComplete": "[Azure 호출]VM '{0}'의 상태를 가져왔습니다.", + "loc.messages.AFC_GetCustomScriptExtension": "[Azure 호출]VM '{1}'의 사용자 지정 스크립트 확장 '{0}'을(를) 가져오는 중", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Azure 호출]VM '{1}'의 사용자 지정 스크립트 확장 '{0}'을(를) 가져왔습니다.", + "loc.messages.AFC_SetCustomScriptExtension": "[Azure 호출]VM '{1}'의 사용자 지정 스크립트 확장 '{0}'을(를) 설정하는 중", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Azure 호출]VM '{1}'의 사용자 지정 스크립트 확장 '{0}'을(를) 설정했습니다.", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Azure 호출]VM '{1}'의 사용자 지정 스크립트 확장 '{0}'을(를) 제거하는 중", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Azure 호출]VM '{1}'의 사용자 지정 스크립트 확장 '{0}'을(를) 제거했습니다.", + "loc.messages.AFC_NoNetworkInterface": "[Azure 호출]리소스 그룹 {1}에 가상 머신 ID가 {0}인 네트워크 인터페이스가 없습니다.", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Azure 호출]리소스 그룹 이름 및 가상 머신 ID는 null이거나 비워 둘 수 없습니다.", + "loc.messages.AFC_AzurePSNotInstalled": "필요한 Azure PowerShell Cmdlet의 최소 버전 {0}이(가) 설치되어 있지 않습니다. https://azure.microsoft.com/ko-kr/documentation/articles/powershell-install-configure/의 지침에 따라 최신 Azure PowerShell을 다운로드할 수 있습니다.", + "loc.messages.AFC_ClassicStorageAccountNotFound": "스토리지 계정 {0}을(를) 찾을 수 없습니다. 선택한 서비스 연결 'Certificate'는 Azure 클래식 유형의 스토리지 계정만 지원합니다.", + "loc.messages.AFC_GenericStorageAccountNotFound": "저장소 계정 {0}을(를) 찾을 수 없습니다. 기존 저장소 계정을 지정하세요.", + "loc.messages.AFC_AzureFileCopyMoreHelp": "자세한 내용은 {0}을(를) 참조하세요.", + "loc.messages.AFC_UploadFilesStorageAccount": "Blob 접두사 '{3}'(으)로 소스 경로 '{0}'의 파일을 '{2}' 컨테이너의 저장소 계정 '{1}'에 업로드하는 중", + "loc.messages.AFC_UploadContainerStorageAccount": "Blob 접두사 '{2}'(으)로 저장소 계정 '{1}'에 '{0}' 컨테이너를 업로드하지 못했습니다. 오류: '{3}'", + "loc.messages.AFC_UploadFileSuccessful": "Blob 접두사 '{3}'(으)로 소스 경로 '{0}'의 파일을 '{2}' 컨테이너의 저장소 계정 '{1}'에 업로드했습니다.", + "loc.messages.AFC_IncorrectTags": "태그가 잘못 지정되었습니다. 태그는 Role:Web,DB;Location:East US;Dept.:Finance,HR 형식이어야 합니다.", + "loc.messages.AFC_MachineDoesNotExist": "다음 컴퓨터는 리소스 그룹에 없거나 해당 이름이 올바르게 지정되지 않았습니다. {0}. 리소스 그룹에 있는 그대로 정확하게 같은 컴퓨터 이름을 제공하세요. 여러 컴퓨터 이름을 구분하려면 쉼표를 사용하세요.", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "ResourceGroup '{1}'에서 모든 리소스에 대한 {0}을(를) 가져올 수 없습니다.", + "loc.messages.AFC_MachineNameFromIdError": "ResourceGroup '{2}'에서 '{1}' 리소스에 대한 {0}을(를) 가져올 수 없습니다.", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "선택한 서비스 연결 '{0}'을(를) 사용하여 '{1}' 리소스를 찾을 수 없습니다. 선택한 서비스 연결 '{0}'은(는) 클래식 리소스만 지원합니다(서비스 관리 모델).", + "loc.messages.AFC_NoClassicVMResources": "복사에 사용할 머신이 리소스 그룹 '{0}'에 없습니다. 선택한 서비스 연결 '{1}'은(는) Azure 클래식 유형의 Virtual Machines만 지원합니다.", + "loc.messages.AFC_NoARMVMResources": "복사에 사용할 머신이 리소스 그룹 '{0}'에 없습니다. 선택한 서비스 연결 '{1}'은(는) Azure Resource Manager 유형의 Virtual Machines만 지원합니다.", + "loc.messages.AFC_NoGenericVMResources": "복사에 사용할 컴퓨터가 리소스 그룹 '{0}'에 없습니다.", + "loc.messages.AFC_FilteringNoVMResources": "다음의 {1} '{2}'을(를) 포함하는 컴퓨터가 리소스 그룹 '{0}'에 없습니다.", + "loc.messages.AFC_CopyStarted": "다음 컴퓨터에 대한 복사 시작됨: '{0}'", + "loc.messages.AFC_CopyCompleted": "'{0}' 컴퓨터의 상태 복사: '{1}'", + "loc.messages.AFC_WinRMHelpMessage": "WinRM 서비스 연결 관련 문제를 해결하려면 작업에서 '복사 필수 구성 요소 사용' 옵션을 선택하세요. 이미 설정되어 있고 대상 가상 머신이 부하 분산 장치로 지원되면 대상 포트(5986)에 대해 인바운드 NAT 규칙이 구성되어 있는지 확인합니다. ARM VM에만 적용됩니다.", + "loc.messages.AFC_CopyFailed": "'{0}' 머신에 복사하지 못했습니다. 자세한 내용은 로그를 참조하세요.", + "loc.messages.AFC_ParallelCopyFailed": "하나 이상의 머신에 복사하지 못했습니다. 자세한 내용은 로그를 참조하세요.", + "loc.messages.AFC_CopySuccessful": "소스 경로 '{0}'의 파일을 리소스 그룹의 대상 Azure VM '{1}'에 복사했습니다.", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "가상 머신 '{1}'의 사용자 지정 스크립트 확장 '{0}'을(를) 설정하지 못했습니다. 오류: {2}", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "네트워크 보안 규칙 {0}을(를) 추가하지 못했습니다.", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "가상 머신 '{1}'의 사용자 지정 스크립트 확장 '{0}'을(를) 설정할 수 없습니다. {2}", + "loc.messages.AFC_CopyPrereqsFailed": "복사 필수 구성 요소를 사용하도록 설정하지 못했습니다. {0}", + "loc.messages.AFC_BlobStorageNotFound": "저장소 계정 {0}을(를) 찾을 수 없습니다. 기존 저장소 계정을 지정하세요.", + "loc.messages.AFC_RootContainerAndDirectory": "$root 컨테이너에 대해 '/S' 옵션이 잘못되었습니다.", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "HTTP 응답 코드: '{0}'은(는) 유효한 리디렉션 상태 코드가 아닙니다.", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "리디렉션 응답 위치 헤더가 null입니다.", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "Blob Storage에 파일을 업로드하는 중 AzCopy.exe가 0이 아닌 종료 코드로 종료되었습니다.", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "스토리지 계정 키를 페치할 수 없습니다. 오류: '{0}'", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "WinRM 사용자 지정 스크립트를 수동으로 제거하고 배포를 다시 시도하세요.", + "loc.messages.ExpiredServicePrincipal": "Azure의 액세스 토큰을 페치할 수 없습니다. 사용한 서비스 주체가 유효하고 만료되지 않았는지 확인하세요.", + "loc.messages.UnsupportedAuthScheme": "엔드포인트에 대해 인증 체계 '{0}'은(는) 지원되지 않습니다.", + "loc.messages.ServicePrincipalError": "배포에 사용되는 서비스 사용자에 오류가 발생했습니다.", + "loc.messages.AzModuleNotFound": "'Az.Accounts' 모듈을 찾을 수 없습니다. 모듈이 최근에 설치된 경우 Azure Pipelines 작업 에이전트를 다시 시작한 후 다시 시도하세요." +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/ru-RU/resources.resjson b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/ru-RU/resources.resjson new file mode 100644 index 000000000000..19fb9e0370f3 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/ru-RU/resources.resjson @@ -0,0 +1,94 @@ +{ + "loc.friendlyName": "Копирование файлов Azure", + "loc.helpMarkDown": "[См. дополнительные сведения об этой задаче](https://aka.ms/azurefilecopyreadme)", + "loc.description": "Копировать файлы в хранилище BLOB-объектов Azure или виртуальные машины", + "loc.instanceNameFormat": "Копирование файлов $(Destination)", + "loc.releaseNotes": "Новые возможности версии 5.0:
   поддержка AzCopy.exe версии 10.12.2", + "loc.input.label.SourcePath": "Источник", + "loc.input.help.SourcePath": "Абсолютный путь к исходной папке или файлу на локальном компьютере или общему ресурсу UNC. Выражение должно возвращать одну папку или один файл. Подстановочный знак (*) поддерживается в любом месте пути к файлу или имени файла.", + "loc.input.label.ConnectedServiceNameARM": "Подписка Azure", + "loc.input.help.ConnectedServiceNameARM": "Подписка на Azure Resource Manager, предназначенная для копирования файлов.", + "loc.input.label.Destination": "Целевой тип", + "loc.input.help.Destination": "Выберите назначение: BLOB-объект Azure или виртуальные машины Azure.", + "loc.input.label.StorageAccountRM": "Учетная запись хранения Диспетчера ресурсов", + "loc.input.help.StorageAccountRM": "Укажите существующую учетную запись хранения ARM. Она также используется в качестве промежуточной для копирования файлов на виртуальные машины Azure", + "loc.input.label.ContainerName": "Имя контейнера", + "loc.input.help.ContainerName": "Имя контейнера для отправки файлов. Если контейнер с данным именем не существует в указанной учетной записи хранения, он будет создан автоматически.
Для создания виртуального каталога внутри контейнера используйте приведенный ниже входной префикс BLOB-объекта.
Пример. Если конечным расположением является https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/, укажите mycontainer в качестве имени контейнера и vd1/vd2/ в качестве префикса BLOB-объекта.", + "loc.input.label.BlobPrefix": "Префикс BLOB-объекта", + "loc.input.help.BlobPrefix": "Удобно для фильтрации файлов, например добавьте номер сборки ко всем BLOB-объектам для скачивания файлов только из этой сборки. Пример. Если префикс BLOB-объекта указан как myvd1/, в контейнере будет создан виртуальный каталог с таким именем. Префикс BLOB-объекта с конечным \"/\" будет считаться виртуальным каталогом. В противном случае он будет рассматриваться как файл, если копируемый элемент не является папкой. Исходные файлы будут скопированы в https://myaccount.blob.core.windows.net/mycontainer/myvd1/.", + "loc.input.label.EnvironmentNameRM": "Группа ресурсов", + "loc.input.help.EnvironmentNameRM": "Название целевой группы ресурсов, в которую копируются файлы.", + "loc.input.label.ResourceFilteringMethod": "Выбор компьютеров по", + "loc.input.help.ResourceFilteringMethod": "Можно также выбрать подмножество виртуальных машин в группе ресурсов, указав имя узла виртуальных машин или теги. [Теги](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/) поддерживаются только для ресурсов, созданных в Azure Resource Manager.", + "loc.input.label.MachineNames": "Условия фильтра", + "loc.input.help.MachineNames": "Укажите список имен узлов виртуальных машин (например, ffweb, ffdb) или тегов (например, Role:DB, Web; OS:Win8.1). Для тегов используются следующие разделители: , (запятая), : (двоеточие) и ; (точка с запятой). Если указывается несколько тегов, задача будет обрабатывать все виртуальные машины с указанными тегами. По умолчанию задача запускается на всех виртуальных машинах.", + "loc.input.label.vmsAdminUserName": "Имя для входа администратора", + "loc.input.help.vmsAdminUserName": "Имя администратора виртуальных машин.", + "loc.input.label.vmsAdminPassword": "Пароль", + "loc.input.help.vmsAdminPassword": "Пароль администратора для виртуальных машин.
Допустимы переменные, заданные в конвейерах сборки или выпуска как \"$(passwordVariable)\".
Чтобы защитить переменную, пометьте ее как secret.", + "loc.input.label.TargetPath": "Целевая папка", + "loc.input.help.TargetPath": "Локальный путь на целевых компьютерах для копирования файлов из источника. Переменную среды можно использовать как $env:windir\\BudgetIT\\Web.", + "loc.input.label.AdditionalArgumentsForBlobCopy": "Необязательные аргументы (для отправки файлов в большой двоичный объект)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "Необязательные аргументы AzCopy.exe, которые будут применены при отправке в BLOB-объект, например --check-length=true. Если здесь не указаны дополнительные аргументы, по умолчанию будут добавлены указанные ниже необязательные аргументы.
--log-level=INFO (если конвейер находится в режиме отладки, укажите --log-level=DEBUG),
--recursive (только если имя контейнера отличается от $root),
--blob-type=PageBlob (только если указанная учетная запись хранения относится к ценовой категории \"Премиум\").", + "loc.input.label.AdditionalArgumentsForVMCopy": "Необязательные аргументы (для скачивания файлов в виртуальную машину)", + "loc.input.help.AdditionalArgumentsForVMCopy": "Необязательные аргументы AzCopy.exe, которые будут применены при скачивании на виртуальную машину, например --check-length=true. Если здесь не указаны дополнительные аргументы, по умолчанию будут добавлены указанные ниже необязательные аргументы.
--log-level=INFO (если конвейер находится в режиме отладки, укажите --log-level=DEBUG),
--recursive", + "loc.input.label.sasTokenTimeOutInMinutes": "Период истечения срока действия маркера SAS в минутах", + "loc.input.help.sasTokenTimeOutInMinutes": "Укажите время в минутах, по истечении которого закончится срок действия маркера SAS для контейнера. По умолчанию срок действия маркера истекает через 4 часа.", + "loc.input.label.enableCopyPrerequisites": "Включить необходимые компоненты для копирования", + "loc.input.help.enableCopyPrerequisites": "При включении этого параметра выполняется настройка прослушивателя службы удаленного управления Windows (WinRM) по протоколу HTTPS на порте 5986 с использованием самозаверяющего сертификата. Эта конфигурация требуется для выполнения копирования на виртуальных машинах Azure. Если средства Load Balancer поддерживают целевые виртуальные машины, убедитесь, что правила NAT для входящего трафика настроены для целевого порта (5986). Применимо только для виртуальных машин ARM.", + "loc.input.label.CopyFilesInParallel": "Копировать параллельно", + "loc.input.help.CopyFilesInParallel": "Если задано значение \"true\", будет выполнено параллельное копирование файлов на целевые компьютеры.", + "loc.input.label.CleanTargetBeforeCopy": "Очистить целевой объект", + "loc.input.help.CleanTargetBeforeCopy": "Если задано значение \"true\", конечная папка будет очищена до копирования файлов.", + "loc.input.label.skipCACheck": "Тестовый сертификат", + "loc.input.help.skipCACheck": "Если выбрать этот параметр, клиент пропускает проверку того, подписан ли сертификат сервера доверенным центром сертификации при подключении по протоколу HTTP через SSL (HTTPS).", + "loc.messages.AFC_StorageAccountNotFound": "Учетная запись хранения \"{0}\" не найдена. Выбранное подключение к службе \"Субъект-служба\" поддерживает учетные записи хранения только типа Azure Resource Manager.", + "loc.messages.AFC_ResourceGroupNotFound": "Указанная группа ресурсов \"{0}\" не существует.", + "loc.messages.AFC_GetVMStatus": "[Вызов Azure] Выполняется получение состояния виртуальной машины \"{0}\"", + "loc.messages.AFC_GetVMStatusComplete": "[Вызов Azure] Состояние виртуальной машины \"{0}\" получено", + "loc.messages.AFC_GetCustomScriptExtension": "[Вызов Azure] Идет получение расширения пользовательских скриптов \"{0}\" для виртуальной машины \"{1}\"", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Вызов Azure] Расширение пользовательских скриптов \"{0}\" для виртуальной машины \"{1}\" получено", + "loc.messages.AFC_SetCustomScriptExtension": "[Вызов Azure] Выполняется задание расширения пользовательских скриптов \"{0}\" для виртуальной машины \"{1}\"", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Вызов Azure] Расширение пользовательских скриптов \"{0}\" для виртуальной машины \"{1}\" задано", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Вызов Azure] Идет удаление расширения пользовательских скриптов \"{0}\" для виртуальной машины \"{1}\"", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Вызов Azure] Расширение пользовательских скриптов \"{0}\" для виртуальной машины \"{1}\" удалено", + "loc.messages.AFC_NoNetworkInterface": "[Вызов Azure] Сетевые интерфейсы с идентификатором виртуальной машины {0} не найдены в группе ресурсов {1}", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Вызов Azure] ИД виртуальной машины и имя группы ресурсов не должны иметь значение NULL или быть пустыми", + "loc.messages.AFC_AzurePSNotInstalled": "Минимальная требуемая версия ({0}) командлетов Azure PowerShell не установлена. Для получения последней версии Azure PowerShell можно выполнить инструкции на странице https://azure.microsoft.com/ru-ru/documentation/articles/powershell-install-configure/.", + "loc.messages.AFC_ClassicStorageAccountNotFound": "Учетная запись хранения \"{0}\" не найдена. Выбранное подключение к службе \"Сертификат\" поддерживает учетные записи хранения только типа \"классическая Azure\".", + "loc.messages.AFC_GenericStorageAccountNotFound": "Учетная запись хранения \"{0}\" не найдена. Укажите существующую учетную запись хранения", + "loc.messages.AFC_AzureFileCopyMoreHelp": "Дополнительные сведения см. в {0}", + "loc.messages.AFC_UploadFilesStorageAccount": "Идет отправка файлов из исходного пути \"{0}\" в учетную запись хранения \"{1}\" в контейнере \"{2}\" с префиксом BLOB-объекта \"{3}\"", + "loc.messages.AFC_UploadContainerStorageAccount": "Сбой отправки в контейнер \"{0}\" в учетной записи хранения \"{1}\" с префиксом BLOB-объекта \"{2}\". Ошибка: \"{3}\"", + "loc.messages.AFC_UploadFileSuccessful": "Файлы успешно отправлены из исходного пути \"{0}\" в учетную запись хранения \"{1}\" в контейнере \"{2}\" с префиксом BLOB-объекта \"{3}\"", + "loc.messages.AFC_IncorrectTags": "Теги указаны неверно. Они должны быть в следующем формате: Role:Web,DB;Location:East US;Dept.:Finance,HR", + "loc.messages.AFC_MachineDoesNotExist": "Следующие компьютеры не существуют в группе ресурсов, или их имена указаны неправильно: {0}. Укажите именно те имена компьютеров, которые содержатся в группе ресурсов. Используйте запятые для разделения нескольких имен.", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "Не удается получить {0} для всех ресурсов в группе ресурсов: \"{1}\"", + "loc.messages.AFC_MachineNameFromIdError": "Не удается получить {0} для ресурсов \"{1}\" в группе ресурсов: \"{2}\"", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "Не удается найти ресурс \"{1}\", используя выбранное подключение к службе (\"{0}\"). Выбранное подключение к службе (\"{0}\") поддерживает только классические ресурсы (модель управления службами).", + "loc.messages.AFC_NoClassicVMResources": "В группе ресурсов \"{0}\" нет компьютеров для копирования. Выбранное подключение к службе, \"{1}\", поддерживает виртуальные машины только типа \"классическая Azure\".", + "loc.messages.AFC_NoARMVMResources": "В группе ресурсов \"{0}\" нет компьютеров для копирования. Выбранное подключение к службе, \"{1}\", поддерживает виртуальные машины только типа Azure Resource Manager.", + "loc.messages.AFC_NoGenericVMResources": "В группе ресурсов \"{0}\" нет компьютеров для копирования.", + "loc.messages.AFC_FilteringNoVMResources": "В группе ресурсов \"{0}\" нет компьютеров со следующим: {1} \"{2}\".", + "loc.messages.AFC_CopyStarted": "Началось копирование для компьютера: \"{0}\"", + "loc.messages.AFC_CopyCompleted": "Копирование состояния для компьютера \"{0}\": \"{1}\"", + "loc.messages.AFC_WinRMHelpMessage": "Чтобы исправить проблемы, связанные с подключением к службе WinRM, выберите в задаче параметр \"Включить необходимые компоненты для копирования\". Если этот параметр уже задан и балансировщик нагрузки поддерживает целевые виртуальные машины, необходимо настроить правила NAT для входящего трафика для целевого порта (5986). Применимо только к виртуальным машинам ARM.", + "loc.messages.AFC_CopyFailed": "Сбой копирования на компьютере \"{0}\". Дополнительные сведения см. в журналах.", + "loc.messages.AFC_ParallelCopyFailed": "Сбой копирования на один или несколько компьютеров. Дополнительные сведения см. в журналах.", + "loc.messages.AFC_CopySuccessful": "Файлы успешно скопированы из исходного пути \"{0}\" на целевые виртуальные машины Azure в группе ресурсов \"{1}\"", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "Сбой задания расширения пользовательских скриптов \"{0}\" для виртуальной машины \"{1}\" с ошибкой: \"{2}\".", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "Не удалось добавить правило безопасности сети: {0}", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "Не удается задать расширение пользовательских скриптов \"{0}\" для виртуальной машины \"{1}\": {2}", + "loc.messages.AFC_CopyPrereqsFailed": "Не удалось включить необходимые компоненты для копирования. {0}", + "loc.messages.AFC_BlobStorageNotFound": "Учетная запись хранения \"{0}\" не найдена. Укажите существующую учетную запись хранения", + "loc.messages.AFC_RootContainerAndDirectory": "Параметр \"/S\" является недопустимым для контейнеров $root.", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "Код ответа HTTP \"{0}\" не является допустимым кодом состояния перенаправления", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "Заголовок расположения ответа перенаправления равен NULL.", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "Программа AzCopy.exe завершила работу с ненулевым кодом выхода при отправке файлов в хранилище BLOB-объектов.", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "Не удалось получить ключ учетной записи хранения. Ошибка: \"{0}\"", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "Удалите пользовательский скрипт WinRM вручную и повторите попытку развертывания.", + "loc.messages.ExpiredServicePrincipal": "Не удалось получить маркер доступа для Azure. Убедитесь, что используемый субъект-служба является допустимым, а срок его действия не истек.", + "loc.messages.UnsupportedAuthScheme": "Схема проверки подлинности \"{0}\" не поддерживается для конечной точки.", + "loc.messages.ServicePrincipalError": "Произошла ошибка с субъектом-службой, используемой для развертывания.", + "loc.messages.AzModuleNotFound": "Не удалось найти модули \"Az.Accounts\". Если модуль был установлен недавно, повторите попытку, перезапустив агент задач Azure Pipelines." +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/zh-CN/resources.resjson b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/zh-CN/resources.resjson new file mode 100644 index 000000000000..242a01d9fff6 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/zh-CN/resources.resjson @@ -0,0 +1,94 @@ +{ + "loc.friendlyName": "Azure 文件复制", + "loc.helpMarkDown": "[了解有关此任务的详细信息](https://aka.ms/azurefilecopyreadme)", + "loc.description": "将文件复制到 Azure Blob 存储或虚拟机", + "loc.instanceNameFormat": "$(Destination) 文件复制", + "loc.releaseNotes": "版本 5.0 中的新增功能:
    支持 AzCopy.exe 版本 10.12.2", + "loc.input.label.SourcePath": "源", + "loc.input.help.SourcePath": "源文件夹、本地计算机上的文件或 UNC 共享的绝对路径。表达式应返回单个文件夹或文件。支持在文件路径或文件名的任何位置使用通配符(*)。", + "loc.input.label.ConnectedServiceNameARM": "Azure 订阅", + "loc.input.help.ConnectedServiceNameARM": "用于复制文件的目标帐户的 Azure 资源管理器订阅。", + "loc.input.label.Destination": "目标类型", + "loc.input.help.Destination": "选择目标,即 Azure Blob 或 Azure VM。", + "loc.input.label.StorageAccountRM": "RM 存储帐户", + "loc.input.help.StorageAccountRM": "指定预先存在的 ARM 存储帐户。它还用作将文件复制到 Azure VM 的中间帐户", + "loc.input.label.ContainerName": "容器名", + "loc.input.help.ContainerName": "用于上载文件的容器的名称。如果指定存储帐户中不存在具有给定名称的容器,将自动创建该容器。
如果需要在容器中创建虚拟目录,请使用下面的 blob 前缀输入。
示例: 如果目标位置是 https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/,则指定 mycontainer 作为容器名称,vd1/vd2/ 作为 blob 前缀。", + "loc.input.label.BlobPrefix": "Blob 前缀", + "loc.input.help.BlobPrefix": "用于筛选文件,例如,将生成号追加到所有 blob 以仅从该生成下载文件。示例: 如果将 blob 前缀指定为 myvd1/,则将在容器内创建具有此名称的虚拟目录。带有尾随“/”的 Blob 前缀将被视为虚拟目录。否则,除非要复制的项本身是文件夹,否则它将被视为文件。源文件将被复制到 https://myaccount.blob.core.windows.net/mycontainer/myvd1/。", + "loc.input.label.EnvironmentNameRM": "资源组", + "loc.input.help.EnvironmentNameRM": "要将文件复制到的目标资源组的名称。", + "loc.input.label.ResourceFilteringMethod": "计算机选择依据", + "loc.input.help.ResourceFilteringMethod": "(可选)通过提供 VM 主机名或标记选择资源组中 VM 的子集。仅通过 Azure 资源管理器创建的资源支持 [标记](https://learn.microsoft.com/zh-cn/azure/virtual-machines/tag-template/)。", + "loc.input.label.MachineNames": "筛选条件", + "loc.input.help.MachineNames": "提供 VM 主机名(ffweb、ffdb等)或标记(Role:DB、Web; OS:Win8.1等)的列表。请注意,标记所用的分隔符为 ,(冒号)、:(句点)和 ;(分号)。如果提供了多个标记,则任务将使用指定标记在所有 VM 中运行。默认为在所有 VM 中运行任务。", + "loc.input.label.vmsAdminUserName": "管理员登录名", + "loc.input.help.vmsAdminUserName": "VM 的管理员用户名。", + "loc.input.label.vmsAdminPassword": "密码", + "loc.input.help.vmsAdminPassword": "VM 的管理员密码。
可接受在生成/发布管道中定义为 \"$(passwordVariable)\" 的变量。
可将变量类型标记为“机密”来保护它。", + "loc.input.label.TargetPath": "目标文件夹", + "loc.input.help.TargetPath": "用于从源复制文件的目标计算机上的本地路径。可以使用环境变量,如 $env: windir\\BudgetIT\\Web。", + "loc.input.label.AdditionalArgumentsForBlobCopy": "可选参数(用于将文件上载到 blob)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "上传到 blob 时将应用的可选 AzCopy.exe 参数,如 --check-length=true。如果此处未指定任何可选参数,将默认添加以下可选参数。
--log-level=INFO (如果管道以调试模式运行,则设为 --log-level=DEBUG)、
--recursive (仅当容器名称不是 $root 时)、
--blob-type=PageBlob (仅当指定的存储帐户为高级帐户时)。", + "loc.input.label.AdditionalArgumentsForVMCopy": "可选参数(用于将文件下载到 VM)", + "loc.input.help.AdditionalArgumentsForVMCopy": "下载到 VM 时将应用的可选 AzCopy.exe 参数,如 --check-length=true。如果此处未指定任何可选参数,将默认添加以下可选参数。
--log-level=INFO (如果管道以调试模式运行,则设为 --log-level=DEBUG)、
--recursive", + "loc.input.label.sasTokenTimeOutInMinutes": "SAS 令牌有效期(分钟)", + "loc.input.help.sasTokenTimeOutInMinutes": "提供容器的 SAS 令牌过期前的时间(分钟)。默认情况下,此令牌将在 4 小时后过期。", + "loc.input.label.enableCopyPrerequisites": "启用复制先决条件", + "loc.input.help.enableCopyPrerequisites": "使用自签名证书启用此选项将在端口 5986 上配置针对 HTTPS 协议的 Windows 远程管理(WinRM)侦听器。需要此配置才能在 Azure 计算机上执行复制操作。如果目标虚拟机受 Load Balancer 支持,请确保为目标端口(5986)配置了入站 NAT 规则。仅适用于 ARM VM。", + "loc.input.label.CopyFilesInParallel": "并行复制", + "loc.input.help.CopyFilesInParallel": "将其设置为 true 会将文件并行复制到目标计算机。", + "loc.input.label.CleanTargetBeforeCopy": "清理目标", + "loc.input.help.CleanTargetBeforeCopy": "将其设置为 true 会在复制文件之前清理目标文件夹。", + "loc.input.label.skipCACheck": "测试证书", + "loc.input.help.skipCACheck": "如果选择了此选项,则在通过安全套接字层超文本传输协议(HTTPS)连接时,客户端将跳过验证服务器证书是否由受信任的证书颁发机构(CA)签署这一步骤。", + "loc.messages.AFC_StorageAccountNotFound": "未找到存储帐户 {0}。选定的服务连接“服务主体”仅支持 Azure 资源管理器类型的存储帐户。", + "loc.messages.AFC_ResourceGroupNotFound": "提供的资源组“{0}”不存在。", + "loc.messages.AFC_GetVMStatus": "[Azure Call]正在获取 VM“{0}”的状态", + "loc.messages.AFC_GetVMStatusComplete": "[Azure Call]已获得 VM“{0}”的状态", + "loc.messages.AFC_GetCustomScriptExtension": "[Azure Call]正在获取 VM“{1}”的自定义脚本扩展“{0}”", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Azure Call]已获得 VM“{1}”的自定义脚本扩展“{0}”", + "loc.messages.AFC_SetCustomScriptExtension": "[Azure Call]正在设置 VM“{1}”的自定义脚本扩展“{0}”", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Azure Call]已设置 VM“{1}”的自定义脚本扩展“{0}”", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Azure Call]正在删除 VM“{1}”的自定义脚本扩展“{0}”", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Azure Call]已删除 VM“{1}”的自定义脚本扩展“{0}”", + "loc.messages.AFC_NoNetworkInterface": "[Azure Call]在资源组 {1} 下,未找到虚拟机 ID 为 {0} 的网络接口", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Azure Call]资源组名称和虚拟机 ID 不应为 null 或空", + "loc.messages.AFC_AzurePSNotInstalled": "未安装 Azure Powershell Cmdlet 所需的最低版本 {0}。可以按照 https://azure.microsoft.com/en-in/documentation/articles/powershell-install-configure/ 中的说明进行操作,以获得最新的 Azure Powershell", + "loc.messages.AFC_ClassicStorageAccountNotFound": "未找到存储帐户 {0}。选定的服务连接“证书”仅支持 Azure 经典类型的存储帐户。", + "loc.messages.AFC_GenericStorageAccountNotFound": "未找到存储帐户 {0}。请指定现有的存储帐户", + "loc.messages.AFC_AzureFileCopyMoreHelp": "有关详细信息,请参阅 {0}", + "loc.messages.AFC_UploadFilesStorageAccount": "正在将文件从源路径“{0}”上传到具有 blob 前缀“{3}”的容器“{2}”中的存储帐户“{1}”", + "loc.messages.AFC_UploadContainerStorageAccount": "上传到存储帐户“{1}”中具有 blob 前缀“{2}”的容器“{0}”失败,出现错误:“{3}”", + "loc.messages.AFC_UploadFileSuccessful": "已成功将文件从源路径“{0}”上传到具有 blob 前缀“{3}”的容器“{2}”中的存储帐户“{1}”", + "loc.messages.AFC_IncorrectTags": "错误地指定了标记。其格式必须为 Role:Web,DB;Location:East US;Dept.:Finance,HR", + "loc.messages.AFC_MachineDoesNotExist": "以下计算机未出现在资源组中,或它们的名称指定错误: {0}。请提供资源组中显示的确实相同的计算机名称。使用逗号将多个计算机名称分隔开。", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "无法获得资源组“{1}”中所有资源的 {0}", + "loc.messages.AFC_MachineNameFromIdError": "无法获得资源组“{2}”中“{1}”资源的 {0}", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "无法使用选定的服务连接“{1}”找到资源“{0}”。选定的服务连接“{0}”仅支持经典资源(服务管理模型)。", + "loc.messages.AFC_NoClassicVMResources": "资源组“{0}”下不存在要复制的计算机。选定的服务连接“{1}”仅支持 Azure 经典类型的虚拟机。", + "loc.messages.AFC_NoARMVMResources": "资源组“{0}”下不存在要复制的计算机。选定的服务连接“{1}”仅支持 Azure 资源管理器类型的虚拟机。", + "loc.messages.AFC_NoGenericVMResources": "资源组“{0}”下不存在要复制的计算机。", + "loc.messages.AFC_FilteringNoVMResources": "具有以下 {1}“{2}”的资源组“{0}”下不存在计算机。", + "loc.messages.AFC_CopyStarted": "计算机“{0}”的复制已开始", + "loc.messages.AFC_CopyCompleted": "复制计算机“{0}”的状态:“{1}”", + "loc.messages.AFC_WinRMHelpMessage": "若要修复 WinRM 服务连接相关的问题,请在任务中选择“启用复制先决条件”选项。如果已经设置,且目标虚拟机由负载均衡器提供支持,请确保为目标端口(5986)配置入站 NAT 规则。仅适用于 ARM VM。", + "loc.messages.AFC_CopyFailed": "在计算机“{0}”上复制失败。有关详细信息,请参阅日志。", + "loc.messages.AFC_ParallelCopyFailed": "复制到一个或多个计算机失败。有关详细信息,请参阅日志。", + "loc.messages.AFC_CopySuccessful": "已成功将文件从源路径“{0}”复制到了资源组“{1}”中的目标 Azure VM", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "对虚拟机“{1}”的自定义脚本扩展“{0}”的设置失败,错误: {2}", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "未能添加网络安全规则: {0}", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "无法设置虚拟机“{1}”的自定义脚本扩展“{0}”: {2}", + "loc.messages.AFC_CopyPrereqsFailed": "无法启用复制先决条件。{0}", + "loc.messages.AFC_BlobStorageNotFound": "未找到存储帐户 {0}。请指定现有的存储帐户", + "loc.messages.AFC_RootContainerAndDirectory": "\"/S\" 选项对 $root 容器无效。", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "HTTP 响应代码:“{0}”不是有效的重定向状态代码", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "重定向响应位置标头为 null。", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "将文件上传到 blob 存储时,AzCopy.exe 以非零退出代码退出。", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "无法提取存储帐户密钥。错误: “{0}”", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "请手动卸载 WinRM 自定义脚本,然后重试部署。", + "loc.messages.ExpiredServicePrincipal": "无法提取 Azure 的访问令牌。请确保使用的服务主体有效且未过期。", + "loc.messages.UnsupportedAuthScheme": "终结点不支持的身份验证方案 \"{0}\"。", + "loc.messages.ServicePrincipalError": "用于部署的服务主体有错。", + "loc.messages.AzModuleNotFound": "找不到版本为 'Az.Accounts' 的模块。如果最近安装了该模块,请在重启 Azure Pipelines 任务代理后重试。" +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/zh-TW/resources.resjson b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/zh-TW/resources.resjson new file mode 100644 index 000000000000..f92e913fee03 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Strings/resources.resjson/zh-TW/resources.resjson @@ -0,0 +1,94 @@ +{ + "loc.friendlyName": "Azure 檔案複製", + "loc.helpMarkDown": "[深入了解此工作](https://aka.ms/azurefilecopyreadme) (英文)", + "loc.description": "將檔案複製到 Azure Blob 儲存體或虛擬機器", + "loc.instanceNameFormat": "$(Destination) 檔案複製", + "loc.releaseNotes": "5.0 版的新功能:
   支援 AzCopy.exe 10.12.2 版", + "loc.input.label.SourcePath": "來源", + "loc.input.help.SourcePath": "來源資料夾、本機電腦檔案或 UNC 共用的絕對路徑。運算式應該傳回單一資料夾或檔案。支援在檔案路徑或檔案名稱的任何位置使用萬用字元符號 (*)。", + "loc.input.label.ConnectedServiceNameARM": "Azure 訂用帳戶", + "loc.input.help.ConnectedServiceNameARM": "要作為複製檔案目標的 Azure Resource Manager 訂用帳戶。", + "loc.input.label.Destination": "目的地類型", + "loc.input.help.Destination": "選取目的地,可以是 Azure Blob 或 Azure VM。", + "loc.input.label.StorageAccountRM": "RM 儲存體帳戶", + "loc.input.help.StorageAccountRM": "指定預先存在的 ARM 儲存體帳戶。其也作為將檔案複製到 Azure VM 的中繼項目", + "loc.input.label.ContainerName": "容器名稱", + "loc.input.help.ContainerName": "用於上傳檔案的容器名稱。如果具有指定名稱的容器不存在於指定的儲存體帳戶中,會自動予以建立。
如需在容器內建立虛擬目錄,請使用以下 Blob 前置詞輸入。
範例: 如果您的目標位置是 https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/,則指定 mycontainer 作為容器名稱及指定 vd1/vd2/ 作為 Blob 前置詞。", + "loc.input.label.BlobPrefix": "Blob 前置詞", + "loc.input.help.BlobPrefix": "適用於篩選檔案,例如將組建編號附加到所有 Blob,以只從該組建下載檔案。範例: 如果您將 Blob 前置詞指定為 myvd1,會在容器內建立具有此名稱的虛擬目錄。尾端為 '/' 的 Blob 前置詞會被視為虛擬目錄。否則,除非要複製的項目本身是資料夾,否則它會被視為檔案。來源檔案會複製到 https://myaccount.blob.core.windows.net/mycontainer/myvd1/。", + "loc.input.label.EnvironmentNameRM": "資源群組", + "loc.input.help.EnvironmentNameRM": "要將檔案複製到其中的目標資源群組名稱。", + "loc.input.label.ResourceFilteringMethod": "選取電腦依據", + "loc.input.help.ResourceFilteringMethod": "您也可以提供 VM 主機名稱或標記,選擇是否要從資源群組中選取一組 VM。只有透過 Azure Resource Manager 建立的群組才支援 [標記](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/)。", + "loc.input.label.MachineNames": "篩選準則", + "loc.input.help.MachineNames": "提供 VM 主機名稱 (例如 ffweb、ffdb) 或標記 (例如 Role:DB、Web; OS:Win8.1) 的清單。請注意,標記可使用的分隔符號為 , (逗號)、: (冒號) 及 ; (分號)。如有提供多個標記,工作將會在所有具有指定標籤的 VM 上執行。根據預設,將會在所有的 VM 上執行工作。", + "loc.input.label.vmsAdminUserName": "系統管理員登入", + "loc.input.help.vmsAdminUserName": "VM 的系統管理員使用者名稱。", + "loc.input.label.vmsAdminPassword": "密碼", + "loc.input.help.vmsAdminPassword": "VM 的系統管理員密碼。
其可接受組建或發行管線中定義的變數為 '$(passwordVariable)'。
您可將變數標記為 'secret' 來加以保護。", + "loc.input.label.TargetPath": "目的地資料夾", + "loc.input.help.TargetPath": "從來源複製檔案時,目標電腦上所需的本機路徑。可使用環境變數,例如 $env:windir\\BudgetIT\\Web。", + "loc.input.label.AdditionalArgumentsForBlobCopy": "選擇性引數 (用於將檔案上傳到 Blob)", + "loc.input.help.AdditionalArgumentsForBlobCopy": "上傳至 Blob 要套用的選用 AzCopy.exe 引數,例如 --check-length=true。根據預設,如未在此處指定任何選用引數,即會新增下列選用引數。
--log-level=INFO (如果管線正在偵錯模式中執行,請設定 --log-level=DEBUG),
--recursive (只有當容器名稱不是 $root 時),
--blob-type=PageBlob (只有當指定的儲存體帳戶為進階帳戶時)。", + "loc.input.label.AdditionalArgumentsForVMCopy": "選擇性引數 (用於將檔案下載到 VM)", + "loc.input.help.AdditionalArgumentsForVMCopy": "下載到 VM 時要套用的選用 AzCopy.exe 引數,例如 --check-length=true。根據預設,如未在此處指定任何選用引數,即會新增下列選用引數。
--log-level=INFO (如果管線正在偵錯模式中執行,請設定 --log-level=DEBUG),
--recursive", + "loc.input.label.sasTokenTimeOutInMinutes": "SAS 權杖到期期限 (分鐘)", + "loc.input.help.sasTokenTimeOutInMinutes": "提供容器 SAS 權杖到期前經過的分鐘數。根據預設,此權杖會在 4 小時後到期。", + "loc.input.label.enableCopyPrerequisites": "啟用複製必要條件", + "loc.input.help.enableCopyPrerequisites": "啟用此選項即可使用自我簽署憑證,透過連接埠 5986 上的 HTTPS 通訊協定來設定 Windows 遠端管理 (WinRM) 接聽程式。必須要有此設定,才能在 Azure 機器上執行複製作業。若目標虛擬機器受 Load Balancer 支援,請確認已設定目標連接埠 (5986) 的輸入 NAT 規則。僅適用於 ARM VM。", + "loc.input.label.CopyFilesInParallel": "平行複製", + "loc.input.help.CopyFilesInParallel": "若將其設定為 Ture,檔案會平行複製到目標電腦。", + "loc.input.label.CleanTargetBeforeCopy": "清除目標", + "loc.input.help.CleanTargetBeforeCopy": "若將其設定為 Ture,將會在複製檔案前先清除目的地資料夾。", + "loc.input.label.skipCACheck": "測試憑證", + "loc.input.help.skipCACheck": "若選取此選項,用戶端會在透過超文字安全傳輸通訊協定 (HTTPS) 連線時,略過驗證伺服器憑證是否已經由信任的憑證授權單位 (CA) 簽署。", + "loc.messages.AFC_StorageAccountNotFound": "找不到儲存體帳戶: {0}。選取的服務連線 'Service Principal' 僅支援 Azure Resource Manager 類型的儲存體帳戶。", + "loc.messages.AFC_ResourceGroupNotFound": "提供的資源群組 '{0}' 不存在。", + "loc.messages.AFC_GetVMStatus": "[Azure 呼叫]正在取得 VM '{0}' 的狀態", + "loc.messages.AFC_GetVMStatusComplete": "[Azure 呼叫]已取得 VM '{0}' 的狀態", + "loc.messages.AFC_GetCustomScriptExtension": "[Azure 呼叫]正在取得 VM '{1}' 的自訂指令碼延伸模組 '{0}'", + "loc.messages.AFC_GetCustomScriptExtensionComplete": "[Azure 呼叫]已取得 VM '{1}' 的自訂指令碼延伸模組 '{0}'", + "loc.messages.AFC_SetCustomScriptExtension": "[Azure 呼叫]正在設定 VM '{1}' 的自訂指令碼延伸模組 '{0}'", + "loc.messages.AFC_SetCustomScriptExtensionComplete": "[Azure 呼叫]設定 VM '{1}' 的自訂指令碼延伸模組 '{0}'", + "loc.messages.AFC_RemoveCustomScriptExtension": "[Azure 呼叫]正在移除 VM '{1}' 的自訂指令碼延伸模組 '{0}'", + "loc.messages.AFC_RemoveCustomScriptExtensionComplete": "[Azure 呼叫]已移除 VM '{1}' 的自訂指令碼延伸模組 '{0}'", + "loc.messages.AFC_NoNetworkInterface": "[Azure 呼叫]資源群組 {1} 下找不到虛擬機器識別碼為 {0} 的網路介面", + "loc.messages.AFC_NullOrEmptyResourceGroup": "[Azure 呼叫]資源群組名稱及虛擬機器識別碼不應為 null 或空白", + "loc.messages.AFC_AzurePSNotInstalled": "未安裝 Azure Powershell Cmdlet 要求的最低版本 {0}。您可以遵循下方網址中的指示取得最新 Azure Powershell: https://azure.microsoft.com/zh-tw/documentation/articles/powershell-install-configure/ (英文)", + "loc.messages.AFC_ClassicStorageAccountNotFound": "找不到儲存體帳戶: {0}。選取的服務連線 'Certificate' 僅支援 Azure 傳統類型的儲存體帳戶。", + "loc.messages.AFC_GenericStorageAccountNotFound": "找不到儲存體帳戶: {0}。請指定現有的儲存體帳戶", + "loc.messages.AFC_AzureFileCopyMoreHelp": "如需詳細資訊,請參閱 {0}", + "loc.messages.AFC_UploadFilesStorageAccount": "正在將檔案從來源路徑 '{0}' 上傳到儲存體帳戶 '{1}' 之 Blob 前置詞為 '{3}' 的容器 '{2}' 中", + "loc.messages.AFC_UploadContainerStorageAccount": "上傳到儲存體帳戶 '{0}' 中 Blob 前置詞為 '{2}' 的容器 '{1}' 失敗。錯誤: '{3}'", + "loc.messages.AFC_UploadFileSuccessful": "已成功將檔案從來源路徑 '{0}' 上傳到儲存體帳戶 '{1}' 之 Blob 前置詞為 '{3}' 的容器 '{2}' 中", + "loc.messages.AFC_IncorrectTags": "未正確指定標記。標記的格式必須為 Role:Web,DB;Location:East US;Dept.:Finance,HR", + "loc.messages.AFC_MachineDoesNotExist": "下列機器不存在於資源群組中,或未正確指定其名稱: {0}。請提供與資源群組中所顯示的機器名稱完全相同者。請使用逗號分隔多個機器名稱。", + "loc.messages.AFC_MachineNameFromIdErrorAllResources": "無法為 ResourceGroup 中的所有資源取得 {0}: '{1}'", + "loc.messages.AFC_MachineNameFromIdError": "無法為 ResourceGroup 中的 '{1}' 項資源取得 {0}: '{2}'", + "loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection": "使用選取的服務連線 '{1}' 找不到資源 '{0}'。選取的服務連線 '{0}' 僅支援傳統資源 (服務管理模型)。", + "loc.messages.AFC_NoClassicVMResources": "資源群組 '{0}' 下沒有任何機器可複製。選取的服務連線 '{1}' 僅支援 Azure 傳統類型的虛擬機器。", + "loc.messages.AFC_NoARMVMResources": "資源群組 '{0}' 下沒有任何機器可複製。選取的服務連線 '{1}' 僅支援 Azure Resource Manager 類型的虛擬機器。", + "loc.messages.AFC_NoGenericVMResources": "資源群組: '{0}' 下沒有任何機器可複製。", + "loc.messages.AFC_FilteringNoVMResources": "資源群組: '{0}' 下沒有任何機器具有下列 {1} '{2}'。", + "loc.messages.AFC_CopyStarted": "已開始電腦的複製: '{0}'", + "loc.messages.AFC_CopyCompleted": "複製電腦 '{0}' 的狀態: '{1}'", + "loc.messages.AFC_WinRMHelpMessage": "若要修正 WinRM 服務連線相關問題,請在工作中選取 [啟用複製必要條件] 選項。若已設定,且負載平衡器支援目標虛擬機器,請確認已為目標連接埠 (5986) 設定輸入 NAT 規則。僅適用於 ARM VM。", + "loc.messages.AFC_CopyFailed": "機器 '{0}' 上的複製失敗。如需詳細資料,請參閱記錄檔。", + "loc.messages.AFC_ParallelCopyFailed": "無法複製到一或多部機器。如需詳細資料,請參閱記錄檔。", + "loc.messages.AFC_CopySuccessful": "已成功從來源路徑 '{0}' 將檔案複製到資源群組 '{1}' 中的目標 Azure VM", + "loc.messages.AFC_SetCustomScriptExtensionFailed": "為虛擬機器 '{1}' 設定自訂指令碼延伸模組 '{0}' 失敗,發生錯誤: {2}", + "loc.messages.AFC_AddNetworkSecurityRuleFailed": "無法新增網路安全性規則: {0}", + "loc.messages.AFC_UnableToSetCustomScriptExtension": "無法為虛擬機器 '{2}' 設定自訂指令碼延伸模組 '{0}': {1}", + "loc.messages.AFC_CopyPrereqsFailed": "無法啟用複製必要條件。{0}", + "loc.messages.AFC_BlobStorageNotFound": "找不到儲存體帳戶: {0}。請指定現有的儲存體帳戶", + "loc.messages.AFC_RootContainerAndDirectory": "'/S' 選項對 $root 容器而言無效。", + "loc.messages.AFC_RedirectResponseInvalidStatusCode": "HTTP 回應碼: '{0}' 不是有效的重新導向狀態碼", + "loc.messages.AFC_RedirectResponseLocationHeaderIsNull": "重新導向回應位置標頭為 null。", + "loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode": "將檔案上傳至 Blob 儲存體時 AzCopy.exe 已結束,結束代碼不為零。", + "loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey": "無法擷取儲存體帳戶金鑰。錯誤: '{0}'", + "loc.messages.AFC_UninstallWinRMCustomScriptExtension": "請手動將 WinRM 自訂指令碼解除安裝,並重試部署。", + "loc.messages.ExpiredServicePrincipal": "無法擷取 Azure 的存取權杖。請驗證使用的服務主體是否有效且未過期。", + "loc.messages.UnsupportedAuthScheme": "端點不支援驗證配置 '{0}'。", + "loc.messages.ServicePrincipalError": "部署用的服務主體有錯誤。", + "loc.messages.AzModuleNotFound": "找不到模組 'Az.Accounts'。若最近才安裝該模組,請重新啟動 Azure Pipelines 工作代理程式,然後重試。" +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0.ts b/_generated/AzureFileCopyV6_Node20/Tests/L0.ts new file mode 100644 index 000000000000..9f90f2cdb066 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0.ts @@ -0,0 +1,103 @@ +/// +/// +/// + +import Q = require('q'); +import assert = require('assert'); +import path = require('path'); + +var psm = require('../../../Tests/lib/psRunner'); +var psr = null; + +describe('AzureFileCopy Suite', function () { + this.timeout(parseInt(process.env.TASK_TEST_TIMEOUT) || 20000); + + before((done) => { + if (psm.testSupported()) { + psr = new psm.PSRunner(); + psr.start(); + } + done(); + }); + + after(function () { + if (psr) { + psr.kill(); + } + }); + + if (psm.testSupported()) { + it('Validate AzureFileCopy.Utility Get-AzureUtility', (done) => { + psr.run(path.join(__dirname, 'L0GetAzureUtility.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Validate-AzurePowershellVersion', (done) => { + psr.run(path.join(__dirname, 'L0ValidateAzurePSVersion.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-StorageKey', (done) => { + psr.run(path.join(__dirname, 'L0GetStorageKey.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-StorageAccountType', (done) => { + psr.run(path.join(__dirname, 'L0GetStorageAccountType.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-blobStorageEndpoint', (done) => { + psr.run(path.join(__dirname, 'L0GetblobStorageEndpoint.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-StorageKey', (done) => { + psr.run(path.join(__dirname, 'L0UtilityThrowError.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Does-AzureVMMatchTagFilterCriteria', (done) => { + psr.run(path.join(__dirname, 'L0DoesAzureVMMatchTagFilter.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-TagBasedFilteredAzureVMs', (done) => { + psr.run(path.join(__dirname, 'L0GetTagBasedFilteredAzureVMs.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-MachineBasedFilteredAzureVMs', (done) => { + psr.run(path.join(__dirname, 'L0GetMachineBasedFilteredAzureVMs.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-FilteredAzureVMsInResourceGroup', (done) => { + psr.run(path.join(__dirname, 'L0GetFilteredAzureVmsInResourceGroup.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-FilteredAzureRMVMsInResourceGroup', (done) => { + psr.run(path.join(__dirname, 'L0GetFilteredAzureRMVmsInResourceGroup.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-MachineNameFromId', (done) => { + psr.run(path.join(__dirname, 'L0GetMachineNameFromId.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-MachinesFqdnsForLB', (done) => { + psr.run(path.join(__dirname, 'L0GetMachinesFqdnForLB.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-FrontEndPorts', (done) => { + psr.run(path.join(__dirname, 'L0GetFrontEndPorts.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-AzureRMVMsConnectionDetailsInResourceGroup', (done) => { + psr.run(path.join(__dirname, 'L0GetRMVMConnectionDetailsInRG.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-AzureVMResourcesProperties', (done) => { + psr.run(path.join(__dirname, 'L0GetAzureVMResourcesProperties.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Get-AzureVMsCredentials', (done) => { + psr.run(path.join(__dirname, 'L0GetAzureVMsCredentials.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Copy-FilesParallelyToAzureVMs', (done) => { + psr.run(path.join(__dirname, 'L0CopyFilesParallelyToAzureVMs.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Copy-FilesToAzureVMsFromStorageContainer', (done) => { + psr.run(path.join(__dirname, 'L0CopyFilesToAzureVMsFromStorageContainer.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Validate-CustomScriptExecutionStatus', (done) => { + psr.run(path.join(__dirname, 'L0ValidateCustomScriptExecutionStatus.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Add-AzureVMCustomScriptExtension', (done) => { + psr.run(path.join(__dirname, 'L0AddAzureVMCustomScriptExtension.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Is-WinRMCustomScriptExtensionExists', (done) => { + psr.run(path.join(__dirname, 'L0IsWinRMCustomScriptExtensionExists.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Copy-FilesSequentiallyToAzureVMs', (done) => { + psr.run(path.join(__dirname, 'L0CopyFilesSequentiallyToAzureVMs.ps1'), done); + }); + it('Validate AzureFileCopy.Utility Check-ContainerNameAndArgs', (done) => { + psr.run(path.join(__dirname, 'L0CheckContainerNameAndArgs.ps1'), done); + }); + } +}); diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0AddAzureVMCustomScriptExtension.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0AddAzureVMCustomScriptExtension.ps1 new file mode 100644 index 000000000000..807b1a875a4b --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0AddAzureVMCustomScriptExtension.ps1 @@ -0,0 +1,68 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +Register-Mock Write-Telemetry { } +Register-Mock Get-TargetUriFromFwdLink { "http://externalFile" } + +# Test 1 "Should throw Resource group name is null" +Assert-Throws { + Add-AzureVMCustomScriptExtension -resourceGroupName $null -vmName $vm0Name -dnsName $azurevmFqdn -location $location -connectedServiceName $connectedServiceName +} -MessagePattern "AFC_CopyPrereqsFailed *" + + +# Test 2 "Should throw when VM name is null" +Assert-Throws { + Add-AzureVMCustomScriptExtension -resourceGroupName $validRG -vmName $null -dnsName $azurevmFqdn -location $location -connectedServiceName $connectedServiceName +} -MessagePattern "AFC_CopyPrereqsFailed *" + +# Test 3 "should throw when VM name is invalid" +Register-Mock Get-Endpoint {} +Assert-Throws { + Add-AzureVMCustomScriptExtension -resourceGroupName $validRG -vmName $invalidMachineName -dnsName $azurevmFqdn -location $location -connectedServiceName $connectedServiceName +} -MessagePattern "AFC_CopyPrereqsFailed AFC_UnableToSetCustomScriptExtension *" + +# Test 4 "Should fail to provision winrm custom script extension and remove the failed extension" +$extensionName="WinRMCustomScriptExtension" +Register-Mock Set-AzureMachineCustomScriptExtension { + return Set-AzureMachineCustomScriptExtension -resourceGroupName $resourceGroupName -vmName $vmName -name $extensionName -fileUri $configWinRMScriptFile, $makeCertFile -run $invalidCustomScriptName -argument $dnsName -location $location +} -ParametersEvaluator { $run -eq $scriptToRun } + +Assert-Throws { + Add-AzureVMCustomScriptExtension -resourceGroupName $validRG -vmName $vm0Name -dnsName $azurevmFqdn -location $location -connectedServiceName $connectedServiceName +} -MessagePattern "AFC_CopyPrereqsFailed *" + +Assert-AreEqual 0 $vmInstanceViews[$vm0Name]["Extensions"].Count + +# Test 5 "Should fail to deploy winrm custom script extension and remove the failed extension" +$extensionName="WinRMCustomScriptExtension" +Unregister-Mock Set-AzureMachineCustomScriptExtension +Register-Mock Set-AzureMachineCustomScriptExtension { + return Set-AzureMachineCustomScriptExtension -resourceGroupName $resourceGroupName -vmName $vmName -name $extensionName -fileUri $configWinRMScriptFile, $makeCertFile -run $invalidCustomScriptName -argument $dnsName -location $location +} -ParametersEvaluator { $run -eq $scriptToRun } + +Assert-Throws { + Add-AzureVMCustomScriptExtension -resourceGroupName $validRG -vmName $vm0Name -dnsName $azurevmFqdn -location $location -connectedServiceName $connectedServiceName +} -MessagePattern "AFC_CopyPrereqsFailed *" + +Assert-AreEqual 0 $vmInstanceViews[$vm0Name]["Extensions"].Count + +# Test 6 "Should configure winrm successfully on target azure vm for valid Input" +Unregister-Mock Set-AzureMachineCustomScriptExtension +Add-AzureVMCustomScriptExtension -resourceGroupName $validRG -vmName $vm0Name -dnsName $azurevmFqdn -location $location -connectedServiceName $connectedServiceName +$tempStatus = Get-AzureMachineStatus -resourceGroupName $validRG -name $vm0Name +$tempStatus.Extensions.Statuses.DisplayStatus.Contains("Provisioning succeeded"); + +# Test 7 "Should skip configuring winrm on target azure vm" +Register-Mock Set-AzureMachineCustomScriptExtension { return $null } +Register-Mock Is-WinRMCustomScriptExtensionExists { return $true } +Add-AzureVMCustomScriptExtension -resourceGroupName $validRG -vmName $vm0Name -dnsName $azurevmFqdn -location $location -connectedServiceName $connectedServiceName + +Assert-WasCalled Set-AzureMachineCustomScriptExtension -Times 0 + +#Clean the extension +$vmInstanceViews[$vm0Name]["Extensions"]=@() \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0CheckContainerNameAndArgs.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0CheckContainerNameAndArgs.ps1 new file mode 100644 index 000000000000..0b00285d6200 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0CheckContainerNameAndArgs.ps1 @@ -0,0 +1,15 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\..\Utility.ps1 + +Register-Mock Write-Warning { } + +Check-ContainerNameAndArgs -containerName '$root' -additionalArguments " --recursive " +Check-ContainerNameAndArgs -containerName '$root' -additionalArguments " --recursive --log-level=ERROR " +Check-ContainerNameAndArgs -containerName '$root' -additionalArguments " --recursive --log-level=ERROR" + +Assert-WasCalled Write-Warning -Times 3 + +Unregister-Mock Write-Warning \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0CopyFilesParallelyToAzureVMs.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0CopyFilesParallelyToAzureVMs.ps1 new file mode 100644 index 000000000000..2f35bd2e381b --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0CopyFilesParallelyToAzureVMs.ps1 @@ -0,0 +1,34 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$vmName = "myVM0" +$vmfqdn = "lbipac2b71e2680c44fd987d.westus.cloudapp.azure.com" +$vmWinRMHttpsPort1 = '40001' +$vmWinRMHttpsPort2 = '40003' +$vmWinRMHttpsPort3 = '40005' +$azureVMsProperties = Get-AzureVMResourcesProperties -resourceGroupName $validRG -resourceFilteringMethod 'tags' +$azureVMCredntials = Get-AzureVMsCredentials -vmsAdminUserName $validInputVmsAdminUserName -vmsAdminPassword $validInputVmsAdminPassword + +Register-Mock ConvertTo-SecureString { return $securedMockPassword } +$invokeRemoteScriptParams = Get-InvokeRemoteScriptParameters -azureVMResourcesProperties $azureVMsProperties -networkCredentials $azureVMCredntials + +# Test 1 "Should throw if failed on one vm and passed on other vm" + +Register-Mock Invoke-RemoteScript { return $invokeRemoteScriptOnePassOneFailResponse } + +Assert-Throws { + Copy-FilesParallellyToAzureVMs -targetMachineNames $invokeRemoteScriptParams.targetMachineNames -credential $invokeRemoteScriptParams.credential -protocol $invokeRemoteScriptParams.protocol -sessionName "AFCCopyToVMs" -remoteScriptJobArguments @{} -sessionOption $invokeRemoteScriptParams.sessionOption +} -MessagePattern "AFC_ParallelCopyFailed*" + +# Test 2 "Should not throw if copy passed on both vms" + +Unregister-Mock Invoke-RemoteScript +Register-Mock Invoke-RemoteScript { return $invokeRemoteScriptAllPassedResponse } + +Copy-FilesParallellyToAzureVMs -targetMachineNames $invokeRemoteScriptParams.targetMachineNames -credential $invokeRemoteScriptParams.credential -protocol $invokeRemoteScriptParams.protocol -sessionName "AFCCopyToVMs" -remoteScriptJobArguments @{} -sessionOption $invokeRemoteScriptParams.sessionOption diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0CopyFilesSequentiallyToAzureVMs.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0CopyFilesSequentiallyToAzureVMs.ps1 new file mode 100644 index 000000000000..5f5cdb928f8f --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0CopyFilesSequentiallyToAzureVMs.ps1 @@ -0,0 +1,30 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$vmName = "myVM0" +$vmfqdn = "lbipac2b71e2680c44fd987d.westus.cloudapp.azure.com" +$vmWinRMHttpsPort = '40003' +$azureVMsProperties = Get-AzureVMResourcesProperties -resourceGroupName $validRG -resourceFilteringMethod 'tags' +$azureVMCredntials = Get-AzureVMsCredentials -vmsAdminUserName $validInputVmsAdminUserName -vmsAdminPassword $validInputVmsAdminPassword + +Register-Mock ConvertTo-SecureString { return $securedMockPassword } +$invokeRemoteScriptParams = Get-InvokeRemoteScriptParameters -azureVMResourcesProperties $azureVMsProperties -networkCredentials $azureVMCredntials + +Register-Mock Invoke-RemoteScript { return $invokeRemoteScriptFailedResponse } + +# Test 1 "Should throw if failed on one vm" +Assert-Throws { + Copy-FilesSequentiallyToAzureVMs -targetMachineNames $invokeRemoteScriptParams.targetMachineNames -credential $invokeRemoteScriptParams.credential -protocol $invokeRemoteScriptParams.protocol -sessionName "AFCCopyToVMs" -remoteScriptJobArguments @{} -sessionOption $invokeRemoteScriptParams.sessionOption +} -MessagePattern "AFC_CopyFailed $vmfqdn`:$vmWinRMHttpsPort AFC_AzureFileCopyMoreHelp*" + +# Test 2 "Should not throw if copy succeded on both vms" +Unregister-Mock Invoke-RemoteScript +Register-Mock Invoke-RemoteScript { return $invokeRemoteScriptPassedResponse } + +Copy-FilesSequentiallyToAzureVMs -targetMachineNames $invokeRemoteScriptParams.targetMachineNames -credential $invokeRemoteScriptParams.credential -protocol $invokeRemoteScriptParams.protocol -sessionName "AFCCopyToVMs" -remoteScriptJobArguments @{} -sessionOption $invokeRemoteScriptParams.sessionOption \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0CopyFilesToAzureVMsFromStorageContainer.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0CopyFilesToAzureVMsFromStorageContainer.ps1 new file mode 100644 index 000000000000..290e7b4ee467 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0CopyFilesToAzureVMsFromStorageContainer.ps1 @@ -0,0 +1,61 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\..\AzureFileCopyRemoteJob.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$azureVMsProperties = Get-AzureVMResourcesProperties -resourceGroupName $validRG -resourceFilteringMethod 'tags' +$azureVMCredntials = Get-AzureVMsCredentials -vmsAdminUserName $validInputVmsAdminUserName -vmsAdminPassword $validInputVmsAdminPassword + +Register-Mock Get-ChildItem { } + +Register-Mock Copy-FilesParallellyToAzureVMs { } +Register-Mock Copy-FilesSequentiallyToAzureVMs { } + +Register-Mock ConvertTo-SecureString { return $securedMockPassword } +$invokeRemoteScriptParams = Get-InvokeRemoteScriptParameters -azureVMResourcesProperties $azureVMsProperties -networkCredentials $azureVMCredntials + +# Test 1 "Should Call Copy-FilesParallellyToAzureVMs for parallel option" +Copy-FilesToAzureVMsFromStorageContainer -targetMachineNames $invokeRemoteScriptParams.targetMachineNames -credential $invokeRemoteScriptParams.credential ` + -protocol $invokeRemoteScriptParams.protocol ` + -sessionOption $invokeRemoteScriptParams.sessionOption ` + -blobStorageEndpoint $validBlobStorageEndpoint ` + -containerName $validInputContainerName ` + -containerSasToken $validSasToken ` + -targetPath $validInputTargetPath ` + -cleanTargetBeforeCopy $false ` + -copyFilesInParallel $true ` + -additionalArguments "" ` + -azCopyToolLocation "AzCopy" ` + -fileCopyJobScript $AzureFileCopyRemoteJob ` + -enableDetailedLogging $false + + +Assert-WasCalled Copy-FilesParallellyToAzureVMs -Times 1 +Assert-WasCalled Copy-FilesSequentiallyToAzureVMs -Times 0 + + +# Test 2 "should call Copy-FilesSequentiallyToAzureVMs for sequential option" +Copy-FilesToAzureVMsFromStorageContainer -targetMachineNames $invokeRemoteScriptParams.targetMachineNames -credential $invokeRemoteScriptParams.credential ` + -protocol $invokeRemoteScriptParams.protocol ` + -sessionOption $invokeRemoteScriptParams.sessionOption ` + -blobStorageEndpoint $validBlobStorageEndpoint ` + -containerName $validInputContainerName ` + -containerSasToken $validSasToken ` + -targetPath $validInputTargetPath ` + -cleanTargetBeforeCopy $false ` + -copyFilesInParallel $false ` + -additionalArguments "" ` + -azCopyToolLocation "AzCopy" ` + -fileCopyJobScript $AzureFileCopyRemoteJob ` + -enableDetailedLogging $false + + +Unregister-Mock Copy-FilesParallellyToAzureVMs +Register-Mock Copy-FilesParallellyToAzureVMs { } + +Assert-WasCalled Copy-FilesParallellyToAzureVMs -Times 0 +Assert-WasCalled Copy-FilesSequentiallyToAzureVMs -Times 1 \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0DoesAzureVMMatchTagFilter.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0DoesAzureVMMatchTagFilter.ps1 new file mode 100644 index 000000000000..a9debca28daa --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0DoesAzureVMMatchTagFilter.ps1 @@ -0,0 +1,33 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +Register-Mock Write-Telemetry { } +Register-Mock Switch-AzureMode { } + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$azureRMVMResources = Get-AzureRMVMsInResourceGroup -resourceGroupName $validRG +$azureVMResource1 = $azureRMVMResources[0] +$validTagFilterForVMResource1 = "role:test" +$azureVMResource2 = $azureRMVMResources[1] + +# Test 1 "should return true if vm match tag filter criteria with case insensitive check" +$vmMatchFilterCriteria = Does-AzureVMMatchTagFilterCriteria -azureVMResource $azureVMResource1 -filter "Role:TEST, Test1" +Assert-AreEqual $true $vmMatchFilterCriteria + +# Test 2 "should return true if vm match tag filter criteria with same tag repeated twice" +$vmMatchFilterCriteria = Does-AzureVMMatchTagFilterCriteria -azureVMResource $azureVMResource2 -filter "OS:win8, win9; Role:myTEST, MYTest, Test1" +Assert-AreEqual $true $vmMatchFilterCriteria + +# Test 3 "should return false if vm does not match tag filter criteria" +$vmMatchFilterCriteria = Does-AzureVMMatchTagFilterCriteria -azureVMResource $azureVMResource2 -filter "OS:win8, win9; Role:Test5, Test2, Test1" +Assert-AreEqual $false $vmMatchFilterCriteria + +# Test 4 "Should throw if invalid tag filter format" +Assert-Throws { + Does-AzureVMMatchTagFilterCriteria -azureVMResource $azureVMResource2 -filter "OS:win8 : win9; Role:myTEST, MYTest, Test1" +} -MessagePattern "AFC_IncorrectTags" \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0GetAzureUtility.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0GetAzureUtility.ps1 new file mode 100644 index 000000000000..461b266d8980 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0GetAzureUtility.ps1 @@ -0,0 +1,22 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +$azModule100 = New-Object -TypeName System.Version -ArgumentList "1.0.0" +$connectedServiceName = "DummyConnectedServiceName" + +Register-Mock Get-TypeOfConnection { return "ServicePrincipal"} + +. $PSScriptRoot\..\Utility.ps1 + +#Test 1 "Should return AzureUtilityAz1.0.ps1 if Az module is installed" +Register-Mock Get-Module { return $azModule100 } +$azureUtilityFile = Get-AzureUtility +Assert-AreEqual $azureUtilityFile "AzureUtilityAz1.0.ps1" + +#Test 2 "Should return AzureUtilityARM.ps1 Az module is not installed" +Unregister-Mock Get-Module +Register-Mock Get-Module { return } +$azureUtilityFile = Get-AzureUtility -connectedServiceName $connectedServiceName +Assert-AreEqual $azureUtilityFile "AzureUtilityARM.ps1" diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0GetAzureVMResourcesProperties.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0GetAzureVMResourcesProperties.ps1 new file mode 100644 index 000000000000..da1b2c8d3d87 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0GetAzureVMResourcesProperties.ps1 @@ -0,0 +1,31 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +Register-Mock Write-Telemetry { } + +# Test 1 "should throw if no azurevm resources" +Assert-Throws { + Get-AzureVMResourcesProperties -resourceGroupName $rgWithNoVM -resourceFilteringMethod 'tags' +} -MessagePattern "AFC_NoARMVMResources*" + +# Test 2 "should return azureVM resources if valid input given" +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$vmName = "myVM0" +$vmfqdn = "lbipac2b71e2680c44fd987d.westus.cloudapp.azure.com" +$vmWinRMHttpsPort = '40001' + +$response = Get-AzureVMResourcesProperties -resourceGroupName $validRG -resourceFilteringMethod 'tags' + +Assert-IsNotNullOrEmpty $response +Assert-AreEqual 3 $response.Count + +$resource = $response[$vmName] + +Assert-AreEqual $vmName $resource.Name +Assert-AreEqual $vmfqdn $resource.fqdn +Assert-AreEqual $vmWinRMHttpsPort $resource.winRMHttpsPort \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0GetAzureVMsCredentials.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0GetAzureVMsCredentials.ps1 new file mode 100644 index 000000000000..584df180c0a8 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0GetAzureVMsCredentials.ps1 @@ -0,0 +1,16 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$userName = "userName" +$password = "password" + +# Test 1 "Should return System.Net.NetworkCredential with valid values" +$result = Get-AzureVMsCredentials -vmsAdminUserName $userName -vmsAdminPassword $password +Assert-AreEqual "System.Net.NetworkCredential" $result.GetType().FullName +Assert-AreEqual $userName $result.userName +Assert-AreEqual $password $result.Password \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0GetFilteredAzureRMVmsInResourceGroup.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0GetFilteredAzureRMVmsInResourceGroup.ps1 new file mode 100644 index 000000000000..73674a2f40d7 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0GetFilteredAzureRMVmsInResourceGroup.ps1 @@ -0,0 +1,19 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$azureRMVMResources = Get-AzureRMVMsInResourceGroup -resourceGroupName $validRG + +Register-Mock Get-FilteredAzureVMsInResourceGroup {} + +# Test 1 "should call Get-FilteredAzureVMsInResourceGroup with proper paramters" +Get-FilteredAzureRMVMsInResourceGroup -azureRMVMResources $azureRMVMResources -resourceFilteringMethod "tags" -filter "" +Assert-WasCalled Get-FilteredAzureVMsInResourceGroup -Times 1 -ParametersEvaluator { + $resourceFilteringMethod -eq "tags"-and $filter -eq "" -and $azureVMResources.Count -eq $azureRMVMResources.Count +} diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0GetFilteredAzureVmsInResourceGroup.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0GetFilteredAzureVmsInResourceGroup.ps1 new file mode 100644 index 000000000000..987c1cbe2fac --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0GetFilteredAzureVmsInResourceGroup.ps1 @@ -0,0 +1,27 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\MockHelper.ps1 + +Register-Mock Write-Telemetry {} + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$azureRMVMResources = Get-AzureRMVMsInResourceGroup -resourceGroupName $validRG + +# Test 1 "should call tag filter if machineNames filter selected and no filter provided" +$filteredAzureVMResources = Get-FilteredAzureVMsInResourceGroup -azureVMResources $azureRMVMResources -resourceFilteringMethod "machineNames" -filter "" +Assert-AreEqual 3 $filteredAzureVMResources.Count + +# Test 2 "should call tag filter when tags filter selected and non-empty filter provided" +$filteredAzureVMResources = Get-FilteredAzureVMsInResourceGroup -azureVMResources $azureRMVMResources -resourceFilteringMethod "tags" -filter "role:web" +Assert-AreEqual 0 $filteredAzureVMResources.Count + +Register-Mock Get-MachineBasedFilteredAzureVMs { } + +# Test 3 "should call Get-MachineBasedFilteredAzureVMs for machineNames filter with non-empty filter" +$filteredAzureVMResources = Get-FilteredAzureVMsInResourceGroup -azureVMResources $azureRMVMResources -resourceFilteringMethod "machineNames" -filter "vm0" +Assert-AreEqual 0 $filteredAzureVMResources.Count diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0GetFrontEndPorts.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0GetFrontEndPorts.ps1 new file mode 100644 index 000000000000..3a5fd3bcaa77 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0GetFrontEndPorts.ps1 @@ -0,0 +1,34 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$winrmPort1 = "40001" +$winrmPort2 = "40003" +$winrmPort3 = "40005" +$vmfqdn = "lbipac2b71e2680c44fd987d.westus.cloudapp.azure.com" +$azureRMVMResources = Get-AzureRMVMsInResourceGroup -resourceGroupName $validRG +$azureRGResourcesDetails = Get-AzureRMResourceGroupResourcesDetails -resourceGroupName $validRG -azureRMVMResources $azureRMVMResources +$networkInterfaceResources = $azureRGResourcesDetails["networkInterfaceResources"] +$publicIPAddressResources = $azureRGResourcesDetails["publicIPAddressResources"] +$loadBalancerResources = $azureRGResourcesDetails["loadBalancerResources"] + +# Test 1 "It should valid portList if RG deployed successfully" +[hashtable]$winRMHttpsPortMap = @{} +foreach($lbName in $loadBalancerResources.Keys){ + $lbDetails = $loadBalancerResources[$lbName] + $frontEndIPConfigs = $lbDetails["frontEndIPConfigs"] + $inboundRules = $lbDetails["inboundRules"] + $winRMHttpsPortMap = Get-FrontEndPorts -BackEndPort "5986" -PortList $winRMHttpsPortMap -networkInterfaceResources $networkInterfaceResources -inboundRules $inboundRules + + Assert-AreEqual $true $winRMHttpsPortMap.ContainsKey($azureRMVMResources[0].Id) + Assert-AreEqual $winrmPort1 $winRMHttpsPortMap[$azureRMVMResources[0].Id] + + Assert-AreEqual $true $winRMHttpsPortMap.ContainsKey($azureRMVMResources[1].Id) + Assert-AreEqual $winrmPort2 $winRMHttpsPortMap[$azureRMVMResources[1].Id] +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0GetMachineBasedFilteredAzureVMs.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0GetMachineBasedFilteredAzureVMs.ps1 new file mode 100644 index 000000000000..694e04918a38 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0GetMachineBasedFilteredAzureVMs.ps1 @@ -0,0 +1,30 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\MockHelper.ps1 + +Register-Mock Write-Telemetry {} + +$rgWithClassicVMs = "taskplatformtesttwovm" +$classicvm0 = "vm0" +$classicvm1 = "VM1" +$azureClassicVMResources = Get-AzureClassicVMsInResourceGroup -resourceGroupName $rgWithClassicVMs + +# Test 1 "should return all vms corresponding to filter with case insensitive check" +$filteredAzureVMResources = Get-MachineBasedFilteredAzureVMs -azureVMResources $azureClassicVMResources -resourceFilteringMethod "machineNames" -filter "vM0, Vm1" +Assert-AreEqual 2 $filteredAzureVMResources.Count + +# Test 2 "should return only one vm corresponding to its filter even if filter is repeated more than once" +$filteredAzureVMResources = Get-MachineBasedFilteredAzureVMs -azureVMResources $azureClassicVMResources -resourceFilteringMethod "machineNames" -filter "vM0, VM0, vm0" +Assert-AreEqual 1 $filteredAzureVMResources.Count + +$nonExistingFilter = "vm2" + +# Test 3 "Should throw if for any filter there is not corresponding vm" +Assert-Throws { + $filteredAzureVMResources = Get-MachineBasedFilteredAzureVMs -azureVMResources $azureClassicVMResources -resourceFilteringMethod "machineNames" -filter "$nonExistingFilter, Vm1" +} -MessagePattern "AFC_MachineDoesNotExist vm2" diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0GetMachineNameFromId.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0GetMachineNameFromId.ps1 new file mode 100644 index 000000000000..8e47c1e82e23 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0GetMachineNameFromId.ps1 @@ -0,0 +1,91 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$vm0Name = "myVM0" +$vm1Name = "mytestVM0" +$vm2Name = "mytestPTVM0" +$winrmPort1 = "40001" +$winrmPort2 = "40003" +$winrmPort3 = "40005" +$vmfqdn = "lbipac2b71e2680c44fd987d.westus.cloudapp.azure.com" +$azureRMVMResources = Get-AzureRMVMsInResourceGroup -resourceGroupName $validRG +$azureRGResourcesDetails = Get-AzureRMResourceGroupResourcesDetails -resourceGroupName $validRG -azureRMVMResources $azureRMVMResources +$networkInterfaceResources = $azureRGResourcesDetails["networkInterfaceResources"] +$publicIPAddressResources = $azureRGResourcesDetails["publicIPAddressResources"] +$loadBalancerResources = $azureRGResourcesDetails["loadBalancerResources"] + +[hashtable]$fqdnMap = @{} +[hashtable]$winRMHttpsPortMap = @{} +foreach($lbName in $loadBalancerResources.Keys) +{ + $lbDetails = $loadBalancerResources[$lbName] + $frontEndIPConfigs = $lbDetails["frontEndIPConfigs"] + $inboundRules = $lbDetails["inboundRules"] + + $fqdnMap = Get-MachinesFqdnsForLB -resourceGroupName $validRG -publicIPAddressResources $publicIPAddressResources -networkInterfaceResources $networkInterfaceResources -frontEndIPConfigs $frontEndIPConfigs -fqdnMap $fqdnMap + $winRMHttpsPortMap = Get-FrontEndPorts -BackEndPort "5986" -PortList $winRMHttpsPortMap -networkInterfaceResources $networkInterfaceResources -inboundRules $inboundRules +} +# Test 1 "should create valid map for map parameter FQDN" +$fqdnMap = Get-MachineNameFromId -resourceGroupName $validRG -Map $fqdnMap -MapParameter "FQDN" -azureRMVMResources $azureRMVMResources -ThrowOnTotalUnavaialbility $true + +Assert-AreEqual $true $fqdnMap.ContainsKey($vm0Name) +Assert-AreEqual $vmfqdn $fqdnMap[$vm0Name] +Assert-AreEqual $true $fqdnMap.ContainsKey($vm1Name) + +# Test 2 "should create valid map for map parameter Front End port" +$winRMHttpsPortMap = Get-MachineNameFromId -Map $winRMHttpsPortMap -MapParameter "Front End port" -azureRMVMResources $azureRMVMResources -ThrowOnTotalUnavaialbility $false + +Assert-AreEqual $true $winRMHttpsPortMap.ContainsKey($vm0Name) +Assert-AreEqual $winrmPort1 $winRMHttpsPortMap[$vm0Name] +Assert-AreEqual $true $winRMHttpsPortMap.ContainsKey($vm1Name) +Assert-AreEqual $winrmPort2 $winRMHttpsPortMap[$vm1Name] + + +# Test 3 "It should return partial map if for not all resources map is not configured properly" + +[hashtable]$fqdnMap = @{} +[hashtable]$winRMHttpsPortMap = @{} +foreach($lbName in $loadBalancerResources.Keys) +{ + $lbDetails = $loadBalancerResources[$lbName] + $frontEndIPConfigs = $lbDetails["frontEndIPConfigs"] + $inboundRules = $lbDetails["inboundRules"] + + $fqdnMap = Get-MachinesFqdnsForLB -resourceGroupName $validRG -publicIPAddressResources $publicIPAddressResources -networkInterfaceResources $networkInterfaceResources -frontEndIPConfigs $frontEndIPConfigs -fqdnMap $fqdnMap + $winRMHttpsPortMap = Get-FrontEndPorts -BackEndPort "5986" -PortList $winRMHttpsPortMap -networkInterfaceResources $networkInterfaceResources -inboundRules $inboundRules +} +$fqdnMap.Remove($azureRMVMResources[0].Id) + +$fqdnMap = Get-MachineNameFromId -resourceGroupName $validRG -Map $fqdnMap -MapParameter "FQDN" -azureRMVMResources $azureRMVMResources -ThrowOnTotalUnavaialbility $true + +Assert-AreEqual $false $fqdnMap.ContainsKey($vm0Name) +Assert-AreEqual $true $fqdnMap.ContainsKey($vm1Name) +Assert-AreEqual $vmfqdn $fqdnMap[$vm1Name] + +# Test 4 "throw error if no resource is available and ThrowOnTotalUnavailability is set to true" + +[hashtable]$fqdnMap = @{} +[hashtable]$winRMHttpsPortMap = @{} +foreach($lbName in $loadBalancerResources.Keys) +{ + $lbDetails = $loadBalancerResources[$lbName] + $frontEndIPConfigs = $lbDetails["frontEndIPConfigs"] + $inboundRules = $lbDetails["inboundRules"] + + $fqdnMap = Get-MachinesFqdnsForLB -resourceGroupName $validRG -publicIPAddressResources $publicIPAddressResources -networkInterfaceResources $networkInterfaceResources -frontEndIPConfigs $frontEndIPConfigs -fqdnMap $fqdnMap + $winRMHttpsPortMap = Get-FrontEndPorts -BackEndPort "5986" -PortList $winRMHttpsPortMap -networkInterfaceResources $networkInterfaceResources -inboundRules $inboundRules +} +$fqdnMap.Remove($azureRMVMResources[0].Id) +$fqdnMap.Remove($azureRMVMResources[1].Id) +$fqdnMap.Remove($azureRMVMResources[2].Id) + +Assert-Throws { + $fqdnMap = Get-MachineNameFromId -resourceGroupName $validRG -Map $fqdnMap -MapParameter "FQDN" -azureRMVMResources $azureRMVMResources -ThrowOnTotalUnavailability $true +} -MessagePattern "AFC_MachineNameFromIdErrorAllResources*" diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0GetMachinesFqdnForLB.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0GetMachinesFqdnForLB.ps1 new file mode 100644 index 000000000000..df9b520cca4d --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0GetMachinesFqdnForLB.ps1 @@ -0,0 +1,31 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$vmfqdn = "lbipac2b71e2680c44fd987d.westus.cloudapp.azure.com" +$azureRMVMResources = Get-AzureRMVMsInResourceGroup -resourceGroupName $validRG +$azureRGResourcesDetails = Get-AzureRMResourceGroupResourcesDetails -resourceGroupName $validRG -azureRMVMResources $azureRMVMResources +$networkInterfaceResources = $azureRGResourcesDetails["networkInterfaceResources"] +$publicIPAddressResources = $azureRGResourcesDetails["publicIPAddressResources"] +$loadBalancerResources = $azureRGResourcesDetails["loadBalancerResources"] +[hashtable]$fqdnMap = @{} + +# Test 1 "It should valid fqdnMap if RG deployed successfully" +foreach($lbName in $loadBalancerResources.Keys) { + $lbDetails = $loadBalancerResources[$lbName] + $frontEndIPConfigs = $lbDetails["frontEndIPConfigs"] + $inboundRules = $lbDetails["inboundRules"] + $fqdnMap = Get-MachinesFqdnsForLB -resourceGroupName $validRG -publicIPAddressResources $publicIPAddressResources -networkInterfaceResources $networkInterfaceResources -frontEndIPConfigs $frontEndIPConfigs -fqdnMap $fqdnMap + + Assert-AreEqual $true $fqdnMap.ContainsKey($azureRMVMResources[0].Id) + Assert-AreEqual $vmfqdn $fqdnMap[$azureRMVMResources[0].Id] + + Assert-AreEqual $true $fqdnMap.ContainsKey($azureRMVMResources[1].Id) + Assert-AreEqual $vmfqdn $fqdnMap[$azureRMVMResources[1].Id] +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0GetRMVMConnectionDetailsInRG.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0GetRMVMConnectionDetailsInRG.ps1 new file mode 100644 index 000000000000..a0f6f135b012 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0GetRMVMConnectionDetailsInRG.ps1 @@ -0,0 +1,36 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$vmName = "myVM0" +$vmfqdn = "lbipac2b71e2680c44fd987d.westus.cloudapp.azure.com" +$vmWinRMHttpsPort = '40001' +$azureRMVMResources = Get-AzureRMVMsInResourceGroup -resourceGroupName $validRG + +# Test 1 "It should return azure vm connection details for valid input" +$response = Get-AzureRMVMsConnectionDetailsInResourceGroup -resourceGroupName $validRG -azureRMVMResources $azureRMVMResources + +Assert-IsNotNullOrEmpty $response +Assert-AreEqual 3 $response.Count + +$resource = $response[$vmName] + +Assert-AreEqual $vmName $resource.Name +Assert-AreEqual $vmfqdn $resource.fqdn +Assert-AreEqual $vmWinRMHttpsPort $resource.winRMHttpsPort + +#Test 2 "It should return null if no azure vms" +$response = Get-AzureRMVMsConnectionDetailsInResourceGroup -resourceGroupName $validRG -azureRMVMResources $null + +Assert-IsNullOrEmpty $response + +$response = Get-AzureRMVMsConnectionDetailsInResourceGroup -resourceGroupName $validRG -azureRMVMResources $azureRMVMResources -connectedServiceName "connectedServiceName" +Assert-IsNotNullOrEmpty $response +Assert-AreEqual 3 $response.Count + diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0GetStorageAccountType.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0GetStorageAccountType.ps1 new file mode 100644 index 000000000000..8b971336536a --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0GetStorageAccountType.ps1 @@ -0,0 +1,17 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +Register-Mock Validate-AzurePowershellVersion {} +Register-Mock Write-Telemetry { } + +$invalidRGStorage = "invalidRGStorage" + +# Test 1 "Should throw if Blob storage not found" +Assert-Throws { + Get-StorageAccountType -storageAccountName $invalidRGStorage -endpoint @{} +} -MessagePattern "Storage account: $invalidRGStorage not found." diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0GetStorageKey.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0GetStorageKey.ps1 new file mode 100644 index 000000000000..9f1542d45d45 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0GetStorageKey.ps1 @@ -0,0 +1,16 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +Register-Mock Validate-AzurePowershellVersion {} +Register-Mock Write-Telemetry { } + +# Test 1 "should throw if storage not found" +$invalidRGStorage = "invalidRGStorage" +Assert-Throws { + Get-StorageKey -storageAccountName $invalidRGStorage -endpoint @{} +} -MessagePattern "Storage account: $invalidRGStorage not found. Selected Connection 'ServicePrincipal' supports storage account of Azure Resource Manager type only." diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0GetTagBasedFilteredAzureVMs.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0GetTagBasedFilteredAzureVMs.ps1 new file mode 100644 index 000000000000..66522f4d90fb --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0GetTagBasedFilteredAzureVMs.ps1 @@ -0,0 +1,22 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$vm0Name = "myVM0" +$azureRMVMResources = Get-AzureRMVMsInResourceGroup -resourceGroupName $validRG + +# Test 1 "Should Call Does-AzureVMMatchTagFilterCriteria for every VM for filter criteria" +$filteredAzureVMResources = Get-TagBasedFilteredAzureVMs -azureVMResources $azureRMVMResources -filter "role:web" + +#Assert-WasCalled Does-AzureVMMatchTagFilterCriteria -Times $azureRMVMResources.Count -ParametersEvaluator {$filter -eq "role:web"} + +# Test 2 "Should return VMs that matches tag filter criteria" +$filteredAzureVMResources = Get-TagBasedFilteredAzureVMs -azureVMResources $azureRMVMResources -filter "role:test" + +Assert-AreEqual $vm0Name $filteredAzureVMResources.Name \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0GetblobStorageEndpoint.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0GetblobStorageEndpoint.ps1 new file mode 100644 index 000000000000..fa7039d34934 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0GetblobStorageEndpoint.ps1 @@ -0,0 +1,17 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +Register-Mock Validate-AzurePowershellVersion {} +Register-Mock Write-Telemetry { } + +$invalidRGStorage = "invalidRGStorage" + +# Test 1 "Should throw if Blob storage not found" +Assert-Throws { + Get-blobStorageEndpoint -storageAccountName $invalidRGStorage -endpoint @{} +} -MessagePattern "Unable to find storage type $invalidRGStorage with Connection SPN" \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0IsWinRMCustomScriptExtensionExists.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0IsWinRMCustomScriptExtensionExists.ps1 new file mode 100644 index 000000000000..32e300406ed5 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0IsWinRMCustomScriptExtensionExists.ps1 @@ -0,0 +1,61 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$extensionName="WinRMCustomScriptExtension" + +# Test 1 "Should not throw when Resource group us null" +$isExtensionExists = Is-WinRMCustomScriptExtensionExists -resourceGroupName $null -vmName $vm0Name -extensionName $extensionName -connectedServiceName $connectedServiceName +Assert-AreEqual $false $isExtensionExists + +# Test 2 "Should not throw when VM name is null" +$isExtensionExists = Is-WinRMCustomScriptExtensionExists -resourceGroupName $validRG -vmName $null -extensionName $extensionName -connectedServiceName $connectedServiceName +Assert-AreEqual $false $isExtensionExists + +# Test 3 "Should not throw when VM name is invalid" +$isExtensionExists = Is-WinRMCustomScriptExtensionExists -resourceGroupName $validRG -vmName $invalidMachineName -extensionName $extensionName -connectedServiceName $connectedServiceName +Assert-AreEqual $false $isExtensionExists + +# Test 4 "Should not throw Extension name is null" +$isExtensionExists = Is-WinRMCustomScriptExtensionExists -resourceGroupName $validRG -vmName $vm0Name -extensionName $null -connectedServiceName $connectedServiceName +Assert-AreEqual $false $isExtensionExists + +# Test 5 "Should not throw when Extension name is invalid" +$invalidExtensionName="InvalidWinRMCustomScriptExtension" + +$isExtensionExists = Is-WinRMCustomScriptExtensionExists -resourceGroupName $validRG -vmName $vm0Name -extensionName $invalidExtensionName -connectedServiceName $connectedServiceName +Assert-AreEqual $false $isExtensionExists + +# Test 6 "Should return true for valid values, if previous extension deployed successfully" +Register-Mock Get-AzureMachineCustomScriptExtension { return @{"ProvisioningState"="Succeeded"} } +Register-Mock Validate-CustomScriptExecutionStatus { return } +Register-Mock Remove-AzureMachineCustomScriptExtension { return @{}} +Register-Mock Get-Endpoint {} + +$isExtensionExists = Is-WinRMCustomScriptExtensionExists -resourceGroupName $validRG -vmName $vm0Name -extensionName $extensionName -connectedServiceName $connectedServiceName +Assert-AreEqual $true $isExtensionExists +Assert-WasCalled Get-AzureMachineCustomScriptExtension -Times 1 +Assert-WasCalled Validate-CustomScriptExecutionStatus -Times 1 +Assert-WasCalled Remove-AzureMachineCustomScriptExtension -Times 0 + +# Test 7 "Should return false For valid values, if previous extension failed to deploy" +Unregister-Mock Validate-CustomScriptExecutionStatus +Register-Mock Validate-CustomScriptExecutionStatus { throw "error" } + +$isExtensionExists = Is-WinRMCustomScriptExtensionExists -resourceGroupName $validRG -vmName $vm0Name -extensionName $extensionName -connectedServiceName $connectedServiceName + +Assert-AreEqual $false $isExtensionExists +Assert-WasCalled Validate-CustomScriptExecutionStatus -Times 1 + +# Test 8 "Should return false For valid values, if previous extension failed to provision" +Unregister-Mock Get-AzureMachineCustomScriptExtension +Register-Mock Get-AzureMachineCustomScriptExtension { return @{properties=@{ProvisioningState="Failed"}} } + +$isExtensionExists = Is-WinRMCustomScriptExtensionExists -resourceGroupName $validRG -vmName $vm0Name -extensionName $extensionName -connectedServiceName $connectedServiceName + +Assert-AreEqual $false $isExtensionExists +Assert-WasCalled Get-AzureMachineCustomScriptExtension -Times 2 diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0UtilityThrowError.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0UtilityThrowError.ps1 new file mode 100644 index 000000000000..0736af738f66 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0UtilityThrowError.ps1 @@ -0,0 +1,12 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 + + $exceptionMessage = "Exception thrown" + +Assert-Throws { + ThrowError -errorMessage $exceptionMessage +} -MessagePattern "$exceptionMessage AFC_AzureFileCopyMoreHelp https://aka.ms/azurefilecopyreadme" diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0ValidateAzurePSVersion.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0ValidateAzurePSVersion.ps1 new file mode 100644 index 000000000000..399a7e12f364 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0ValidateAzurePSVersion.ps1 @@ -0,0 +1,26 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 + +. $PSScriptRoot\..\Utility.ps1 + +$lowerThanMinimumAzureVersion = New-Object -TypeName System.Version -ArgumentList "0.8.8" +$minimumAzureVersion = New-Object -TypeName System.Version -ArgumentList "1.1.0" +$greaterThanMinimumAzureVersion = New-Object -TypeName System.Version -ArgumentList "2.0.0" + +Register-Mock Get-AzureCmdletsVersion { return $lowerThanMinimumAzureVersion } +Register-Mock Write-Telemetry +Register-Mock Get-Module + +#Test 1 "Should throw if lower azureps version" +Assert-Throws { + Validate-AzurePowershellVersion +} -MessagePattern "*AFC_AzurePSNotInstalled*" + +#Test 2 "Should throw if lower azureps version" +Unregister-Mock Get-AzureCmdletsVersion +Register-Mock Get-AzureCmdletsVersion { return $greaterThanMinimumAzureVersion } + +Validate-AzurePowershellVersion +Assert-WasCalled -Times 1 Get-AzureCmdletsVersion diff --git a/_generated/AzureFileCopyV6_Node20/Tests/L0ValidateCustomScriptExecutionStatus.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/L0ValidateCustomScriptExecutionStatus.ps1 new file mode 100644 index 000000000000..87807e415b4c --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/L0ValidateCustomScriptExecutionStatus.ps1 @@ -0,0 +1,66 @@ +[CmdletBinding()] +param() + +. $PSScriptRoot\..\..\..\Tests\lib\Initialize-Test.ps1 +. $PSScriptRoot\MockVariable.ps1 +. $PSScriptRoot\..\Utility.ps1 +. $PSScriptRoot\MockHelper.ps1 + +$extensionName="WinRMCustomScriptExtension" + +# Test 1 "Should throw Resource group name is null" +Assert-Throws { + $response = Validate-CustomScriptExecutionStatus -resourceGroupName $null -vmName $vm0Name -extensionName $extensionName +} -MessagePattern "AFC_SetCustomScriptExtensionFailed *" + +# Test 2 "Should throw when VM name is null" +Assert-Throws { + $response = Validate-CustomScriptExecutionStatus -resourceGroupName $validRG -vmName $null -extensionName $extensionName +} -MessagePattern "AFC_SetCustomScriptExtensionFailed *" + + +# Test 3 "Should throw when VM name is invalid" +Assert-Throws { + $response = Validate-CustomScriptExecutionStatus -resourceGroupName $validRG -vmName $invalidMachineName -extensionName $extensionName +} -MessagePattern "AFC_SetCustomScriptExtensionFailed *" + +# Test 4 "Should throw Extension name is null" +Assert-Throws { + $response = Validate-CustomScriptExecutionStatus -resourceGroupName $validRG -vmName $vm0Name -extensionName $null +} -MessagePattern "AFC_SetCustomScriptExtensionFailed *" + +# Test 5 "should throw when Extension name is invalid" +$invalidExtensionName="InvalidWinRMCustomScriptExtension" +Assert-Throws { + $response = Validate-CustomScriptExecutionStatus -resourceGroupName $validRG -vmName $vm0Name -extensionName $invalidExtensionName +} -MessagePattern "AFC_SetCustomScriptExtensionFailed *" + +# Test 6 "Should not throw" "For valid values, if previous extension deployed successfully" +Register-Mock Remove-AzureMachineCustomScriptExtension { return @{}} +$vmInstanceViews[$vm0Name]["Extensions"]=$extensions + +Validate-CustomScriptExecutionStatus -resourceGroupName $validRG -vmName $vm0Name -extensionName $extensionName +Assert-WasCalled Remove-AzureMachineCustomScriptExtension -Times 0 + +# Test 7 "Should throw for valid values, if previous extension failed to deploy" +$extensions[0]["SubStatuses"][1]["Message"]="Extension script execution failed." +$vmInstanceViews[$vm0Name]["Extensions"]=$extensions + +Assert-Throws { + Validate-CustomScriptExecutionStatus -resourceGroupName $validRG -vmName $vm0Name -extensionName $extensionName +} -MessagePattern "AFC_SetCustomScriptExtensionFailed *" +Assert-WasCalled Remove-AzureMachineCustomScriptExtension -Times 1 + +# Test 8 "For valid values, if previous extension failed to provision" +Unregister-Mock Remove-AzureMachineCustomScriptExtension +Register-Mock Remove-AzureMachineCustomScriptExtension { return @{}} +$extensions[0]["SubStatuses"][1]["Message"]="Failed to apply the extension." +$vmInstanceViews[$vm0Name]["Extensions"]=$extensions + +Assert-Throws { + Validate-CustomScriptExecutionStatus -resourceGroupName $validRG -vmName $vm0Name -extensionName $extensionName +} -MessagePattern "AFC_SetCustomScriptExtensionFailed *" +Assert-WasCalled Remove-AzureMachineCustomScriptExtension -Times 1 + +#Clean the extension +$vmInstanceViews[$vm0Name]["Extensions"]=@() diff --git a/_generated/AzureFileCopyV6_Node20/Tests/MockHelper.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/MockHelper.ps1 new file mode 100644 index 000000000000..0a777d124974 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/MockHelper.ps1 @@ -0,0 +1,653 @@ +############## Constants ########## +$invalidParam = "invalidParam" +$validRG = "AzureFileCopyTaskPlatformTestDoNotDelete" +$rgWithNoVM = "AzureFIleCopyPTRGNoVMDoNotDelete" +$rgNameWithSecurityGroup = "AzureFIleCopyPTRGWithSGDoNotDelete" +$validStorage = "azurefilecopyptsstore" +$validStorageKey = "validStorageKey" +$storageAccounts = @{} +$storageAccounts.Add($validStorage, $validStorageKey) +$validClassicStorage = "ptclassicstoredontdelete" +$validClassicStorageKey = "validClassicStorageKey" +$storageAccounts.Add($validClassicStorage, $validClassicStorageKey) + +$storageAccountsRG = @{} +$storageAccountsRG.Add($validStorage, $validRG) +$storageAccountsRG.Add($validClassicStorage, $validClassicStorageKey) + +$storageAccountsContext = @{} +$storageAccountContext = @{} +$storageAccountContext.StorageAccountName = $validStorage +$storageAccountsContext.Add($validStorage, $storageAccountContext) + +$validSasToken = 'anyValidSaasToken' + +$location = "West US" +$vm0Name = "myVM0" +$vm1Name = "mytestVM0" +$vm2Name = "mytestPTVM1" +$lbName = "myLB" +$classicvmfqdn = "taskplatformtesttwovm.cloudapp.net" +$rgWithNoClassicVms = "taskplatformtestnovm" +$rgWithClassicVMs = "taskplatformtesttwovm" +$classicvm0 = "vm0" +$classicvm1 = "VM1" +$azurevmFqdn = "azurefilecopyplatformtestsdns.westus.cloudapp.azure.com" +$winrmPort1 = "40001" +$winrmPort2 = "40003" +$winrmPort3 = "40005" +$classicWinrmPort1 = "5986" +$classicWinrmPort2 = "57148" +$classicWinrmPort3 = "57149" + +# creating resourcegroups dictionary +$resourceGroups = @{} +$resourceGroup = @{} +$resourceGroup.ResourceGroupName = $validRG +$resourceGroup.Location = $location +$resourceGroups.Add($validRG, $resourceGroup) + +$resourceGroup.ResourceGroupName = $rgWithNoVM +$resourceGroups.Add($rgWithNoVM, $resourceGroup) +$resourceGroup.ResourceGroupName = $rgWithNoClassicVms +$resourceGroups.Add($rgWithNoClassicVms, $resourceGroup) + +$validActionResponse = @{"Status" = "Succeeded"} +$VMsStatus = @{$vm0Name = "Running"; $vm1Name = "Running";$vm2Name = "Running"} + +$resourceGroups[$validRG].VMsDetails = $VMsStatus + +$vmInstanceView = @{"Statuses" = @(@{"DisplayStatus" = "Provisioning succeeded"},@{"DisplayStatus" = "VM running"}); "Extensions" = @(); "VMAgent" = @{"ExtensionHandlers" = @()}} +$vmInstanceViews = @{$vm0Name = $vmInstanceView; $vm1Name = $vmInstanceView ; $vm2Name = $vmInstanceView} +$vmResources = @(@{"Id" = "Microsoft.Compute/virtualMachines/myVM0"; "Name" = $vm0Name; "Location" = $location; "Tags" = @{"role" = "Test"}}, @{"Id" = "Microsoft.Compute/virtualMachines/mytestVM0"; "Name" = $vm1Name; "Location" = $location; "Tags" = @{"role" = "mytest"}} , @{"Id" = "Microsoft.Compute/virtualMachines/mytestPTVM1"; "Name" = $vm2Name; "Location" = $location; "Tags" = @{"role" = "mytestPT"}}) + +$virtualMachine1 = @{"Id" = "Microsoft.Compute/virtualMachines/myVM0"} +$IpConfigurations1 = @(@{"Name" = "ipconfig1"; "Id" = "Microsoft.Network/networkInterfaces/nic0/ipConfigurations/ipconfig1"; "LoadBalancerInboundNatRules" = @(@{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/RDP-VM0"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/WINRM-VM0"})}) +$networkInterface1 = @{"Name" = "nic0"; "VirtualMachine" = $virtualMachine1; "IpConfigurations" = $IpConfigurations1} + +$virtualMachine2 = @{"Id" = "Microsoft.Compute/virtualMachines/mytestVM0"} +$IpConfigurations2 = @(@{"Name" = "ipconfig2"; "Id" = "Microsoft.Network/networkInterfaces/nicN0/ipConfigurations/ipconfig2"; "LoadBalancerInboundNatRules" = @(@{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/NRDP-VM0"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/NWINRM-VM0"})}) +$networkInterface2 = @{"Name" = "nicN0"; "Id" = "Microsoft.Network/networkInterfaces/nicN0"; "VirtualMachine" = $virtualMachine2; "IpConfigurations" = $IpConfigurations2} + +$virtualMachine3 = @{"Id" = "Microsoft.Compute/virtualMachines/mytestPTVM1"} +$IpConfigurations3 = @(@{"Name" = "ipconfig3"; "Id" = "Microsoft.Network/networkInterfaces/mytestptvm0456/ipConfigurations/ipconfig3"; "LoadBalancerInboundNatRules" = @(@{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/MRDP-VM0"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/MWINRM-VM0"})}) +$networkInterface3 = @{"Name" = "mytestptvm0456"; "Id" = "Microsoft.Network/networkInterfaces/mytestptvm0456"; "VirtualMachine" = $virtualMachine3; "IpConfigurations" = $IpConfigurations3} + +$networkInterfaceResources = @($networkInterface1, $networkInterface2,$networkInterface3) + +$IpConfiguration3 = @{"Id" = "Microsoft.Network/loadBalancers/myLB/frontendIPConfigurations/LoadBalancerFrontend"} +$publicIPAddressResources = @(@{"Name" = "myPublicIP"; "Id" = "Microsoft.Network/publicIPAddresses/myPublicIP"; "IpConfiguration" = $IpConfiguration3; "IpAddress" = "40.118.129.77"; "DnsSettings" = @{"Fqdn" = "lbipac2b71e2680c44fd987d.westus.cloudapp.azure.com"}},@{"Name" = "myTestPTVM0"; "Id" = "Microsoft.Network/publicIPAddresses/myTestPTVM0"; "IpConfiguration" = $IpConfiguration3; "IpAddress" = "13.91.111.214"; "DnsSettings" = @{"Fqdn" = "lbipeca3f178ce794301af12.westus.cloudapp.azure.com"}}) + +$inboundNatRules = @(@{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/RDP-VM0"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/RDP-VM1"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/WINRM-VM0"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/WINRM-VM1"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/NRDP-VM0"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/NRDP-VM1"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/NWINRM-VM0"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/NWINRM-VM1"},@{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/MRDP-VM0"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/MRDP-VM1"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/MWINRM-VM0"}, @{"Id" = "Microsoft.Network/loadBalancers/myLB/inboundNatRules/MWINRM-VM1"}) +$frontEndIPConfigs = @(@{"Name" = "LoadBalancerFrontend"; "PublicIpAddress" = @{"Id" = "Microsoft.Network/publicIPAddresses/myPublicIP"}; "InboundNatRules" = $inboundNatRules}) + +$inboundRule1 = @{"Name" = "RDP-VM0"; "FrontendPort" = "50001"; "BackendPort" = "3389"; "BackendIPConfiguration" = @{"Id" = "Microsoft.Network/networkInterfaces/nic0/ipConfigurations/ipconfig1"}} +$inboundRule2 = @{"Name" = "RDP-VM1"; "FrontendPort" = "50002"; "BackendPort" = "3389"; "BackendIPConfiguration" = $null} +$inboundRule3 = @{"Name" = "WINRM-VM0"; "FrontendPort" = $winrmPort1; "BackendPort" = "5986"; "BackendIPConfiguration" = @{"Id" = "Microsoft.Network/networkInterfaces/nic0/ipConfigurations/ipconfig1"}} +$inboundRule4 = @{"Name" = "WINRM-VM1"; "FrontendPort" = "40002"; "BackendPort" = "5986"; "BackendIPConfiguration" = $null} +$inboundRule5 = @{"Name" = "NRDP-VM0"; "FrontendPort" = "50003"; "BackendPort" = "3389"; "BackendIPConfiguration" = @{"Id" = "Microsoft.Network/networkInterfaces/nicN0/ipConfigurations/ipconfig2"}} +$inboundRule6 = @{"Name" = "NRDP-VM1"; "FrontendPort" = "50004"; "BackendPort" = "3389"; "BackendIPConfiguration" = $null} +$inboundRule7 = @{"Name" = "NWINRM-VM0"; "FrontendPort" = "$winrmPort2"; "BackendPort" = "5986"; "BackendIPConfiguration" = @{"Id" = "Microsoft.Network/networkInterfaces/nicN0/ipConfigurations/ipconfig2"}} +$inboundRule8 = @{"Name" = "NWINRM-VM1"; "FrontendPort" = "40004"; "BackendPort" = "5986"; "BackendIPConfiguration" = $null} +$inboundRule9 = @{"Name" = "MRDP-VM0"; "FrontendPort" = "50005"; "BackendPort" = "3389"; "BackendIPConfiguration" = @{"Id" = "Microsoft.Network/networkInterfaces/mytestptvm0456/ipConfigurations/ipconfig3"}} +$inboundRule10 = @{"Name" = "MRDP-VM1"; "FrontendPort" = "50006"; "BackendPort" = "3389"; "BackendIPConfiguration" = $null} +$inboundRule11 = @{"Name" = "MWINRM-VM0"; "FrontendPort" = "$winrmPort3"; "BackendPort" = "5986"; "BackendIPConfiguration" = @{"Id" = "Microsoft.Network/networkInterfaces/mytestptvm0456/ipConfigurations/ipconfig3"}} +$inboundRule12 = @{"Name" = "MWINRM-VM1"; "FrontendPort" = "40006"; "BackendPort" = "5986"; "BackendIPConfiguration" = $null} +$inboundRules = @($inboundRule1, $inboundRule2, $inboundRule3, $inboundRule4, $inboundRule5, $inboundRule6, $inboundRule7, $inboundRule8,$inboundRule9,$inboundRule10,$inboundRule11,$inboundRule12) + +$loadBalancerDetails = @{"frontEndIPConfigs" = $frontEndIPConfigs; "inboundRules" = $inboundRules} +$loadBalancerResources = @{$lbName = $loadBalancerDetails} + +$azureResourceGroupDeploymentResponse = @{"networkInterfaceResources" = $networkInterfaceResources; "publicIPAddressResources" = $publicIPAddressResources; "loadBalancerResources" = $loadBalancerResources} + +#creating one RG deployment to be used through out test +$resourceGroupDeployments = @{} +$resourceGroupVMs = @{} +$resourceGroupDeployments.Add($validRG, $azureResourceGroupDeploymentResponse) +$resourceGroupVMs.Add($validRG, $VMsStatus) + +$cloudServices = @{} +$cloudServiceWithNoVM = @{"vms" = $null; "vmConnectionDetails" = $null} +$vmConnectionDetailsWithTwoVms = @{$classicvm0 = @{"Name" = $classicvm0; "fqdn" = $classicvmfqdn; "winRMHttpsPort" = $classicWinrmPort1}; $classicvm1 = @{"Name" = $classicvm1; "fqdn" = $classicvmfqdn; "winRMHttpsPort" = $classicWinrmPort2}} +$cloudServiceWithTwoVM = @{"vms" = @(@{"Name" = $classicvm0}, @{"Name" = $classicvm1}); "vmConnectionDetails" = $vmConnectionDetailsWithTwoVms} + +$cloudServices.Add($rgWithNoClassicVms, $cloudServiceWithNoVM) +$cloudServices.Add($rgWithClassicVMs, $cloudServiceWithTwoVM) + +#Extensions +$winRMcustomScripExtensionObject = @{} +$winRMcustomScripExtensionObject["ExtensionType"]="Microsoft.Compute.CustomScriptExtension" +$winRMcustomScripExtensionObject["Name"]="winrmcustomscriptextension" +$winRMcustomScripExtensionObject["TypeHandlerVersion"]="1.4" + +$subStatus0 = @{} +$subStatus0["Code"]="ComponentStatus/StdOut/succeeded" +$subStatus0["DisplayStatus"]="Provisioning succeeded" +$subStatus0["Level"]="Info" +$subStatus0["Message"]="Succeeded\\n\\nDeleted 1 rule(s).\\nOk.\\n\\nOk.\\n" +$subStatus0["Time"]=$null + + +$subStatus1 = @{} +$subStatus1["Code"]="ComponentStatus/StdErr/succeeded" +$subStatus1["DisplayStatus"]="Provisioning succeeded" +$subStatus1["Level"]="Info" +$subStatus1["Message"]="" +$subStatus1["Time"]=$null + +$substatuses = @() +$substatuses+=$subStatus0 +$substatuses+=$subStatus1 + +$winRMcustomScripExtensionObject["SubStatuses"]=@() +$winRMcustomScripExtensionObject["SubStatuses"]+=$substatuses + + +$status0 = @{} +$status0["Code"]="ProvisioningState/succeeded" +$status0["DisplayStatus"]="Provisioning succeeded" +$status0["Level"]="Info" +$status0["Message"]="Finished executing command" +$status0["Time"]=$null + +$statuses = @() +$statuses += $status0 + +$winRMcustomScripExtensionObject["Statuses"]=@() +$winRMcustomScripExtensionObject["Statuses"]+=$statuses + +$extensions = @() +$extensions += $winRMcustomScripExtensionObject + +$getCustomScriptExtensionResponse = @{"Status"="Succeeded"} +$setCustomScriptExtensionResponse = @{"Status"="Succeeded"} +$rgustomScriptExtensionResponse = @{"Status"="Succeeded"} +$winrmCustomScriptExtension="WinRmCustomScriptExtension" +$invalidCustomScriptName = "InvalidConfigureWinRM.ps1" + +$securityGroups = New-Object System.Collections.Generic.List[System.Object] +$securityRules = New-Object System.Collections.Generic.List[System.Object] + +$validSecurityGroupProps = @{"Name"="VMWithSG";"SecurityRules"=$securityRules} +$validSecurityGroup = New-Object PSObject -Property $validSecurityGroupProps +$securityGroups.Add($validSecurityGroup) + + +$securityGroupsRecommended = New-Object System.Collections.Generic.List[System.Object] +$securityRulesRecommended = New-Object System.Collections.Generic.List[System.Object] + +$validSecurityGroupPropsRecommended = @{"Name"="VMWithSGRecPS";"SecurityRules"=$securityRulesRecommended} +$validSecurityGroupRecommended = New-Object PSObject -Property $validSecurityGroupPropsRecommended +$securityGroupsRecommended.Add($validSecurityGroupRecommended) + +$securityGroupsLatest = New-Object System.Collections.Generic.List[System.Object] +$securityRulesLatest = New-Object System.Collections.Generic.List[System.Object] + +$validSecurityGroupPropsLatest = @{"Name"="VMWithSGHighPS";"SecurityRules"=$securityRulesLatest} +$validSecurityGroupLatest = New-Object PSObject -Property $validSecurityGroupPropsLatest +$securityGroupsLatest.Add($validSecurityGroupLatest) + +$securedMockPassword = New-Object -TypeName System.Security.SecureString + +$vmIdWhichHasSecurityGroupPrevious = "/subscriptions/c94bda7a-0577-4374-9c53-0e46a9fb0f70/resourceGroups/AzureFIleCopyPTRGWithSGDoNotDelete/providers/Microsoft.Compute/virtualMachines/VMWithSG" +$vmIdWhichHasSecurityGroupRecommended = "/subscriptions/c94bda7a-0577-4374-9c53-0e46a9fb0f70/resourceGroups/AzureFIleCopyPTRGWithSGDoNotDelete/providers/Microsoft.Compute/virtualMachines/VMWithSGRecPS" +$vmIdWhichHasSecurityGroupLatest = "/subscriptions/c94bda7a-0577-4374-9c53-0e46a9fb0f70/resourceGroups/AzureFIleCopyPTRGWithSGDoNotDelete/providers/Microsoft.Compute/virtualMachines/VMWithSGHighPS" +$vmIdWhichHasNoSecurityGroup = "/subscriptions/c94bda7a-0577-4374-9c53-0e46a9fb0f70/resourceGroups/AzureFileCopyTaskPlatformTestDoNotDelete/providers/Microsoft.Compute/virtualMachines/mytestVM0" +$duplicateRuleName = "VSO-Custom-WinRM-Https-Port-Deplicate" + +#Create Mock Object type for Hyak.Common.CloudException +$Source = @" + using System; +namespace Hyak.Common { + public class CloudException : Exception { + } +} +"@ +Add-Type -TypeDefinition $Source -Language CSharp + +function Get-AzureBlobStorageEndpointFromARM +{ + param([string]$storageAccountName) + + if(-not [string]::IsNullOrEmpty($storageAccountName)) + { + if(-not $storageAccounts.ContainsKey($storageAccountName)) + { + throw "Unable to find storage type $storageAccountName with Connection SPN" + } + + return $storageAccounts[$storageAccountName] + } +} + +function Get-AzureStorageAccountTypeFromARM +{ + param([string]$storageAccountName, + [object]$endpoint) + + if(-not [string]::IsNullOrEmpty($storageAccountName)) + { + if(-not $storageAccounts.ContainsKey($storageAccountName)) + { + throw "Storage account: $storageAccountName not found." + } + + return $storageAccounts[$storageAccountName] + } +} + +function Get-AzureStorageAccountResourceGroupName +{ + param([string]$storageAccountName) + + if (-not [string]::IsNullOrEmpty($storageAccountName)) + { + if(-not $storageAccountsRG.ContainsKey($storageAccountName)) + { + throw "Storage account: $storageAccountName not found. Selected Connection 'ServicePrincipal' supports storage account of Azure Resource Manager type only." + } + + return $storageAccountsRG[$storageAccountName] + } +} + +function Get-AzureStorageKeyFromARM +{ + param([string]$storageAccountName) + + if(-not [string]::IsNullOrEmpty($storageAccountName)) + { + if(-not $storageAccounts.ContainsKey($storageAccountName)) + { + throw "Storage account: $storageAccountName not found. Selected Connection 'ServicePrincipal' supports storage account of Azure Resource Manager type only." + } + + return $storageAccounts[$storageAccountName] + } +} + +function Create-AzureStorageContext +{ + param([string]$storageAccountName, + [string]$storageAccountKey) + + if(-not [string]::IsNullOrEmpty($storageAccountName) -and -not [string]::IsNullOrEmpty($storageAccountKey)) + { + if(-not $storageAccounts.ContainsKey($storageAccountName)) + { + return + } + + return $storageAccountsContext[$storageAccountName] + } +} + +function Get-AzureClassicVMsInResourceGroup +{ + param([string]$resourceGroupName) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and $cloudServices.ContainsKey($resourceGroupName)) + { + return $($cloudServices[$resourceGroupName])["vms"] + } +} + +function Get-AzureRMVMsInResourceGroup +{ + param([string]$resourceGroupName) + + if(-not [string]::IsNullOrEmpty($resourceGroupName)) + { + if(-not $resourceGroups.ContainsKey($resourceGroupName)) + { + throw "Provided resource group '$resourceGroupName' does not exist." + } + + if($resourceGroupDeployments.ContainsKey($resourceGroupName)) + { + return $vmResources + } + } +} + +function Get-AzureRMResourceGroupResourcesDetails +{ + param([string]$resourceGroupName, + [object]$azureRMVMResources) + + if(-not [string]::IsNullOrEmpty($resourceGroupName)) + { + if(-not $resourceGroups.ContainsKey($resourceGroupName)) + { + throw "Resource group '$resourceGroupName' could not be found." + } + + if($resourceGroupDeployments.ContainsKey($resourceGroupName)) + { + return $resourceGroupDeployments[$resourceGroupName] + } + } + + return @{} +} + +function Get-Endpoint +{ + param([string]$connectedServiceName) + + return @{ + "Data"=@{ + "EnvironmentName"="AzureStack" + } + } +} + +function Get-AzureRMResourceGroupResourcesDetailsForAzureStack +{ + param([string]$resourceGroupName, + [object]$azureRMVMResources, + [string]$connectedServiceName) + + if(-not [string]::IsNullOrEmpty($resourceGroupName)) + { + if(-not $resourceGroups.ContainsKey($resourceGroupName)) + { + throw "Resource group '$resourceGroupName' could not be found." + } + + if($resourceGroupDeployments.ContainsKey($resourceGroupName)) + { + return $resourceGroupDeployments[$resourceGroupName] + } + } + + return @{} +} + +function Generate-AzureStorageContainerSASToken +{ + param([string]$containerName, + [object]$storageContext, + [System.Int32]$tokenTimeOutInMinutes) + + if(-not [string]::IsNullOrEmpty($containerName) -and $storageContext) + { + return $validSasToken + } +} + +function Remove-AzureContainer +{ + +} + +function Get-AzureMachineStatus +{ + param([string]$resourceGroupName, + [string]$name) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($name)) + { + if(-not $resourceGroups.ContainsKey($resourceGroupName)) + { + throw "Resource group '$resourceGroupName' could not be found." + } + + $VMs = $resourceGroups[$resourceGroupName].VMsDetails + if($VMs -and $VMs.ContainsKey($name)) + { + $tempExts = $vmInstanceViews[$name]["Extensions"] + if($tempExts -and $tempExts.Count -ge 1) + { + $status = @{} + $status["Extensions"] = $tempExts + #$customScriptExtension=$tempExts[0] + } + else + { + throw "No extension exists with name '$winrmCustomScriptExtension'" + } + } + else + { + throw "The Resource 'Microsoft.Compute/virtualMachines/$name/extensions/$winrmCustomScriptExtension' under resource group '$resourceGroupName' was not found." + } + } + + return $status +} + +function Get-AzureMachineCustomScriptExtension +{ + param([string]$resourceGroupName, + [string]$vmName, + [string]$name) + + $errMsg="The Resource 'Microsoft.Compute/virtualMachines/$vmName/extensions/$name' under resource group '$resourceGroupName' was not found." + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmName)) + { + if(-not $resourceGroups.ContainsKey($resourceGroupName)) + { + throw "Resource group '$resourceGroupName' could not be found." + } + + $VMs = $resourceGroups[$resourceGroupName].VMsDetails + if($VMs -and $VMs.ContainsKey($vmName)) + { + if($name) + { + $tempExts = $vmInstanceViews[$vmName]["Extensions"] + if($tempExts -and $tempExts.Count -ge 1) + { + $response = @{} + if($tempExts[0]["SubStatuses"][1]["Message"] -and $extension[0]["SubStatuses"][1]["Message"] -ne "") + { + $response["ProvisioningState"]="Failed" + } + else + { + $response["ProvisioningState"]="Succeeded" + } + } + else + { + throw $errMsg + } + } + else + { + throw $errMsg + } + } + else + { + throw $errMsg + } + } + + return $response +} + +function Set-AzureMachineCustomScriptExtension +{ + param([string]$resourceGroupName, + [string]$vmName, + [string]$name, + [string[]]$fileUri, + [string]$run, + [string]$argument, + [string]$location) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmName) -and -not [string]::IsNullOrEmpty($name)) + { + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmName)) + { + if(-not $resourceGroups.ContainsKey($resourceGroupName)) + { + throw "Resource group '$resourceGroupName' could not be found." + } + + $VMs = $resourceGroups[$resourceGroupName].VMsDetails + if($VMs -and $VMs.ContainsKey($vmName)) + { + $response = @{} + + if(-not $fileUri) + { + throw "Cannot validate argument on parameter 'FileUri'. The argument is null or empty." + } + + if(-not $run) + { + throw "Cannot validate argument on parameter 'Run'. The argument is null or empty." + } + + if(-not $argument) + { + throw "Cannot validate argument on parameter 'Argument'. The argument is null or empty." + } + + if(-not $location) + { + throw "Cannot validate argument on parameter 'Location'. The argument is null or empty." + } + + elseif($run -eq $invalidCustomScriptName) + { + $extensions[0]["SubStatuses"][1]["Message"]="The argument '$invalidCustomScriptName' to the -File parameter does not exist. Provide the path to an existing '.ps1' file as an argument to the -File parameter." + $errorDetails = @{"Message" = "VM has reported a failure when processing extension 'WinRMCustomScriptExtension'. Error message: Finished executing command."} + $response["Error"]= $errorDetails + $response["Status"]="Failed" + } + else + { + $extensions[0]["SubStatuses"][1]["Message"]="" + $response["Status"]="Succeeded" + } + + $vmInstanceViews[$vmName]["Extensions"]=$extensions + } + else + { + throw "Can not perform requested operation on nested resource. Parent resource '$vmName' not found." + } + } + } + + return $response +} + +function Remove-AzureMachineCustomScriptExtension +{ + param([string]$resourceGroupName, + [string]$vmName, + [string]$name) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmName) -and -not [string]::IsNullOrEmpty($name)) + { + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and -not [string]::IsNullOrEmpty($vmName)) + { + $response = @{} + $VMs = $resourceGroups[$resourceGroupName].VMsDetails + if($VMs -and $VMs.ContainsKey($vmName)) + { + $tempExts = $vmInstanceViews[$vmName]["Extensions"] + if($tempExts -and $tempExts.Count -ge 1) + { + $vmInstanceViews[$vmName]["extensions"]=@() + $response["Status"]="Succeeded" + } + else + { + $response["Status"]="Succeeded" + } + } + else + { + $response["Status"]="Succeeded" + } + } + } + + return $response +} + +function Add-AzureNetworkSecurityRuleConfig +{ +} + +function Add-NetworkSecurityRuleConfig +{ + param([string]$resourceGroupName, + [object]$securityGroups, + [string]$ruleName, + [string]$rulePriotity, + [string]$winrmHttpsPort) + + if(($securityGroups.Count -gt 0) -and (-not $securityGroups[0].SecurityRules -or $ruleName -eq $duplicateRuleName)) + { + Add-AzureNetworkSecurityRuleConfig + + $tempRulePriority = "3986" + if($ruleName -eq $duplicateRuleName) + { + $tempRulePriority = "4036" + } + + $securityRuleProps = @{"Name"=$ruleName;"Priority"=$tempRulePriority} + $securityRule = New-Object PSObject -Property $securityRuleProps + $securityGroups[0].SecurityRules += $securityRule + } + + return $securityGroups +} + +function Set-AzureNetworkSecurityGroup +{ + param([object]$NetworkSecurityGroup) + + if($NetworkSecurityGroup.Name -eq $validSecurityGroup.Name) + { + $validSecurityGroup = $NetworkSecurityGroup + } + + return $validSecurityGroup +} + +function Get-NetworkSecurityGroups +{ + param([string] $resourceGroupName, + [string] $vmId) + + if($vmId -eq $vmIdWhichHasNoSecurityGroup) + { + return @() + } + elseif($vmId -eq $vmIdWhichHasSecurityGroupPrevious) + { + return $securityGroups + } + elseif($vmId -eq $vmIdWhichHasSecurityGroupRecommended) + { + return $securityGroupsRecommended + } + elseif($vmId -eq $vmIdWhichHasSecurityGroupLatest) + { + return $securityGroupsLatest + } + else + { + throw "[Azure Call]No network interface found with virtual machine id $vmId under resource group $rgNameWithSecurityGroup" + } +} + +# Used only in test code +function Remove-NetworkSecurityRuleConfig +{ + param([object] $securityGroups, + [string] $ruleName) + + $validSecurityGroup["SecurityRules"]=@() +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Tests/MockVariable.ps1 b/_generated/AzureFileCopyV6_Node20/Tests/MockVariable.ps1 new file mode 100644 index 000000000000..bfb8c213c959 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Tests/MockVariable.ps1 @@ -0,0 +1,58 @@ + +$validInputSourcePath = Join-Path $env:windir "Source" +$validInputAzureBlobDestinationType = "AzureBlob" +$validInputAzureVmsDestinationType = "AzureVms" +$validInputStorageAccount = "validInputStorageAccount" +$validInputContainerName = "validContainerName" +$validInputBlobPrefix = "validBlobPrefix" +$validResourceGroupName = "validResourceGroupName" +$validInputVmsAdminUserName = "validInputVmsAdminUserName" +$validInputVmsAdminPassword = "validInputVmsAdminPassword" +$validSasToken = '?sv=2015-02-21&sr=c&sig=Ncs6hCfAhzwwWd19eP7ToJATsS3xS1laFfPmRwO90qY%3D&se=2016-01-04T18%3A13%3A12Z&sp=rwdl' + +$validStorageKey = "validsotrageKey" +$validAzCopyLocation = Join-Path $env:windir "AzCopyLocation" +$validInputTargetPath = Join-Path $env:windir "Target" + +$failedStatus = "Failed" +$failedCopyLog = "Failed Copy Operation" +$failedCopyError = $failedCopyLog +$failedDeploymentResponseForCopy = @{"MachineName" = "vm0"; "Status" = $failedStatus; "DeploymentLog" = $failedCopyLog; "ServiceLog" = $null; "Error" = @{"Message" = $failedCopyError}} + +$passedStatus = "Passed" +$successLog = "Success Logs" +$passedDeploymentResponseForCopy = @{"Status" = $passedStatus; "DeploymentLog" = $successLog; "ServiceLog" = $null; "Error" = $null} +$passedLatestDeploymentResponseForCopy = @{"Status" = $passedStatus; "DeploymentLog" = $successLog; "ServiceLog" = $null; "Error" = $null} + +$guidingMessageForAzureFileCopy = "For more info please refer to https://aka.ms/azurefilecopyreadme" +$winrmHelpMsg = "To fix WinRM connection related issues, select the 'Enable Copy Prerequisites' option in the task. If set already, and the target Virtual Machines are backed by a Load balancer, ensure Inbound NAT rules are configured for target port (5986). Applicable only for ARM VMs." + +$succeededStatus = "Succeeded" +$succeededCopyResponse = @{"Status" = $succeededStatus; "Log" = $null; "Error" = $null} + +$assembly = New-Object System.Collections.Generic.List``1[System.Object] + +$testJobs = New-Object System.Collections.Generic.List``1[System.Object] +$failedJob = @{"Id" = "1"; "Status" = "Completed"} +$passedJob = @{"Id" = "2"; "Status" = "Completed"} +$passedLatestJob = @{"Id" = "3"; "Status" = "Completed"} +$passedJob1 = @{"Id" = "1"; "Status" = "Completed"} + +$jobFailedResponse = @{"Status" = $failedStatus; "DeploymentLog" = $failedCopyLog; "ServiceLog" = $null; "Error" = $null} +$jobPassedResponse = @{"Status" = $passedStatus; "DeploymentLog" = $successLog; "ServiceLog" = $null; "Error" = $null} +$jobPassedLatestResponse = @{"Status" = $passedStatus; "DeploymentLog" = $successLog; "ServiceLog" = $null; "Error" = $null} + +$connectedServiceName = "DummyConnectedServiceName" + +$invokeRemoteScriptFailedResponse = @{ExitCode = 1} +$invokeRemoteScriptPassedResponse = @{ExitCode = 0} +$invokeRemoteScriptOnePassOneFailResponse = @($invokeRemoteScriptFailedResponse, $invokeRemoteScriptPassedResponse) +$invokeRemoteScriptAllPassedResponse = @($invokeRemoteScriptPassedResponse, $invokeRemoteScriptPassedResponse) + +$validBlobStorageEndpoint = "https://validInputStorageAccount.blob.core.windows.net" + +$spnEndpoint=@{} +$spnAuth=@{} + +$spnEndpoint.Scheme='ServicePrincipal' +$spnEndpoint.Auth =$spnEndpoint \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/ThirdPartyNotices.txt b/_generated/AzureFileCopyV6_Node20/ThirdPartyNotices.txt new file mode 100644 index 000000000000..ea01c33dc766 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/ThirdPartyNotices.txt @@ -0,0 +1,1137 @@ + +THIRD-PARTY SOFTWARE NOTICES AND INFORMATION +Do Not Translate or Localize + +Azure File Copy incorporates third party material from the projects listed below. The original copyright notice and the license under which Microsoft received such third party material are set forth below. Microsoft reserves all other rights not expressly granted, whether by implication, estoppel or otherwise. + +1. balanced-match (https://github.com/juliangruber/balanced-match) +2. brace-expansion (https://github.com/juliangruber/brace-expansion) +3. buffer-equal-constant-time (https://github.com/salesforce/buffer-equal-constant-time) +4. concat-map (https://github.com/substack/node-concat-map) +5. hoek (https://github.com/hapijs/hoek) + Includes:Deep-eql +6. isemail (https://github.com/hapijs/isemail) +7. joi (https://github.com/hapijs/joi) +8. jsonwebtoken (https://github.com/auth0/node-jsonwebtoken) +9. lodash.once (https://github.com/lodash/lodash) +10. minimatch (https://github.com/isaacs/minimatch) +11. Mockery (https://github.com/mfncooper/mockery) +12. Moment (https://github.com/moment/moment) + Includes:Files with code from Closure +13. ms (https://github.com/zeit/ms) +14. Node.js (https://nodejs.org/) +15. node-ecdsa-sig-formatter (https://github.com/Brightspace/node-ecdsa-sig-formatter) +16. node-jwa (https://github.com/brianloveswords/node-jwa) +17. node-jws (https://github.com/brianloveswords/node-jws) +18. node-uuid (https://github.com/broofa/node-uuid/) +19. OpenSSL (http://www.openssl.org) +20. Q (https://github.com/kriskowal/q) +21. safe-buffer (https://github.com/feross/safe-buffer) +22. sax js (https://github.com/isaacs/sax-js) +23. semver (https://github.com/npm/node-semver/) +24. ShellJS (https://github.com/shelljs/shelljs) +25. topo (https://github.com/hapijs/topo) +26. tunnel (https://github.com/koichik/node-tunnel) +27. underscore.js (http://underscorejs.org/; https://github.com/jashkenas/underscore) +28. vso-node-api (https://github.com/Microsoft/vsts-node-api) +29. VSTS-task-lib (https://github.com/Microsoft/vsts-task-lib) +30. Xml2JS (https://github.com/Leonidas-from-XIV/node-xml2js) +31. Xmlbuilder (https://github.com/oozcitak/xmlbuilder-js) +32. xtend (https://github.com/Raynos/xtend) +33. @types/node (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git) +34. @types/q (https://www.github.com/DefinitelyTyped/DefinitelyTyped.git) +35. @types/mocha (https://github.com/DefinitelyTyped/DefinitelyTyped.git) + + +%% balanced-match NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +(MIT) + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +========================================= +END OF balanced-match NOTICES, INFORMATION, AND LICENSE + +%% brace-expansion NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +(MIT) + +Copyright (c) 2013 Julian Gruber + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +========================================= +END OF brace-expansion NOTICES, INFORMATION, AND LICENSE + +%% buffer-equal-constant-time NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2013, GoInstant Inc., a salesforce.com company +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +* Neither the name of salesforce.com, nor GoInstant, nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +========================================= +END OF buffer-equal-constant-time NOTICES, INFORMATION, AND LICENSE + +%% concat-map NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) James Halliday/substack + +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF concat-map NOTICES, INFORMATION, AND LICENSE + +%% hoek NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= + +Copyright (c) 2011-2014, Walmart and other contributors. +Copyright (c) 2011, Yahoo Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * The names of any contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + * * * + +The complete list of contributors can be found at: https://github.com/hapijs/hapi/graphs/contributors +Portions of this project were initially based on the Yahoo! Inc. Postmile project, +published at https://github.com/yahoo/postmile. +========================================= +Includes code from Deep-eql + +Copyright (c) 2013 Jake Luer jake@alogicalparadox.com + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF hoek NOTICES, INFORMATION, AND LICENSE + +%% isemail NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2008-2011, Dominic Sayers +Copyright (c) 2013-2014, GlobeSherpa +Copyright (c) 2014-2015, Eli Skeggs + +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +- Neither the name of Dominic Sayers nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +========================================= +END OF isemail NOTICES, INFORMATION, AND LICENSE + +%% joi NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2012-2014, Walmart and other contributors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * The names of any contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + * * * + +The complete list of contributors can be found at: https://github.com/hapijs/joi/graphs/contributors +========================================= +END OF joi NOTICES, INFORMATION, AND LICENSE + +%% jsonwebtoken NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2015 Auth0, Inc. (http://auth0.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +========================================= +END OF jsonwebtoken NOTICES, INFORMATION, AND LICENSE + +%% lodash.once NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright jQuery Foundation and other contributors + +Based on Underscore.js, copyright Jeremy Ashkenas, +DocumentCloud and Investigative Reporters & Editors + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/lodash/lodash + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code displayed within the prose of the +documentation. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +Files located in the node_modules and vendor directories are externally +maintained libraries used by this software which have their own +licenses; we recommend you read them, as their terms may differ from the +terms above. +========================================= +END OF lodash.once NOTICES, INFORMATION, AND LICENSE + +%% minimatch NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +========================================= +END OF minimatch NOTICES, INFORMATION, AND LICENSE + +%% Mockery NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyrights for code authored by Yahoo! Inc. is licensed under the following +terms: + + MIT License + + Copyright (c) 2011 Yahoo! Inc. All Rights Reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to + deal in the Software without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +========================================= +END OF Mockery NOTICES, INFORMATION, AND LICENSE + +%% Moment NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) JS Foundation and other contributors + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. +========================================= +Files with code from Closure + +Copyright (c) 2006 The Closure Library Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +========================================= +END OF Moment NOTICES, INFORMATION, AND LICENSE + +%% ms NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +(The MIT License) + +Copyright (c) 2014 Guillermo Rauch +Copyright (c) 2016 Zeit, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the Software), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF ms NOTICES, INFORMATION, AND LICENSE + +%% Node.js NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +""" + +The Node.js license applies to all parts of Node.js that are not externally +maintained libraries. +========================================= +END OF Node.js NOTICES, INFORMATION, AND LICENSE + +%% node-ecdsa-sig-formatter NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= + Copyright 2015 D2L Corporation + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +========================================= +END OF node-ecdsa-sig-formatter NOTICES, INFORMATION, AND LICENSE + +%% node-jwa NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2013 Brian J. Brennan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF node-jwa NOTICES, INFORMATION, AND LICENSE + +%% node-jws NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2013 Brian J. Brennan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF node-jws NOTICES, INFORMATION, AND LICENSE + +%% node-uuid NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2010-2012 Robert Kieffer + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF node-uuid NOTICES, INFORMATION, AND LICENSE + +%% OpenSSL NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= + LICENSE ISSUES + ============== + + The OpenSSL toolkit stays under a dual license, i.e. both the conditions of + the OpenSSL License and the original SSLeay license apply to the toolkit. + See below for the actual license texts. Actually both licenses are BSD-style + Open Source licenses. In case of any license issues related to OpenSSL + please contact openssl-core@openssl.org. + + OpenSSL License + --------------- + +/* ==================================================================== + * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. All advertising materials mentioning features or use of this + * software must display the following acknowledgment: + * This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit. (http://www.openssl.org/) + * + * 4. The names OpenSSL Toolkit and OpenSSL Project must not be used to + * endorse or promote products derived from this software without + * prior written permission. For written permission, please contact + * openssl-core@openssl.org. + * + * 5. Products derived from this software may not be called OpenSSL + * nor may OpenSSL appear in their names without prior written + * permission of the OpenSSL Project. + * + * 6. Redistributions of any form whatsoever must retain the following + * acknowledgment: + * This product includes software developed by the OpenSSL Project + * for use in the OpenSSL Toolkit (http://www.openssl.org/) + * + * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + * OF THE POSSIBILITY OF SUCH DAMAGE. + * ==================================================================== + * + * This product includes cryptographic software written by Eric Young + * (eay@cryptsoft.com). This product includes software written by Tim + * Hudson (tjh@cryptsoft.com). + * + */ + + Original SSLeay License + ----------------------- + +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) + * All rights reserved. + * + * This package is an SSL implementation written + * by Eric Young (eay@cryptsoft.com). + * The implementation was written so as to conform with Netscapes SSL. + * + * This library is free for commercial and non-commercial use as long as + * the following conditions are aheared to. The following conditions + * apply to all code found in this distribution, be it the RC4, RSA, + * lhash, DES, etc., code; not just the SSL code. The SSL documentation + * included with this distribution is covered by the same copyright terms + * except that the holder is Tim Hudson (tjh@cryptsoft.com). + * + * Copyright remains Eric Young's, and as such any Copyright notices in + * the code are not to be removed. + * If this package is used in a product, Eric Young should be given attribution + * as the author of the parts of the library used. + * This can be in the form of a textual message at program startup or + * in documentation (online or textual) provided with the package. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes cryptographic software written by + * Eric Young (eay@cryptsoft.com) + * The word 'cryptographic' can be left out if the rouines from the library + * being used are not cryptographic related :-). + * 4. If you include any Windows specific code (or a derivative thereof) from + * the apps directory (application code) you must include an acknowledgement: + * This product includes software written by Tim Hudson (tjh@cryptsoft.com) + * + * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * The licence and distribution terms for any publically available version or + * derivative of this code cannot be changed. i.e. this code cannot simply be + * copied and put under another distribution licence + * [including the GNU Public Licence.] +========================================= +END OF OpenSSL NOTICES, INFORMATION, AND LICENSE + +%% Q NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright 2009�2014 Kristopher Michael Kowal. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. + +The file q.js is prefaced by the following additional third-party subcomponent information: + +/*! + * + * Copyright 2009-2012 Kris Kowal under the terms of the MIT + * license found at http://github.com/kriskowal/q/raw/master/LICENSE + * + * With parts by Tyler Close + * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found + * at http://www.opensource.org/licenses/mit-license.html + * Forked at ref_send.js version: 2009-05-11 + * + * With parts by Mark Miller + * Copyright (C) 2011 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +========================================= +END OF Q NOTICES, INFORMATION, AND LICENSE + +%% safe-buffer NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) Feross Aboukhadijeh + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +========================================= +END OF safe-buffer NOTICES, INFORMATION, AND LICENSE + +%% sax js NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +==== + +`String.fromCodePoint` by Mathias Bynens used according to terms of MIT +License, as follows: + + Copyright Mathias Bynens + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF sax js NOTICES, INFORMATION, AND LICENSE + +%% semver NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +========================================= +END OF semver NOTICES, INFORMATION, AND LICENSE + +%% ShellJS NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2012, Artur Adib +All rights reserved. + +You may use this project under the terms of the New BSD license as follows: + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name of Artur Adib nor the + names of the contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +========================================= +END OF ShellJS NOTICES, INFORMATION, AND LICENSE + +%% topo NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2012-2014, Walmart and other contributors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * The names of any contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + * * * + +The complete list of contributors can be found at: https://github.com/hapijs/topo/graphs/contributors +========================================= +END OF topo NOTICES, INFORMATION, AND LICENSE + +%% tunnel NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2012 Koichi Kobayashi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +========================================= +END OF tunnel NOTICES, INFORMATION, AND LICENSE + +%% underscore.js NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2009-2017 Jeremy Ashkenas, DocumentCloud and Investigative +Reporters & Editors + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +========================================= +END OF underscore.js NOTICES, INFORMATION, AND LICENSE + +%% vso-node-api NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) Microsoft Corporation + +All rights reserved. + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +========================================= +END OF vso-node-api NOTICES, INFORMATION, AND LICENSE + +%% VSTS-task-lib NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) Microsoft Corporation. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +========================================= +END OF VSTS-task-lib NOTICES, INFORMATION, AND LICENSE + +%% Xml2JS NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright 2010, 2011, 2012, 2013. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. +========================================= +END OF Xml2JS NOTICES, INFORMATION, AND LICENSE + +%% Xmlbuilder NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) 2013 Ozgur Ozcitak + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +========================================= +END OF Xmlbuilder NOTICES, INFORMATION, AND LICENSE + +%% xtend NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +Copyright (c) 2012-2014 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the Software), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +========================================= +END OF xtend NOTICES, INFORMATION, AND LICENSE + +%% @types/mocha NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +The MIT License (MIT) + +Copyright (c) Microsoft Corporation. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +========================================= +END OF @types/mocha NOTICES, INFORMATION, AND LICENSE + +%% @types/node NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +MIT License + +Copyright (c) Microsoft Corporation. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +========================================= +END OF @types/node NOTICES, INFORMATION, AND LICENSE + +%% @types/q NOTICES, INFORMATION, AND LICENSE BEGIN HERE +========================================= +MIT License + +Copyright (c) Microsoft Corporation. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +========================================= +END OF @types/q NOTICES, INFORMATION, AND LICENSE \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/Utility.ps1 b/_generated/AzureFileCopyV6_Node20/Utility.ps1 new file mode 100644 index 000000000000..0d8272dd3d2e --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/Utility.ps1 @@ -0,0 +1,1387 @@ +# Utility Functions used by AzureFileCopy.ps1 (other than azure calls) # + +$ErrorActionPreference = 'Stop' +$azureStackEnvironment = "AzureStack" +$jobId = $env:SYSTEM_JOBID; + +$featureFlags = @{ + retireAzureRM = [System.Convert]::ToBoolean($env:RETIRE_AZURERM_POWERSHELL_MODULE) +} + +function Get-AzureCmdletsVersion +{ + return (Get-Module AzureRM -ListAvailable).Version +} + +function Get-AzureVersionComparison($azureVersion, $compareVersion) +{ + Write-Verbose "Compare azure versions: $azureVersion, $compareVersion" + return ($azureVersion -and $azureVersion -gt $compareVersion) +} + +function Get-AzureUtility +{ + $azureUtilityARM = "AzureUtilityARM.ps1" + $azUtilityVersion100 = "AzureUtilityAz1.0.ps1" + + if ($featureFlags.retireAzureRM) { + return $azUtilityVersion100 + } + else { + if (Get-Module Az.Accounts -ListAvailable) { + Write-Verbose "Az module is installed in the agent." + return $azUtilityVersion100 + } + Write-Warning "Az module is not installed in the agent." + return $azureUtilityARM + } +} + +function Get-Endpoint +{ + param([String] [Parameter(Mandatory=$true)] $connectedServiceName) + + $serviceEndpoint = Get-VstsEndpoint -Name "$connectedServiceName" + return $serviceEndpoint +} + +function Validate-AzurePowershellVersion +{ + Write-Verbose "Validating installed azure powershell version is greater than or equal to AzureRM 1.1.0" + if (!(Get-Module Az.Accounts -ListAvailable)){ + $currentVersion = Get-AzureCmdletsVersion + Write-Verbose "Installed Azure PowerShell version: $currentVersion" + + $minimumAzureVersion = New-Object System.Version(1, 1, 0) + $versionCompatible = Get-AzureVersionComparison -AzureVersion $currentVersion -CompareVersion $minimumAzureVersion + + if(!$versionCompatible) + { + Write-Telemetry "Task_InternalError" "UnsupportedAzurePSVersion" + Throw (Get-VstsLocString -Key "AFC_AzurePSNotInstalled" -ArgumentList $minimumAzureVersion) + } + + Write-Verbose "Validated the required azure powershell version is greater than or equal to 1.1.0" + } +} + +function Get-StorageKey +{ + param([string][Parameter(Mandatory=$true)]$storageAccountName, + [object][Parameter(Mandatory=$true)]$endpoint, + [string][Parameter(Mandatory=$false)]$connectedServiceNameARM, + [string][Parameter(Mandatory=$false)]$vstsAccessToken) + + $storageAccountName = $storageAccountName.Trim() + + # checking azure powershell version to make calls to ARM endpoint + Validate-AzurePowershellVersion + + # getting storage account key from ARM endpoint + $storageKey = Get-AzureStorageKeyFromARM -storageAccountName $storageAccountName -serviceEndpoint $endpoint $connectedServiceNameARM $vstsAccessToken + + return $storageKey +} + +function Get-blobStorageEndpoint +{ + param([string][Parameter(Mandatory=$true)]$storageAccountName, + [object][Parameter(Mandatory=$true)]$endpoint, + [string][Parameter(Mandatory=$false)]$connectedServiceNameARM, + [string][Parameter(Mandatory=$false)]$vstsAccessToken) + + $storageAccountName = $storageAccountName.Trim() + + # getting storage account key from ARM endpoint + $blobStorageEndpoint = Get-AzureBlobStorageEndpointFromARM $storageAccountName $endpoint $connectedServiceNameARM $vstsAccessToken + + return $blobStorageEndpoint +} + +function Get-StorageAccountType +{ + param([string][Parameter(Mandatory=$true)]$storageAccountName, + [object][Parameter(Mandatory=$true)]$endpoint, + [string][Parameter(Mandatory=$false)]$connectedServiceNameARM, + [string][Parameter(Mandatory=$false)]$vstsAccessToken) + + $storageAccountName = $storageAccountName.Trim() + # getting storage account type from ARM endpoint + $storageAccountType = Get-AzureStorageAccountTypeFromARM $storageAccountName $endpoint $connectedServiceNameARM $vstsAccessToken + + if($null -ne $storageAccountType) + { + return $storageAccountType.ToString() + } +} + +function ThrowError +{ + param([string]$errorMessage) + + $readmelink = "https://aka.ms/azurefilecopyreadme" + $helpMessage = (Get-VstsLocString -Key "AFC_AzureFileCopyMoreHelp" -ArgumentList $readmelink) + throw "$errorMessage $helpMessage" +} + +function ConvertTo-Pfx { + param( + [String][Parameter(Mandatory = $true)] $pemFileContent + ) + + if ($ENV:Agent_TempDirectory) { + $pemFilePath = "$ENV:Agent_TempDirectory\clientcertificate.pem" + $pfxFilePath = "$ENV:Agent_TempDirectory\clientcertificate.pfx" + $pfxPasswordFilePath = "$ENV:Agent_TempDirectory\clientcertificatepassword.txt" + } + else { + $pemFilePath = "$ENV:System_DefaultWorkingDirectory\clientcertificate.pem" + $pfxFilePath = "$ENV:System_DefaultWorkingDirectory\clientcertificate.pfx" + $pfxPasswordFilePath = "$ENV:System_DefaultWorkingDirectory\clientcertificatepassword.txt" + } + + # save the PEM certificate to a PEM file + Set-Content -Path $pemFilePath -Value $pemFileContent + + # use openssl to convert the PEM file to a PFX file + $pfxFilePassword = [System.Guid]::NewGuid().ToString() + + if (CmdletHasMember -cmdlet Set-Content -memberName NoNewline) { + Set-Content -Path $pfxPasswordFilePath -Value $pfxFilePassword -NoNewline + } + else { + [System.IO.File]::WriteAllText($pfxPasswordFilePath, $pfxFilePassword, [System.Text.Encoding]::ASCII) + } + + $openSSLExePath = "$PSScriptRoot\ps_modules\VstsAzureHelpers_\openssl\openssl.exe" + $env:OPENSSL_CONF = "$PSScriptRoot\ps_modules\VstsAzureHelpers_\openssl\openssl.cnf" + $env:RANDFILE=".rnd" + + $openSSLArgs = "pkcs12 -export -in $pemFilePath -out $pfxFilePath -password file:`"$pfxPasswordFilePath`"" + + Invoke-VstsTool -FileName $openSSLExePath -Arguments $openSSLArgs -RequireExitCodeZero + + return $pfxFilePath, $pfxFilePassword +} + +function Upload-FilesToAzureContainer +{ + param([string][Parameter(Mandatory=$true)]$sourcePath, + [object][Parameter(Mandatory=$true)]$endPoint, + [string][Parameter(Mandatory=$true)]$storageAccountName, + [string][Parameter(Mandatory=$true)]$containerName, + [string]$blobPrefix, + [string]$blobStorageEndpoint, + [string][Parameter(Mandatory=$true)]$azCopyLocation, + [string]$additionalArguments, + [string][Parameter(Mandatory=$true)]$destinationType, + [bool]$useDefaultArguments, + [bool]$cleanTargetBeforeCopy, + [bool]$useSanitizerActivate = $false + ) + + try + { + $aadAuthorityUrl = "https://login.microsoftonline.com/" + if ($endpoint.Data.EnvironmentAuthorityUrl -ne $null) { + $aadAuthorityUrl = $endpoint.Data.EnvironmentAuthorityUrl + } + + Write-Verbose "AAD autority URL = $aadAuthorityUrl" + Write-Host " mime: $PSScriptRoot\MimeMapping.json" + $env:AZCOPY_CONTENT_TYPE_MAP ="$PSScriptRoot\MimeMapping.json" + + if ($endPoint.Auth.Scheme -eq 'ServicePrincipal') { + try { + if($endPoint.Auth.Parameters.AuthenticationType -eq 'SPNCertificate') { + $pemFileContent = $endPoint.Auth.Parameters.ServicePrincipalCertificate + $pfxFilePath, $pfxFilePassword = ConvertTo-Pfx -pemFileContent $pemFileContent + + $env:AZCOPY_AUTO_LOGIN_TYPE = "PSCRED" + $env:AZCOPY_SPA_CERT_PASSWORD = $pfxFilePassword + } + else { + $env:AZCOPY_AUTO_LOGIN_TYPE = "PSCRED" + $env:AZCOPY_SPA_CLIENT_SECRET = $endPoint.Auth.Parameters.ServicePrincipalKey + } + } + catch { + # Provide an additional, custom, credentials-related error message. + $exceptionMessage = $_.Exception.Message.ToString() + Write-Verbose "ExceptionMessage: $exceptionMessage" + throw (New-Object System.Exception((Get-VstsLocString -Key ServicePrincipalError), $_.Exception)) + } + } + elseif ($endPoint.Auth.Scheme -eq 'ManagedServiceIdentity' -or $endPoint.Auth.Scheme -eq 'WorkloadIdentityFederation') { + $env:AZCOPY_AUTO_LOGIN_TYPE = "PSCRED" + } + else { + throw (Get-VstsLocString -Key UnsupportedAuthScheme -ArgumentList $endPoint.Auth.Scheme) + } + + Write-Output (Get-VstsLocString -Key "AFC_UploadFilesStorageAccount" -ArgumentList $sourcePath, $storageAccountName, $containerName, $blobPrefix) + + $blobPrefix = $blobPrefix.Trim() + $trailingChars = [regex]::Escape("/") + '+$' + $blobPrefix = $blobPrefix -replace $trailingChars, "/" + $containerURL = [string]::Format("{0}/{1}/{2}", $blobStorageEndpoint.Trim("/"), $containerName, $blobPrefix.TrimStart("/")) + + $containerURL = $containerURL.Replace('$','`$') + $azCopyExeLocation = Join-Path -Path $azCopyLocation -ChildPath "AzCopy.exe" + if($cleanTargetBeforeCopy) + { + + Write-Output "##[command] & azcopy rm `"$containerURL`" --recursive=true" + + $cleanToBlobCommand = "azcopy rm `"$containerURL`" --recursive=true" + + Invoke-Expression -Command $cleanToBlobCommand + + } + if ($useSanitizerActivate) { + # Splitting arguments on space, but not on space inside quotes + $sanitizedArguments = [regex]::Split($additionalArguments, ' (?=(?:[^"]|"[^"]*")*$)') + Write-Output "##[command] & azcopy copy `"$sourcePath`" `"$containerURL`" $sanitizedArguments" + & azcopy copy $sourcePath $containerURL $sanitizedArguments + } else { + Write-Output "##[command] & azcopy copy `"$sourcePath`" `"$containerURL`" $additionalArguments" + $azCopyCommand = "azcopy copy `"$sourcePath`" `"$containerURL`" $additionalArguments" + Invoke-Expression -Command $azCopyCommand + } + + if($LASTEXITCODE -eq 0) + { + Write-Output (Get-VstsLocString -Key "AFC_UploadFileSuccessful" -ArgumentList $sourcePath, $storageAccountName, $containerName, $blobPrefix) + } + else + { + throw (Get-VstsLocString -Key "AFC_AzCopyBlobUploadNonZeroExitCode") + } + } + catch + { + # deletes container only if we have created temporary container + if ($destinationType -ne "AzureBlob") + { + Remove-AzureContainer -containerName $containerName -storageContext $storageContext + } + + $exceptionMessage = $_.Exception.Message.ToString() + Write-Verbose "ExceptionMessage: $exceptionMessage" + + $errorMessage = (Get-VstsLocString -Key "AFC_UploadContainerStorageAccount" -ArgumentList $containerName, $storageAccountName, $blobPrefix, $exceptionMessage) + Write-Telemetry "Task_InternalError" "BlobUploadFailed" + ThrowError -errorMessage $errorMessage + } + finally + { + Import-Module "$PSScriptRoot\ps_modules\VstsAzureHelpers_" + Remove-EndpointSecrets + + } +} + +function Does-AzureVMMatchTagFilterCriteria +{ + param([object]$azureVMResource, + [string]$filter) + + if($azureVMResource) + { + # If no filters are provided, by default operations are performed on all azure resources + if([string]::IsNullOrEmpty($filter)) + { + return $true + } + + $tagsFilterArray = $filter.Split(';').Trim() + foreach($tag in $tagsFilterArray) + { + $tagKeyValue = $tag.Split(':').Trim() + $tagKey = $tagKeyValue[0] + $tagValues = $tagKeyValue[1] + + if($tagKeyValue.Length -ne 2 -or [string]::IsNullOrWhiteSpace($tagKey) -or [string]::IsNullOrWhiteSpace($tagValues)) + { + Write-Telemetry "Input_Validation" "FILTERING_IncorrectFormat" + throw (Get-VstsLocString -Key "AFC_IncorrectTags") + } + + $tagValueArray = $tagValues.Split(',').Trim() + + if($azureVMResource.Tags) + { + foreach($azureVMResourceTag in $azureVMResource.Tags.GetEnumerator()) + { + if($azureVMResourceTag.Key -contains $tagKey) + { + $azureVMTagValueArray = $azureVMResourceTag.Value.Split(",").Trim() + foreach($tagValue in $tagValueArray) + { + if($azureVMTagValueArray -contains $tagValue) + { + return $true + } + } + } + } + } + } + + return $false + } +} + +function Get-TagBasedFilteredAzureVMs +{ + param([object]$azureVMResources, + [string]$filter) + + if($azureVMResources) + { + $filteredAzureVMResources = @() + foreach($azureVMResource in $azureVMResources) + { + if(Does-AzureVMMatchTagFilterCriteria -azureVMResource $azureVMResource -filter $filter) + { + Write-Verbose "azureVM with name: $($azureVMResource.Name) matches filter criteria" + $filteredAzureVMResources += $azureVMResource + } + } + + return $filteredAzureVMResources + } +} + +function Get-MachineBasedFilteredAzureVMs +{ + param([object]$azureVMResources, + [string]$filter) + + if($azureVMResources -and -not [string]::IsNullOrEmpty($filter)) + { + $filteredAzureVMResources = @() + + $machineFilterArray = $filter.Split(',').Trim() + $machineFilterArray = $machineFilterArray | % {$_.ToLower()} | Select -Uniq + foreach($machine in $machineFilterArray) + { + $azureVMResource = $azureVMResources | Where-Object {$_.Name -contains $machine} + if($azureVMResource) + { + $filteredAzureVMResources += $azureVMResource + } + else + { + $commaSeparatedMachinesNotPresentInRG += ($(if($commaSeparatedMachinesNotPresentInRG){", "}) + $machine) + } + + if($commaSeparatedMachinesNotPresentInRG -ne $null) + { + Write-Telemetry "Input_Validation" "FILTERING_MachinesNotPresentInRG" + throw (Get-VstsLocString -Key "AFC_MachineDoesNotExist" -ArgumentList $commaSeparatedMachinesNotPresentInRG) + } + } + + return $filteredAzureVMResources + } +} + +function Get-FilteredAzureVMsInResourceGroup +{ + param([object]$azureVMResources, + [string]$resourceFilteringMethod, + [string]$filter) + + if($azureVMResources -and -not [string]::IsNullOrEmpty($resourceFilteringMethod)) + { + if($resourceFilteringMethod -eq "tags" -or [string]::IsNullOrEmpty($filter)) + { + $filteredAzureVMResources = Get-TagBasedFilteredAzureVMs -azureVMResources $azureVMResources -filter $filter + } + else + { + $filteredAzureVMResources = Get-MachineBasedFilteredAzureVMs -azureVMResources $azureVMResources -filter $filter + } + + return $filteredAzureVMResources + } +} + +function Get-FilteredAzureClassicVMsInResourceGroup +{ + param([object]$azureClassicVMResources, + [string]$resourceFilteringMethod, + [string]$filter) + + if($azureClassicVMResources -and -not [string]::IsNullOrEmpty($resourceFilteringMethod)) + { + Write-Verbose "Filtering azureClassicVM resources with filtering option:'$resourceFilteringMethod' and filters:'$filter'" + $filteredAzureClassicVMResources = Get-FilteredAzureVMsInResourceGroup -azureVMResources $azureClassicVMResources -resourceFilteringMethod $resourceFilteringMethod -filter $filter + + return $filteredAzureClassicVMResources + } +} + +function Get-FilteredAzureRMVMsInResourceGroup +{ + param([object]$azureRMVMResources, + [string]$resourceFilteringMethod, + [string]$filter) + + if($azureRMVMResources -and -not [string]::IsNullOrEmpty($resourceFilteringMethod)) + { + Write-Verbose "Filtering azureRMVM resources with filtering option:$resourceFilteringMethod and filters:$filter" + $filteredAzureRMVMResources = Get-FilteredAzureVMsInResourceGroup -azureVMResources $azureRMVMResources -resourceFilteringMethod $resourceFilteringMethod -filter $filter + + return $filteredAzureRMVMResources + } +} + +function Get-MachineNameFromId +{ + param([string]$resourceGroupName, + [System.Collections.Hashtable]$map, + [string]$mapParameter, + [Object]$azureRMVMResources, + [boolean]$throwOnTotalUnavailability, + [string]$debugLogsFlag) + + if($map) + { + if($debugLogsFlag -eq "true") + { + Write-Verbose "Map for $mapParameter : " -verbose + Write-Verbose ($map | Format-List | Out-String) -verbose + + Write-Verbose "azureRMVMResources: " -verbose + Write-Verbose ($azureRMVMResources | Format-List | Out-String) -verbose + } + + Write-Verbose "throwOnTotalUnavailability: $throwOnTotalUnavailability" + + $errorCount = 0 + foreach($vm in $azureRMVMResources) + { + $value = $map[$vm.Id.ToLower()] + $resourceName = $vm.Name + if(-not [string]::IsNullOrEmpty($value)) + { + Write-Verbose "$mapParameter value for resource $resourceName is $value" + $map.Remove($vm.Id.ToLower()) + $map[$resourceName] = $value + } + else + { + $errorCount = $errorCount + 1 + Write-Verbose "Unable to find $mapParameter for resource $resourceName" + } + } + + if($throwOnTotalUnavailability -eq $true) + { + if($errorCount -eq $azureRMVMResources.Count -and $azureRMVMResources.Count -ne 0) + { + throw (Get-VstsLocString -Key "AFC_MachineNameFromIdErrorAllResources" -ArgumentList $mapParameter, $resourceGroupName) + } + else + { + if($errorCount -gt 0 -and $errorCount -ne $azureRMVMResources.Count) + { + Write-Warning (Get-VstsLocString -Key "AFC_MachineNameFromIdError" -ArgumentList $mapParameter, $errorCount, $resourceGroupName) + } + } + } + + return $map + } +} + +function Get-MachinesFqdnsForPublicIP +{ + param([string]$resourceGroupName, + [Object]$publicIPAddressResources, + [Object]$networkInterfaceResources, + [Object]$azureRMVMResources, + [System.Collections.Hashtable]$fqdnMap, + [string]$debugLogsFlag) + + if(-not [string]::IsNullOrEmpty($resourceGroupName)-and $publicIPAddressResources -and $networkInterfaceResources) + { + Write-Verbose "Trying to get FQDN for the azureRM VM resources under public IP from resource Group $resourceGroupName" + + #Map the ipc to the fqdn + foreach($publicIp in $publicIPAddressResources) + { + if(-not [string]::IsNullOrEmpty($publicIp.IpConfiguration.Id)) + { + $publicIPKey = $publicIp.IpConfiguration.Id.ToLower() + Write-Verbose "Adding entry to FQDN map with key $publicIPKey" + + if(-not [string]::IsNullOrEmpty($publicIP.DnsSettings.Fqdn)) + { + Write-Verbose "Inserting to FQDN map with value (FQDN) : $publicIPKey" + $fqdnMap[$publicIPKey] = $publicIP.DnsSettings.Fqdn + } + elseif(-not [string]::IsNullOrEmpty($publicIP.IpAddress)) + { + Write-Verbose "Inserting to FQDN map with value (IP Address) : $publicIPKey" + $fqdnMap[$publicIPKey] = $publicIP.IpAddress + } + } + } + + if($debugLogsFlag -eq "true") + { + Write-Verbose "fqdnMap for MachinesFqdnsForPublicIP after mapping ip configuration to fqdn: " -Verbose + Write-Verbose ($fqdnMap | Format-List | Out-String) -Verbose + } + + #Find out the NIC, and thus the VM corresponding to a given ipc + foreach($nic in $networkInterfaceResources) + { + foreach($ipc in $nic.IpConfigurations) + { + $fqdn = $fqdnMap[$ipc.Id.ToLower()] + if(-not [string]::IsNullOrEmpty($fqdn)) + { + $fqdnMap.Remove($ipc.Id.ToLower()) + if($nic.VirtualMachine) + { + $vmId = $nic.VirtualMachine.Id.ToLower() + Write-Verbose "Adding entry to FQDN map with key $vmId" + $fqdnMap[$vmId] = $fqdn + } + } + } + } + + if($debugLogsFlag -eq "true") + { + Write-Verbose "final fqdnMap for MachinesFqdnsForPublicIP after finding vm id corresponding to ip configuration: " -Verbose + Write-Verbose ($fqdnMap | Format-List | Out-String) -Verbose + } + } + + Write-Verbose "Got FQDN for the azureRM VM resources under public IP from resource Group $resourceGroupName" + + return $fqdnMap +} + +function Get-MachinesFqdnsForLB +{ + param([string]$resourceGroupName, + [Object]$publicIPAddressResources, + [Object]$networkInterfaceResources, + [Object]$frontEndIPConfigs, + [System.Collections.Hashtable]$fqdnMap, + [string]$debugLogsFlag) + + if(-not [string]::IsNullOrEmpty($resourceGroupName) -and $publicIPAddressResources -and $networkInterfaceResources -and $frontEndIPConfigs) + { + Write-Verbose "Trying to get FQDN for the RM azureVM resources under load balancer from resource group: $resourceGroupName" + + #Map the public ip id to the fqdn + foreach($publicIp in $publicIPAddressResources) + { + if(-not [string]::IsNullOrEmpty($publicIp.IpConfiguration.Id)) + { + if(-not [string]::IsNullOrEmpty($publicIP.DnsSettings.Fqdn)) + { + $fqdnMap[$publicIp.Id.ToLower()] = $publicIP.DnsSettings.Fqdn + } + elseif(-not [string]::IsNullOrEmpty($publicIP.IpAddress)) + { + $fqdnMap[$publicIp.Id.ToLower()] = $publicIP.IpAddress + } + } + } + + if($debugLogsFlag -eq "true") + { + Write-Verbose "fqdnMap for MachinesFqdnsForLB after mapping ip configuration to fqdn: " -Verbose + Write-Verbose ($fqdnMap | Format-List | Out-String) -Verbose + } + + #Get the NAT rule for a given ip id + foreach($config in $frontEndIPConfigs) + { + if(-not [string]::IsNullOrEmpty($config.PublicIpAddress.Id)) + { + $fqdn = $fqdnMap[$config.PublicIpAddress.Id.ToLower()] + if(-not [string]::IsNullOrEmpty($fqdn)) + { + $fqdnMap.Remove($config.PublicIpAddress.Id.ToLower()) + foreach($rule in $config.InboundNatRules) + { + $fqdnMap[$rule.Id.ToLower()] = $fqdn + } + } + } + } + + if($debugLogsFlag -eq "true") + { + Write-Verbose "fqdnMap for MachinesFqdnsForLB after getting NAT rule for given ip configuration: " -Verbose + Write-Verbose ($fqdnMap | Format-List | Out-String) -Verbose + } + + #Find out the NIC, and thus the corresponding machine to which the NAT rule belongs + foreach($nic in $networkInterfaceResources) + { + foreach($ipc in $nic.IpConfigurations) + { + foreach($rule in $ipc.LoadBalancerInboundNatRules) + { + $fqdn = $fqdnMap[$rule.Id.ToLower()] + if(-not [string]::IsNullOrEmpty($fqdn)) + { + $fqdnMap.Remove($rule.Id.ToLower()) + if($nic.VirtualMachine) + { + $fqdnMap[$nic.VirtualMachine.Id.ToLower()] = $fqdn + } + } + } + } + } + + if($debugLogsFlag -eq "true") + { + Write-Verbose "final fqdnMap for MachinesFqdnsForLB after getting vm id corresponding to NAT rule for given ip configuration: " -Verbose + Write-Verbose ($fqdnMap | Format-List | Out-String) -Verbose + } + } + + Write-Verbose "Got FQDN for the RM azureVM resources under load balancer from resource Group $resourceGroupName" + + return $fqdnMap +} + +function Get-FrontEndPorts +{ + param([string]$backEndPort, + [System.Collections.Hashtable]$portList, + [Object]$networkInterfaceResources, + [Object]$inboundRules, + [string]$debugLogsFlag) + + if(-not [string]::IsNullOrEmpty($backEndPort) -and $networkInterfaceResources -and $inboundRules) + { + Write-Verbose "Trying to get front end ports for $backEndPort" + + $filteredRules = $inboundRules | Where-Object {$_.BackendPort -eq $backEndPort} + + #Map front end port to back end ipc + foreach($rule in $filteredRules) + { + if($rule.BackendIPConfiguration) + { + $portList[$rule.BackendIPConfiguration.Id.ToLower()] = $rule.FrontendPort + } + } + + if($debugLogsFlag -eq "true") + { + Write-Verbose "portList for FrontEndPorts after mapping front end port to backend ip configuration: " -Verbose + Write-Verbose ($portList | Format-List | Out-String) -Verbose + } + + #Get the nic, and the corresponding machine id for a given back end ipc + foreach($nic in $networkInterfaceResources) + { + foreach($ipConfig in $nic.IpConfigurations) + { + $frontEndPort = $portList[$ipConfig.Id.ToLower()] + if(-not [string]::IsNullOrEmpty($frontEndPort)) + { + $portList.Remove($ipConfig.Id.ToLower()) + if($nic.VirtualMachine) + { + $portList[$nic.VirtualMachine.Id.ToLower()] = $frontEndPort + } + } + } + } + + if($debugLogsFlag -eq "true") + { + Write-Verbose "portList for FrontEndPorts after getting vm id corresponding to given backend ip configuration, after finding nic: " -Verbose + Write-Verbose ($portList | Format-List | Out-String) -Verbose + } + } + + Write-Verbose "Got front end ports for $backEndPort" + return $portList +} + +function Get-AzureRMVMsConnectionDetailsInResourceGroup +{ + param([string]$resourceGroupName, + [object]$azureRMVMResources, + [string]$enableCopyPrerequisites, + [string]$connectedServiceName, + [string]$vstsAccessToken) + + [hashtable]$fqdnMap = @{} + $winRMHttpsPortMap = New-Object 'System.Collections.Generic.Dictionary[string, string]' + [hashtable]$azureRMVMsDetails = @{} + $debugLogsFlag= $env:system_debug + + # Getting endpoint used for the task + if($connectedServiceName) + { + $endpoint = Get-Endpoint -connectedServiceName $connectedServiceName + } + + $isAzureStackEnvironment = $false + if($endpoint -and $endpoint.Data -and $endpoint.Data.Environment) { + $environmentName = $Endpoint.Data.Environment + if($environmentName -eq $azureStackEnvironment) + { + $isAzureStackEnvironment = $true + } + } + + if (-not [string]::IsNullOrEmpty($resourceGroupName) -and $azureRMVMResources) + { + + if($isAzureStackEnvironment) + { + Write-Verbose "Fetching resource group resources details for Azure Stack environment." + $azureRGResourcesDetails = Get-AzureRMResourceGroupResourcesDetailsForAzureStack -resourceGroupName $resourceGroupName ` + -azureRMVMResources $azureRMVMResources -endpoint $endpoint -connectedServiceNameARM $connectedServiceName -vstsAccessToken $vstsAccessToken + } + else + { + Write-Verbose "Fetching resource group resources details for Azure/National cloud environments." + $azureRGResourcesDetails = Get-AzureRMResourceGroupResourcesDetails -resourceGroupName $resourceGroupName -azureRMVMResources $azureRMVMResources + } + + $networkInterfaceResources = $azureRGResourcesDetails["networkInterfaceResources"] + $publicIPAddressResources = $azureRGResourcesDetails["publicIPAddressResources"] + $loadBalancerResources = $azureRGResourcesDetails["loadBalancerResources"] + + if($loadBalancerResources) + { + foreach($lbName in $loadBalancerResources.Keys) + { + $lbDetails = $loadBalancerResources[$lbName] + $frontEndIPConfigs = $lbDetails["frontEndIPConfigs"] + $inboundRules = $lbDetails["inboundRules"] + + $fqdnMap = Get-MachinesFqdnsForLB -resourceGroupName $resourceGroupName -publicIPAddressResources $publicIPAddressResources -networkInterfaceResources $networkInterfaceResources ` + -frontEndIPConfigs $frontEndIPConfigs -fqdnMap $fqdnMap -debugLogsFlag $debugLogsFlag + $winRMHttpsPortMap = Get-FrontEndPorts -BackEndPort "5986" -PortList $winRMHttpsPortMap -networkInterfaceResources $networkInterfaceResources ` + -inboundRules $inboundRules -debugLogsFlag $debugLogsFlag + } + + $winRMHttpsPortMap = Get-MachineNameFromId -Map $winRMHttpsPortMap -MapParameter "Front End port" -azureRMVMResources $azureRMVMResources ` + -throwOnTotalUnavailability $false -debugLogsFlag $debugLogsFlag + } + + $fqdnMap = Get-MachinesFqdnsForPublicIP -resourceGroupName $resourceGroupName -publicIPAddressResources $publicIPAddressResources -networkInterfaceResources $networkInterfaceResources ` + -azureRMVMResources $azureRMVMResources -fqdnMap $fqdnMap -debugLogsFlag $debugLogsFlag + $fqdnMap = Get-MachineNameFromId -resourceGroupName $resourceGroupName -Map $fqdnMap -MapParameter "FQDN" -azureRMVMResources $azureRMVMResources ` + -throwOnTotalUnavailability $true -debugLogsFlag $debugLogsFlag + + foreach ($resource in $azureRMVMResources) + { + $resourceName = $resource.Name + $resourceId = $resource.Id + $resourceFQDN = $fqdnMap[$resourceName] + $resourceWinRMHttpsPort = $winRMHttpsPortMap[$resourceName] + if([string]::IsNullOrWhiteSpace($resourceWinRMHttpsPort)) + { + Write-Verbose "Defaulting WinRmHttpsPort of $resourceName to 5986" + $resourceWinRMHttpsPort = "5986" + } + + $resourceProperties = @{} + $resourceProperties.Name = $resourceName + $resourceProperties.fqdn = $resourceFQDN + $resourceProperties.winRMHttpsPort = $resourceWinRMHttpsPort + + $azureRMVMsDetails.Add($resourceName, $resourceProperties) + + if ($enableCopyPrerequisites -eq "true") + { + Write-Verbose "Enabling winrm for virtual machine $resourceName" -Verbose + Add-AzureVMCustomScriptExtension -resourceGroupName $resourceGroupName -vmId $resourceId -vmName $resourceName -dnsName $resourceFQDN ` + -location $resource.Location -connectedServiceName $connectedServiceName -vstsAccessToken $vstsAccessToken + } + } + + return $azureRMVMsDetails + } +} + +function Get-AzureVMResourcesProperties +{ + param([string]$resourceGroupName, + [string]$resourceFilteringMethod, + [string]$machineNames, + [string]$enableCopyPrerequisites, + [string]$connectedServiceName, + [string]$vstsAccessToken) + + $machineNames = $machineNames.Trim() + if(-not [string]::IsNullOrEmpty($resourceGroupName)) + { + $azureRMVMResources = Get-AzureRMVMsInResourceGroup -resourceGroupName $resourceGroupName + $filteredAzureRMVMResources = Get-FilteredAzureRMVMsInResourceGroup -azureRMVMResources $azureRMVMResources -resourceFilteringMethod $resourceFilteringMethod -filter $machineNames + $azureVMsDetails = Get-AzureRMVMsConnectionDetailsInResourceGroup -resourceGroupName $resourceGroupName -azureRMVMResources $filteredAzureRMVMResources ` + -enableCopyPrerequisites $enableCopyPrerequisites -connectedServiceName $connectedServiceName -vstsAccessToken $vstsAccessToken + + # throw if no azure VMs found in resource group or due to filtering + if($azureVMsDetails.Count -eq 0) + { + if([string]::IsNullOrEmpty($machineNames)) + { + Write-Telemetry "Input_Validation" "PREREQ_NoRMVMResources" + throw (Get-VstsLocString -Key "AFC_NoARMVMResources" -ArgumentList $resourceGroupName, $connectedServiceName) + } + else + { + Write-Telemetry "Input_Validation" "FILTERING_NoVMResources" + throw (Get-VstsLocString -Key "AFC_FilteringNoVMResources" -ArgumentList $resourceGroupName, $resourceFilteringMethod, $machineNames) + } + } + + return $azureVMsDetails + } +} + +function Get-AzureVMsCredentials +{ + param([string][Parameter(Mandatory=$true)]$vmsAdminUserName, + [string][Parameter(Mandatory=$true)]$vmsAdminPassword) + + Write-Verbose "Azure VMs Admin Username: $vmsAdminUserName" + $azureVmsCredentials = New-Object 'System.Net.NetworkCredential' -ArgumentList $vmsAdminUserName, $vmsAdminPassword + + return $azureVmsCredentials +} + +function Copy-FilesParallellyToAzureVMs +{ + param( + [string[]]$targetMachineNames, + [pscredential]$credential, + [string]$protocol, + [object]$remoteScriptJobArguments, + [object]$sessionOption, + [bool]$enableDetailedLogging + ) + + Write-Verbose "Starting parallel file copy" + + try + { + $parallelCopyJobResults = Invoke-RemoteScript -targetMachineNames $targetMachineNames ` + -credential $credential ` + -protocol $protocol ` + -remoteScriptJobArguments $remoteScriptJobArguments ` + -sessionOption $sessionOption ` + -uploadLogFiles:$enableDetailedLogging + + Write-Verbose "Parallel file copy: Invoke-RemoteScript completed" + } + catch + { + Write-Verbose "Parallel file copy: Invoke-RemoteScript threw exception" + throw + } + + # Write job status for every VM + $isFileCopyFailed = $false + $parallelCopyJobResults | ForEach-Object { + if($_.ExitCode -eq 0) + { + Write-Verbose "Copy source files status for $($_.ComputerName): Successful" + } + else + { + $isFileCopyFailed = $true + Write-Verbose "Copy source files status for $($_.ComputerName): Failed" + } + } + + # Throw if any of the remote jobs failed + if($isFileCopyFailed) + { + ThrowError -errorMessage (Get-VstsLocString -Key "AFC_ParallelCopyFailed") + } + + Write-Verbose "Successfully finished parallel file copy" +} + +function Copy-FilesSequentiallyToAzureVMs +{ + param( + [string[]]$targetMachineNames, + [pscredential]$credential, + [string]$protocol, + [object]$remoteScriptJobArguments, + [object]$sessionOption, + [bool]$enableDetailedLogging + ) + + Write-Verbose "Starting sequential file copy" + + $targetMachineNames | ForEach-Object { + Write-Output (Get-VstsLocString -Key "AFC_CopyStarted" -ArgumentList $_) + $targetMachineName = @($_) + + try + { + $copyJobResult = Invoke-RemoteScript -targetMachineNames $targetMachineName ` + -credential $credential ` + -protocol $protocol ` + -remoteScriptJobArguments $remoteScriptJobArguments ` + -sessionOption $sessionOption ` + -uploadLogFiles:$enableDetailedLogging + + Write-Verbose "Sequential file copy: Invoke-RemoteScript completed" + } + catch + { + Write-Verbose "Sequential file copy: Invoke-RemoteScript threw exception" + throw + } + + if($copyJobResult.ExitCode -eq 0) + { + Write-Verbose "Copy source files status for $_ : Successful" + } + else + { + Write-Verbose "Copy source files status for $_ : Failed" + ThrowError -errorMessage (Get-VstsLocString -Key "AFC_CopyFailed" -ArgumentList $_) + } + } + + Write-Verbose "Successfully finished sequential file copy" +} + +function Copy-FilesToAzureVMsFromStorageContainer +{ + param( + [string[]]$targetMachineNames, + [pscredential]$credential, + [string]$protocol, + [object]$sessionOption, + [string]$blobStorageEndpoint, + [string]$containerName, + [string]$targetPath, + [bool]$cleanTargetBeforeCopy, + [bool]$copyFilesInParallel, + [string]$additionalArguments, + [string]$azCopyToolLocation, + [scriptblock]$fileCopyJobScript, + [bool]$enableDetailedLogging, + [bool]$useSanitizerActivate = $false + ) + + # Generate storage container URL + $containerURL = [string]::Format("{0}/{1}", $blobStorageEndpoint.Trim("/"), $containerName) + + $azCopyToolFileNames = Get-ChildItem $azCopyToolLocation | Select-Object -ExpandProperty Name + $azCopyToolFilePaths = Get-ChildItem $azCopyToolLocation | Select-Object -ExpandProperty FullName + + $azCopyToolFileContents = @() + + foreach ($file in $azCopyToolFilePaths) + { + $azCopyToolFileContents += [Convert]::ToBase64String([System.IO.File]::ReadAllBytes($file)) + } + + # script block arguments + $scriptBlockArgs = " -containerURL '$containerURL' -targetPath '$targetPath' -additionalArguments '$additionalArguments'" + if($cleanTargetBeforeCopy) + { + $scriptBlockArgs += " -CleanTargetBeforeCopy" + } + if($enableDetailedLogging) + { + $scriptBlockArgs += " -EnableDetailedLogging" + } + if($useSanitizerActivate) + { + $scriptBlockArgs += " -useSanitizerActivate" + } + + $remoteScriptJobArguments = @{ + inline = $true; + inlineScript = $fileCopyJobScript.ToString(); + scriptArguments = $scriptBlockArgs; + errorActionPreference = "Stop"; + failOnStdErr = $true; + } + + if($copyFilesInParallel) + { + Copy-FilesParallellyToAzureVMs -targetMachineNames $targetMachineNames ` + -credential $credential ` + -protocol $protocol ` + -remoteScriptJobArguments $remoteScriptJobArguments ` + -sessionOption $sessionOption ` + -enableDetailedLogging $enableDetailedLogging + } + else + { + Copy-FilesSequentiallyToAzureVMs -targetMachineNames $targetMachineNames ` + -credential $credential ` + -protocol $protocol ` + -remoteScriptJobArguments $remoteScriptJobArguments ` + -sessionOption $sessionOption ` + -enableDetailedLogging $enableDetailedLogging + } +} + +function Validate-CustomScriptExecutionStatus +{ + param([string]$resourceGroupName, + [string]$vmName, + [string]$extensionName, + [object]$endpoint, + [string]$connectedServiceNameARM, + [string]$vstsAccessToken) + + Write-Verbose "Validating the winrm configuration custom script extension status" + + $isScriptExecutionPassed = $true + try + { + $status = Get-AzureMachineStatus -resourceGroupName $resourceGroupName -Name $vmName + + # For AzurePS < 1.0.4 $_.ExtensionType is applicable. + $customScriptExtension = $status.Extensions | Where-Object { ($_.ExtensionType -eq "Microsoft.Compute.CustomScriptExtension" -or $_.Type -eq "Microsoft.Compute.CustomScriptExtension") -and $_.Name -eq $extensionName } + + if($customScriptExtension) + { + $subStatuses = $customScriptExtension.SubStatuses + $subStatusesStr = $subStatuses | Out-String + + Write-Verbose "Custom script extension execution statuses: $subStatusesStr" + + if($subStatuses) + { + foreach($subStatus in $subStatuses) + { + if($subStatus.Code.Contains("ComponentStatus/StdErr") -and (-not [string]::IsNullOrEmpty($subStatus.Message))) + { + $isScriptExecutionPassed = $false + $errMessage = $subStatus.Message + break + } + } + } + else + { + $isScriptExecutionPassed = $false + $errMessage = "No execution status exists for the custom script extension '$extensionName'" + } + } + else + { + $isScriptExecutionPassed = $false + $errMessage = "No custom script extension '$extensionName' exists" + } + } + catch + { + $isScriptExecutionPassed = $false + $errMessage = $_.Exception.Message + } + + if(-not $isScriptExecutionPassed) + { + $response = Remove-AzureMachineCustomScriptExtension -resourceGroupName $resourceGroupName -vmName $vmName -name $extensionName ` + -endpoint $endpoint -connectedServiceNameARM $connectedServiceNameARM -vstsAccessToken $vstsAccessToken + throw (Get-VstsLocString -Key "AFC_SetCustomScriptExtensionFailed" -ArgumentList $extensionName, $vmName, $errMessage) + } + + Write-Verbose "Validated the script execution successfully" +} + +function Is-WinRMCustomScriptExtensionExists +{ + param([string]$resourceGroupName, + [string]$vmName, + [string]$extensionName, + [string]$connectedServiceName, + [string]$vstsAccessToken) + + $isExtensionExists = $true + $removeExtension = $false + + try + { + $serviceEndpoint = Get-Endpoint $connectedServiceName + $customScriptExtension = Get-AzureMachineCustomScriptExtension -resourceGroupName $resourceGroupName -vmName $vmName -name $extensionName ` + -endpoint $serviceEndpoint -connectedServiceNameARM $connectedServiceName -vstsAccessToken $vstsAccessToken + + if($customScriptExtension) + { + if($customScriptExtension.ProvisioningState -ne "Succeeded") + { + $removeExtension = $true + } + else + { + try + { + Validate-CustomScriptExecutionStatus -resourceGroupName $resourceGroupName -vmName $vmName -extensionName $extensionName -endpoint $serviceEndpoint + } + catch + { + $isExtensionExists = $false + } + } + } + else + { + $isExtensionExists = $false + } + } + catch + { + $isExtensionExists = $false + } + + if($removeExtension) + { + $response = Remove-AzureMachineCustomScriptExtension -resourceGroupName $resourceGroupName -vmName $vmName -name $extensionName ` + -endpoint $serviceEndpoint -connectedServiceNameARM $connectedServiceName -vstsAccessToken $vstsAccessToken + + try + { + $index = 1 + $maxCount = 45 # Setting timeout for deleting extension as 15 mins. + + while($index -le $maxCount) { + Write-Verbose "Checking WinRM custom script extension status $index times" + + $customScriptExtension = Get-AzureMachineCustomScriptExtension -resourceGroupName $resourceGroupName -vmName $vmName -name $extensionName ` + -endpoint $serviceEndpoint -connectedServiceNameARM $connectedServiceName -vstsAccessToken $vstsAccessToken + + if(-not $customScriptExtension -or $customScriptExtension.ProvisioningState -ne "deleting") + { + break + } + + start-sleep -s 20 + $index = $index + 1 + } + } + catch + { + Write-Verbose ("Failed to get extension with error : " + $_.exception.message) + } + + if ($index -gt $maxCount) + { + Write-Warning (Get-VstsLocString -Key AFC_UninstallWinRMCustomScriptExtension) + } + + $isExtensionExists = $false + } + + $isExtensionExists +} + +function Get-TargetUriFromFwdLink { + param( + [string]$fwdLink + ) + Write-Verbose "Trying to get the target uri from the fwdLink: $fwdLink" + $proxy = Get-VstsWebProxy + Add-Type -AssemblyName System.Net.Http + $validHttpRedirectCodes = @( + [System.Net.HttpStatusCode]::Moved, + [System.Net.HttpStatusCode]::MovedPermanently, + [System.Net.HttpStatusCode]::Found, + [System.Net.HttpStatusCode]::Redirect, + [System.Net.HttpStatusCode]::RedirectKeepVerb, + [System.Net.HttpStatusCode]::TemporaryRedirect + ) + $HttpClientHandler = New-Object System.Net.Http.HttpClientHandler + $HttpClientHandler.Proxy = $proxy + $HttpClientHandler.AllowAutoRedirect = $false + $HttpClient = New-Object System.Net.Http.HttpClient -ArgumentList $HttpClientHandler + $response = $HttpClient.GetAsync($fwdLink) + $response.Wait() + if($validHttpRedirectCodes.IndexOf($response.Result.StatusCode) -eq -1) { + Write-Verbose "The http response code: $([int]$response.Result.StatusCode) is not a valid redirect response code." + throw (Get-VstsLocString -Key "AFC_RedirectResponseInvalidStatusCode" -ArgumentList $([int]$response.Result.StatusCode)) + } + $targetUri = $response.Result.Headers.Location.AbsoluteUri + if([string]::IsNullOrEmpty($targetUri)) { + Write-Verbose "The target uri is null" + throw (Get-VstsLocString -Key "AFC_RedirectResponseLocationHeaderIsNull") + } + Write-Verbose "The target uri is: $targetUri" + return $targetUri +} + +function Add-WinRMHttpsNetworkSecurityRuleConfig +{ + param([string]$resourceGroupName, + [string]$vmId, + [string]$ruleName, + [string]$rulePriotity, + [string]$winrmHttpsPort) + + Write-Verbose "Trying to add a network security group rule" + + try + { + $securityGroups = Get-NetworkSecurityGroups -resourceGroupName $resourceGroupName -vmId $vmId + + if($securityGroups.Count -gt 0) + { + Add-NetworkSecurityRuleConfig -resourceGroupName $resourceGroupName -securityGroups $securityGroups -ruleName $ruleName -rulePriotity $rulePriotity -winrmHttpsPort $winrmHttpsPort + } + } + catch + { + Write-Telemetry "Task_InternalError" "NetworkSecurityRuleConfigFailed" + Write-Warning (Get-VstsLocString -Key "AFC_AddNetworkSecurityRuleFailed" -ArgumentList $_.exception.message) + } +} + +function Add-AzureVMCustomScriptExtension +{ + param([string]$resourceGroupName, + [string]$vmId, + [string]$vmName, + [string]$dnsName, + [string]$location, + [string]$connectedServiceName, + [string]$vstsAccessToken) + + $configWinRMScriptFileFwdLink ="https://aka.ms/vstsconfigurewinrm" + $makeCertFileFwdLink ="https://aka.ms/vstsmakecertexe" + $scriptToRun="ConfigureWinRM.ps1" + $extensionName="WinRMCustomScriptExtension" + $ruleName = "VSO-Custom-WinRM-Https-Port" + $rulePriotity="3986" + $winrmHttpsPort = "5986" + + Write-Verbose "Adding custom script extension '$extensionName' for virtual machine '$vmName'" + Write-Verbose "VM Location : $location" + Write-Verbose "VM DNS : $dnsName" + + try + { + $endpoint = Get-Endpoint $connectedServiceName + $isExtensionExists = Is-WinRMCustomScriptExtensionExists -resourceGroupName $resourceGroupName -vmName $vmName -extensionName $extensionName ` + -connectedServiceName $connectedServiceName -vstsAccessToken $vstsAccessToken + Write-Verbose -Verbose "IsExtensionExists: $isExtensionExists" + + if($isExtensionExists) + { + Add-WinRMHttpsNetworkSecurityRuleConfig -resourceGroupName $resourceGroupName -vmId $vmId -ruleName $ruleName -rulePriotity $rulePriotity -winrmHttpsPort $winrmHttpsPort + + Write-Verbose "Skipping the addition of custom script extension '$extensionName' as it already exists" + return + } + + $configWinRMScriptFile = Get-TargetUriFromFwdLink -fwdLink $configWinRMScriptFileFwdLink + $makeCertFile = Get-TargetUriFromFwdLink -fwdLink $makeCertFileFwdLink + + $result = Set-AzureMachineCustomScriptExtension -resourceGroupName $resourceGroupName -vmName $vmName -name $extensionName -fileUri $configWinRMScriptFile, $makeCertFile -run $scriptToRun -argument $dnsName -location $location + $resultDetails = $result | ConvertTo-Json + Write-Verbose "Set-AzureMachineCustomScriptExtension completed with response : $resultDetails" + + if($result.Status -ne "Succeeded") + { + Write-Telemetry "Task_InternalError" "ProvisionVmCustomScriptFailed" + + $response = Remove-AzureMachineCustomScriptExtension -resourceGroupName $resourceGroupName -vmName $vmName -name $extensionName ` + -endpoint $endpoint -connectedServiceNameARM $connectedServiceName -vstsAccessToken $vstsAccessToken + throw (Get-VstsLocString -Key "AFC_UnableToSetCustomScriptExtension" -ArgumentList $extensionName, $vmName, $result.Error.Message) + } + + Validate-CustomScriptExecutionStatus -resourceGroupName $resourceGroupName -vmName $vmName -extensionName $extensionName -endpoint $endpoint + Add-WinRMHttpsNetworkSecurityRuleConfig -resourceGroupName $resourceGroupName -vmId $vmId -ruleName $ruleName -rulePriotity $rulePriotity -winrmHttpsPort $winrmHttpsPort + } + catch + { + Write-Telemetry "Task_InternalError" "ExecutionOfVmCustomScriptFailed:$exceptionType" + throw (Get-VstsLocString -Key "AFC_CopyPrereqsFailed" -ArgumentList $_.exception.message) + } + + Write-Verbose "Successfully added the custom script extension '$extensionName' for virtual machine '$vmName'" +} + +function Check-ContainerNameAndArgs +{ + param([string]$containerName, + [string]$additionalArguments) + + $additionalArguments = ' ' + $additionalArguments + ' ' + if($containerName -eq '$root' -and $additionalArguments -like '* --recursive *') + { + Write-Warning (Get-vstsLocString -Key "AFC_RootContainerAndDirectory") + } +} + +function Get-InvokeRemoteScriptParameters +{ + param([object][Parameter(Mandatory=$true)]$azureVMResourcesProperties, + [object]$networkCredentials, + [bool]$skipCACheck) + + $sessionOption = New-PSSessionOption -SkipCACheck:$skipCACheck + + $psCredentials = New-Object PSCredential($networkCredentials.UserName, (ConvertTo-SecureString $networkCredentials.Password -AsPlainText -Force)) + + $targetMachines = @() + foreach($vm in $azureVMResourcesProperties.Values) + { + $targetMachines += [string]::Format("{0}:{1}", $vm.fqdn, $vm.winRMHttpsPort) + } + + $protocol = 'https' + + return @{ + targetMachineNames = $targetMachines; + credential = $psCredentials; + protocol = $protocol; + sessionOption = $sessionOption + } +} + +function CleanUp-PSModulePathForHostedAgent { + # Clean up PSModulePath for hosted agent + $azureRMModulePath = "C:\Modules\azurerm_2.1.0" + $azureModulePath = "C:\Modules\azure_2.1.0" + $newEnvPSModulePath = $env:PSModulePath + + if ($newEnvPSModulePath.split(";") -contains $azureRMModulePath) { + $newEnvPSModulePath = (($newEnvPSModulePath).Split(";") | ? { $_ -ne $azureRMModulePath }) -join ";" + write-verbose "$azureRMModulePath removed. Restart the prompt for the changes to take effect." + } + else { + write-verbose "$azureRMModulePath is not present in $newEnvPSModulePath" + } + + if ($newEnvPSModulePath.split(";") -contains $azureModulePath) { + $newEnvPSModulePath = (($newEnvPSModulePath).Split(";") | ? { $_ -ne $azureModulePath }) -join ";" + write-verbose "$azureModulePath removed. Restart the prompt for the changes to take effect." + } + else { + write-verbose "$azureModulePath is not present in $newEnvPSModulePath" + } + + if (Test-Path "C:\Modules\az_*") { + $azPSModulePath = (Get-ChildItem "C:\Modules\az_*" -Directory ` + | Sort-Object { [version]$_.Name.Split('_')[-1] } ` + | Select-Object -Last 1).FullName + + Write-Verbose "Found Az module path $azPSModulePath, will be used" + $env:PSModulePath = ($azPSModulePath + ";" + $newEnvPSModulePath).Trim(";") + } +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/icon.png b/_generated/AzureFileCopyV6_Node20/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..7360d562f9528de743293a050cadba09609f1e77 GIT binary patch literal 517 zcmV+g0{Z=lP)j0{%rBW#} zL?Qq|2%sDWAi?{9h-hD&fjHyh!?`J9mp^$L&bvBK!faY~60bl|TRW^Lao9(f=%Gx5;^%TIRMEzh`dye~S zfW2m$r*8PzyRBtbmpnIJ0MK~pvDa+#(CI~9o^ru+*9A6{1KhWJ@!C*C2A<31263Co z0q#4>&1>)4S_8x8`##2)&;0p|{VpiHdKMds1l<@Tz!SiBZq6E@t1P?Fz#%|=BOM3g z7#DYYRc(ZAcUP_MEoaX=oIU%I?gKyYs;ahz=5Bq(CcgIpP%70(pw28D00000NkvXX Hu0mjf@i*zm literal 0 HcmV?d00001 diff --git a/_generated/AzureFileCopyV6_Node20/icon.svg b/_generated/AzureFileCopyV6_Node20/icon.svg new file mode 100644 index 000000000000..3debdb04649f --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/_generated/AzureFileCopyV6_Node20/make.json b/_generated/AzureFileCopyV6_Node20/make.json new file mode 100644 index 000000000000..6062b6ba9023 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/make.json @@ -0,0 +1,63 @@ +{ + "common": [ + { + "module": "../Common/VstsAzureHelpers_", + "type": "ps" + }, + { + "module": "../Common/VstsAzureRestHelpers_", + "type": "ps" + }, + { + "module": "../Common/Deployment/TelemetryHelper", + "type": "ps" + }, + { + "module": "../Common/TlsHelper_", + "type": "ps" + }, + { + "module": "../Common/RemoteDeployer", + "type": "ps" + }, + { + "module": "../Common/Sanitizer", + "type": "ps" + } + ], + "externals": { + "archivePackages": [ + { + "url": "https://vstsagenttools.blob.core.windows.net/tools/azcopy/10.12/AzCopy.zip", + "dest": "./" + } + ], + "nugetv2": [ + { + "name": "VstsTaskSdk", + "version": "0.10.0", + "repository": "https://www.powershellgallery.com/api/v2/", + "cp": [ + { + "source": [ + "*.dll", + "*.ps1", + "*.psd1", + "*.psm1", + "lib.json", + "Strings" + ], + "dest": "ps_modules/VstsTaskSdk/", + "options": "-R" + } + ] + } + ] + }, + "cp": [ + { + "source": "MimeMapping.json", + "options": "-R" + } + ] +} diff --git a/_generated/AzureFileCopyV6_Node20/package-lock.json b/_generated/AzureFileCopyV6_Node20/package-lock.json new file mode 100644 index 000000000000..d5a3032a2ec4 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/package-lock.json @@ -0,0 +1,793 @@ +{ + "name": "AzureFileCopyV5", + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "@azure/msal-common": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-9.1.1.tgz", + "integrity": "sha512-we9xR8lvu47fF0h+J8KyXoRy9+G/fPzm3QEa2TrdR3jaVS3LKAyE2qyMuUkNdbVkvzl8Zr9f7l+IUSP22HeqXw==" + }, + "@azure/msal-node": { + "version": "1.14.5", + "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-1.14.5.tgz", + "integrity": "sha512-NcVdMfn8Z3ogN+9RjOSF7uwf2Gki5DEJl0BdDSL83KUAgVAobtkZi5W8EqxbJLrTO/ET0jv5DregrcR5qg2pEA==", + "requires": { + "@azure/msal-common": "^9.0.1", + "jsonwebtoken": "^8.5.1", + "uuid": "^8.3.0" + } + }, + "@types/concat-stream": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@types/concat-stream/-/concat-stream-1.6.1.tgz", + "integrity": "sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==", + "requires": { + "@types/node": "*" + } + }, + "@types/form-data": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/form-data/-/form-data-0.0.33.tgz", + "integrity": "sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==", + "requires": { + "@types/node": "*" + } + }, + "@types/jsonwebtoken": { + "version": "8.5.9", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.9.tgz", + "integrity": "sha512-272FMnFGzAVMGtu9tkr29hRL6bZj4Zs1KZNeHLnKqAvp06tAIcarTMwOh8/8bz4FmKRcMxZhZNeUAQsNLoiPhg==", + "requires": { + "@types/node": "*" + } + }, + "@types/mocha": { + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", + "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==" + }, + "@types/node": { + "version": "20.11.30", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.30.tgz", + "integrity": "sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==", + "requires": { + "undici-types": "~5.26.4" + } + }, + "@types/q": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.0.7.tgz", + "integrity": "sha512-0WS7XU7sXzQ7J1nbnMKKYdjrrFoO3YtZYgUzeV8JFXffPnHfvSJQleR70I8BOAsOm14i4dyaAZ3YzqIl1YhkXQ==" + }, + "@types/qs": { + "version": "6.9.7", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", + "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==" + }, + "agent-base": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-5.1.1.tgz", + "integrity": "sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g==" + }, + "asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==" + }, + "async-mutex": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/async-mutex/-/async-mutex-0.4.1.tgz", + "integrity": "sha512-WfoBo4E/TbCX1G95XTjbWTE3X2XLG0m1Xbv2cwOtuPdyH9CZvnaA5nCt1ucjaKEgW2A5IF71hxrRhr83Je5xjA==", + "requires": { + "tslib": "^2.4.0" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "azure-devops-node-api": { + "version": "12.5.0", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-12.5.0.tgz", + "integrity": "sha512-R5eFskGvOm3U/GzeAuxRkUsAl0hrAwGgWn6zAd2KrZmrEhWZVqLew4OOupbQlXUuojUzpGtq62SmdhJ06N88og==", + "requires": { + "tunnel": "0.0.6", + "typed-rest-client": "^1.8.4" + } + }, + "azure-pipelines-task-lib": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.3.1.tgz", + "integrity": "sha512-56ZAr4MHIoa24VNVuwPL4iUQ5MKaigPoYXkBG8E8fiVmh8yZdatUo25meNoQwg77vDY22F63Q44UzXoMWmy7ag==", + "requires": { + "minimatch": "3.0.5", + "mockery": "^1.7.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.5", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + }, + "dependencies": { + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + } + } + }, + "azure-pipelines-tasks-azure-arm-rest": { + "version": "3.237.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-tasks-azure-arm-rest/-/azure-pipelines-tasks-azure-arm-rest-3.237.0.tgz", + "integrity": "sha512-0SKEE3DX3t1Fx4Vx1zTGO1s9mZc+maEQpBtaVsB+C/2zOvXVZew3+n2tUaNOMtkTtXSCPJbzt8oqHIZFEJrvVw==", + "requires": { + "@azure/msal-node": "1.14.5", + "@types/jsonwebtoken": "^8.5.8", + "@types/mocha": "^5.2.7", + "@types/node": "^10.17.0", + "@types/q": "1.5.4", + "async-mutex": "^0.4.0", + "azure-devops-node-api": "^12.0.0", + "azure-pipelines-task-lib": "^3.4.0", + "https-proxy-agent": "^4.0.0", + "jsonwebtoken": "^8.5.1", + "node-fetch": "^2.6.7", + "q": "1.5.1", + "typed-rest-client": "1.8.4", + "xml2js": "0.6.2" + }, + "dependencies": { + "@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" + }, + "@types/q": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", + "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==" + }, + "azure-pipelines-task-lib": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/azure-pipelines-task-lib/-/azure-pipelines-task-lib-3.4.0.tgz", + "integrity": "sha512-3eC4OTFw+7xD7A2aUhxR/j+jRlTI+vVfS0CGxt1pCLs4c/KmY0tQWgbqjD3157kmiucWxELBvgZHaD2gCBe9fg==", + "requires": { + "minimatch": "3.0.5", + "mockery": "^2.1.0", + "q": "^1.5.1", + "semver": "^5.1.0", + "shelljs": "^0.8.5", + "sync-request": "6.1.0", + "uuid": "^3.0.1" + } + }, + "mockery": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mockery/-/mockery-2.1.0.tgz", + "integrity": "sha512-9VkOmxKlWXoDO/h1jDZaS4lH33aWfRiJiNT/tKj+8OGzrcFDLo8d0syGdbsc3Bc4GvRXPb+NMMvojotmuGJTvA==" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + } + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "requires": { + "ms": "2.1.2" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, + "ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "get-intrinsic": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", + "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.3" + } + }, + "get-port": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", + "integrity": "sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg==" + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "dependencies": { + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" + }, + "http-basic": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/http-basic/-/http-basic-8.1.3.tgz", + "integrity": "sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw==", + "requires": { + "caseless": "^0.12.0", + "concat-stream": "^1.6.2", + "http-response-object": "^3.0.1", + "parse-cache-control": "^1.0.1" + } + }, + "http-response-object": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/http-response-object/-/http-response-object-3.0.2.tgz", + "integrity": "sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA==", + "requires": { + "@types/node": "^10.0.3" + }, + "dependencies": { + "@types/node": { + "version": "10.17.60", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", + "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" + } + } + }, + "https-proxy-agent": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz", + "integrity": "sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==", + "requires": { + "agent-base": "5", + "debug": "4" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==" + }, + "is-core-module": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", + "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "requires": { + "has": "^1.0.3" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "jsonwebtoken": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "requires": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^5.6.0" + } + }, + "jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "requires": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha512-W3Bx6mdkRTGtlJISOvVD/lbqjTlPPUDTMnlXZFnVwi9NKJ6tiAk6LVdlhZMm17VZisqhKcgzpO5Wz91PCt5b0w==" + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha512-Bz5mupy2SVbPHURB98VAcw+aHh4vRV5IPNhILUCsOzRmsTmSQ17jIuqopAentWoehktxGd9e/hbIXq980/1QJg==" + }, + "lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha512-DBwtEWN2caHQ9/imiNeEA5ys1JoRtRfY3d7V9wkqtbycnAmTvRRmbHKDV4a0EYc678/dia0jrte4tjYwVBaZUA==" + }, + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha512-QYqzpfwO3/CWf3XP+Z+tkQsfaLL/EnUlXWVkIk5FUPc4sBdTehEqZONuyRt2P67PXAk+NXmTBcc97zw9t1FQrw==" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==" + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==" + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "minimatch": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.5.tgz", + "integrity": "sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "mockery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/mockery/-/mockery-1.7.0.tgz", + "integrity": "sha512-gUQA33ayi0tuAhr/rJNZPr7Q7uvlBt4gyJPbi0CDcAfIzIrDu1YgGMFgmAu3stJqBpK57m7+RxUbcS+pt59fKQ==" + }, + "moment": { + "version": "2.29.4", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", + "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==" + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "requires": { + "whatwg-url": "^5.0.0" + } + }, + "object-inspect": { + "version": "1.12.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", + "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "requires": { + "wrappy": "1" + } + }, + "parse-cache-control": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-cache-control/-/parse-cache-control-1.0.1.tgz", + "integrity": "sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg==" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==" + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "promise": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz", + "integrity": "sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg==", + "requires": { + "asap": "~2.0.6" + } + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==" + }, + "qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "requires": { + "side-channel": "^1.0.4" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "requires": { + "resolve": "^1.1.6" + } + }, + "resolve": { + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", + "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "requires": { + "is-core-module": "^2.9.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "sax": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", + "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "shelljs": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", + "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==" + }, + "sync-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/sync-request/-/sync-request-6.1.0.tgz", + "integrity": "sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw==", + "requires": { + "http-response-object": "^3.0.1", + "sync-rpc": "^1.2.1", + "then-request": "^6.0.0" + } + }, + "sync-rpc": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/sync-rpc/-/sync-rpc-1.3.6.tgz", + "integrity": "sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==", + "requires": { + "get-port": "^3.1.0" + } + }, + "then-request": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/then-request/-/then-request-6.0.2.tgz", + "integrity": "sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA==", + "requires": { + "@types/concat-stream": "^1.6.0", + "@types/form-data": "0.0.33", + "@types/node": "^8.0.0", + "@types/qs": "^6.2.31", + "caseless": "~0.12.0", + "concat-stream": "^1.6.0", + "form-data": "^2.2.0", + "http-basic": "^8.1.1", + "http-response-object": "^3.0.1", + "promise": "^8.0.0", + "qs": "^6.4.0" + }, + "dependencies": { + "@types/node": { + "version": "8.10.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.66.tgz", + "integrity": "sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==" + } + } + }, + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" + }, + "tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + }, + "typed-rest-client": { + "version": "1.8.4", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.4.tgz", + "integrity": "sha512-MyfKKYzk3I6/QQp6e1T50py4qg+c+9BzOEl2rBmQIpStwNUoqQ73An+Tkfy9YuV7O+o2mpVVJpe+fH//POZkbg==", + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "^1.12.1" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==" + }, + "typescript": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "dev": true + }, + "underscore": { + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", + "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==" + }, + "undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==" + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "xml2js": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.6.2.tgz", + "integrity": "sha512-T4rieHaC1EXcES0Kxxj4JWgaUQHDk+qwHcYOCFHfiwKz7tOVPLq7Hjq9dM1WCMhylqMEfP7hMcOIChvotiZegA==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + } + }, + "xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" + } + } +} diff --git a/_generated/AzureFileCopyV6_Node20/package.json b/_generated/AzureFileCopyV6_Node20/package.json new file mode 100644 index 000000000000..59228e978cd2 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/package.json @@ -0,0 +1,15 @@ +{ + "name": "AzureFileCopyV5", + "dependencies": { + "@types/mocha": "^5.2.7", + "@types/node": "^20.3.1", + "@types/q": "1.0.7", + "azure-pipelines-task-lib": "^3.1.0", + "azure-pipelines-tasks-azure-arm-rest": "^3.237.0", + "moment": "^2.29.4", + "uuid": "^8.3.0" + }, + "devDependencies": { + "typescript": "5.1.6" + } +} diff --git a/_generated/AzureFileCopyV6_Node20/task.json b/_generated/AzureFileCopyV6_Node20/task.json new file mode 100644 index 000000000000..c534bac67a83 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/task.json @@ -0,0 +1,298 @@ +{ + "id": "EB72CB01-A7E5-427B-A8A1-1B31CCAC8A43", + "name": "AzureFileCopy", + "friendlyName": "Azure file copy", + "description": "Copy files to Azure Blob Storage or virtual machines", + "helpUrl": "https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/azure-file-copy", + "helpMarkDown": "[Learn more about this task](https://aka.ms/azurefilecopyreadme) and to report any issues with this new version of the task [here](https://github.com/microsoft/azure-pipelines-tasks/issues/new?assignees=&labels=regression%2Cbug&projects=&template=1.regression.yml&title=%5BREGRESSION%5D%3A+)", + "category": "Deploy", + "visibility": [ + "Build", + "Release" + ], + "author": "Microsoft Corporation", + "version": { + "Major": 6, + "Minor": 237, + "Patch": 1 + }, + "demands": [ + "azureps" + ], + "releaseNotes": "What's new in Version 6.0:
   Support Workload identity federation and [Azure RBAC](https://learn.microsoft.com/en-us/azure/storage/blobs/assign-azure-role-data-access?tabs=portal)", + "minimumAgentVersion": "1.103.0", + "inputs": [ + { + "name": "SourcePath", + "type": "filePath", + "label": "Source", + "defaultValue": "", + "required": true, + "helpMarkDown": "Absolute path of the source folder, or file on the local machine, or a UNC share. Expression should return a single folder or a file. Wild card symbol (*) is supported anywhere in the file path or file name." + }, + { + "name": "ConnectedServiceNameARM", + "aliases": [ + "azureSubscription" + ], + "type": "connectedService:AzureRM", + "label": "Azure Subscription", + "defaultValue": "", + "required": true, + "helpMarkDown": "Azure Resource Manager subscription to target for copying the files." + }, + { + "name": "Destination", + "type": "pickList", + "label": "Destination Type", + "defaultValue": "", + "required": true, + "options": { + "AzureBlob": "Azure Blob", + "AzureVMs": "Azure VMs" + }, + "helpMarkDown": "Select the destination, either Azure Blob or Azure VMs." + }, + { + "name": "StorageAccountRM", + "aliases": [ + "storage" + ], + "type": "pickList", + "label": "RM Storage Account", + "defaultValue": "", + "required": true, + "helpMarkDown": "Specify a pre-existing ARM storage account. It is also used as an intermediary for copying files to Azure VMs", + "properties": { + "EditableOptions": "True" + } + }, + { + "name": "ContainerName", + "type": "string", + "label": "Container Name", + "defaultValue": "", + "required": true, + "helpMarkDown": "Name of the Container for uploading the files. If a container with the given name does not exist in the specified storage account, it will automatically be created.
If you need to create a virtual directory inside the container, use the blob prefix input below.
Example: If your target location is https://myaccount.blob.core.windows.net/mycontainer/vd1/vd2/, then specify mycontainer as container name and vd1/vd2/ as blob prefix.", + "visibleRule": "Destination = AzureBlob" + }, + { + "name": "BlobPrefix", + "type": "string", + "label": "Blob Prefix", + "defaultValue": "", + "required": false, + "helpMarkDown": "Useful for filtering files, for example, append build number to all the blobs to download files from that build only. Example: If you specify blob prefix as myvd1/, a virtual directory with this name will be created inside the container. Blob prefix with a trailing '/' will be considered a virtual directory. Otherwise, it will be treated as a file, unless the item being copied is itself a folder. The source files will be copied to https://myaccount.blob.core.windows.net/mycontainer/myvd1/.", + "visibleRule": "Destination = AzureBlob" + }, + { + "name": "EnvironmentNameRM", + "aliases": [ + "resourceGroup" + ], + "type": "pickList", + "label": "Resource Group", + "defaultValue": "", + "required": true, + "helpMarkDown": "Name of the target Resource Group for copying files to.", + "properties": { + "EditableOptions": "True" + }, + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "ResourceFilteringMethod", + "type": "radio", + "label": "Select Machines By", + "required": false, + "defaultValue": "machineNames", + "options": { + "machineNames": "Machine Names", + "tags": "Tags" + }, + "helpMarkDown": "Optionally, select a subset of VMs in resource group either by providing VMs host name or tags. [Tags](https://learn.microsoft.com/en-us/azure/virtual-machines/tag-template/) are supported for resources created via the Azure Resource Manager only.", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "MachineNames", + "type": "string", + "label": "Filter Criteria", + "defaultValue": "", + "required": false, + "helpMarkDown": "Provide a list of VMs host name like ffweb, ffdb, or tags like Role:DB, Web; OS:Win8.1. Note the delimiters used for tags are ,(comma), :(colon) and ;(semicolon). If multiple tags are provided, then the task will run in all the VMs with the specified tags. The default is to run the task in all the VMs.", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "vmsAdminUserName", + "type": "string", + "label": "Admin Login", + "defaultValue": "", + "required": true, + "helpMarkDown": "Administrator Username of the VMs.", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "vmsAdminPassword", + "type": "string", + "label": "Password", + "defaultValue": "", + "required": true, + "helpMarkDown": "The administrator password of the VMs.
It can accept variable defined in build or release pipelines as '$(passwordVariable)'.
You may mark variable as 'secret' to secure it.", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "TargetPath", + "type": "string", + "label": "Destination Folder", + "defaultValue": "", + "required": true, + "helpMarkDown": "Local path on the target machines for copying the files from the source. Environment variable can be used like $env:windir\\BudgetIT\\Web.", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "AdditionalArgumentsForBlobCopy", + "type": "multiLine", + "label": "Optional Arguments (for uploading files to blob)", + "required": false, + "defaultValue": "", + "helpMarkDown": "Optional AzCopy.exe arguments that will be applied when uploading to blob like, --check-length=true. If no optional arguments are specified here, the following optional arguments will be added by default.
--log-level=INFO (if the pipeline is running in debug mode set --log-level=DEBUG),
--recursive (only if container name is not $root),
--blob-type=PageBlob (only if specified storage account is a premium account)." + }, + { + "name": "AdditionalArgumentsForVMCopy", + "type": "multiLine", + "label": "Optional Arguments (for downloading files to VM)", + "required": false, + "defaultValue": "", + "helpMarkDown": "Optional AzCopy.exe arguments that will be applied when downloading to VM like, --check-length=true. If no optional arguments are specified here, the following optional arguments will be added by default.
--log-level=INFO (if the pipeline is running in debug mode set --log-level=DEBUG),
--recursive", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "enableCopyPrerequisites", + "type": "boolean", + "label": "Enable Copy Prerequisites", + "defaultValue": "false", + "visibleRule": "Destination = AzureVMs", + "required": false, + "helpMarkDown": "Enabling this option configures Windows Remote Management (WinRM) listener over HTTPS protocol on port 5986, using a self-signed certificate. This configuration is required for performing copy operation on Azure machines. If the target Virtual Machines are backed by a Load balancer, ensure Inbound NAT rules are configured for target port (5986). Applicable only for ARM VMs." + }, + { + "name": "CopyFilesInParallel", + "type": "boolean", + "label": "Copy in Parallel", + "defaultValue": "true", + "required": false, + "helpMarkDown": "Setting it to true will copy files in parallel to the target machines.", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "CleanTargetBeforeCopy", + "type": "boolean", + "label": "Clean Target", + "defaultValue": "false", + "required": false, + "helpMarkDown": "Setting it to true will clean-up the destination folder before copying the files." + }, + { + "name": "skipCACheck", + "type": "boolean", + "label": "Test Certificate", + "defaultValue": "true", + "required": false, + "helpMarkDown": "If this option is selected, client skips the validation that the server certificate is signed by a trusted certificate authority (CA) when connecting over Hypertext Transfer Protocol over Secure Socket Layer (HTTPS).", + "visibleRule": "Destination = AzureVMs" + } + ], + "outputVariables": [ + { + "name": "StorageContainerUri", + "description": "Uri of the container where the files were copied to. Valid only when the selected destination is Azure Blob." + } + ], + "dataSourceBindings": [ + { + "target": "StorageAccountRM", + "endpointId": "$(ConnectedServiceNameARM)", + "dataSourceName": "AzureStorageAccountRM" + }, + { + "target": "EnvironmentNameRM", + "endpointId": "$(ConnectedServiceNameARM)", + "dataSourceName": "AzureVirtualMachinesV2Id", + "resultTemplate": "{\"Value\":\"{{{ #extractResource resourceGroups}}}\",\"DisplayValue\":\"{{{ #extractResource resourceGroups}}}\"}" + } + ], + "instanceNameFormat": "$(Destination) File Copy", + "prejobexecution": { + "Node10": { + "target": "PreJobExecutionAzureFileCopy.js" + }, + "Node16": { + "target": "PreJobExecutionAzureFileCopy.js", + "argumentFormat": "" + }, + "Node20_1": { + "target": "PreJobExecutionAzureFileCopy.js", + "argumentFormat": "" + } + }, + "execution": { + "PowerShell3": { + "target": "AzureFileCopy.ps1" + } + }, + "messages": { + "AFC_StorageAccountNotFound": "Storage account: {0} not found. The selected service connection 'Service Principal' supports storage accounts of Azure Resource Manager type only.", + "AFC_ResourceGroupNotFound": "Provided resource group '{0}' does not exist.", + "AFC_GetVMStatus": "[Azure Call]Getting the status for vm '{0}'", + "AFC_GetVMStatusComplete": "[Azure Call]Got the status for vm '{0}'", + "AFC_GetCustomScriptExtension": "[Azure Call]Getting the custom script extension '{0}' for vm '{1}'", + "AFC_GetCustomScriptExtensionComplete": "[Azure Call]Got the custom script extension '{0}' for vm '{1}'", + "AFC_SetCustomScriptExtension": "[Azure Call]Setting the custom script extension '{0}' for vm '{1}'", + "AFC_SetCustomScriptExtensionComplete": "[Azure Call]Set the custom script extension '{0}' for vm '{1}'", + "AFC_RemoveCustomScriptExtension": "[Azure Call]Removing the custom script extension '{0}' for vm '{1}'", + "AFC_RemoveCustomScriptExtensionComplete": "[Azure Call]Removed the custom script extension '{0}' for vm '{1}'", + "AFC_NoNetworkInterface": "[Azure Call]No network interface found with virtual machine ID {0} under resource group {1}", + "AFC_NullOrEmptyResourceGroup": "[Azure Call]Resource group name and virtual machine ID should not be null or empty", + "AFC_AzurePSNotInstalled": "The required minimum version {0} of the Azure Powershell Cmdlets are not installed. You can follow the instructions at https://azure.microsoft.com/en-in/documentation/articles/powershell-install-configure/ to get the latest Azure powershell", + "AFC_ClassicStorageAccountNotFound": "Storage account: {0} not found. The selected service connection 'Certificate' supports storage accounts of Azure Classic type only.", + "AFC_GenericStorageAccountNotFound": "Storage account: {0} not found. Please specify existing storage account", + "AFC_AzureFileCopyMoreHelp": "For more info please refer to {0}", + "AFC_UploadFilesStorageAccount": "Uploading files from source path: '{0}' to storage account: '{1}' in container: '{2}' with blob prefix: '{3}'", + "AFC_UploadContainerStorageAccount": "Upload to container: '{0}' in storage account: '{1}' with blob prefix: '{2}' failed with error: '{3}'", + "AFC_UploadFileSuccessful": "Uploaded files successfully from source path: '{0}' to storage account: '{1}' in container: '{2}' with blob prefix: '{3}'", + "AFC_IncorrectTags": "Tags have been incorrectly specified. They have to be in the format Role:Web,DB;Location:East US;Dept.:Finance,HR", + "AFC_MachineDoesNotExist": "The following machines either do not exist in the resource group or their names have not been specified correctly: {0}. Provide the exact same machine names present in the resource group. Use comma to separate multiple machine names.", + "AFC_MachineNameFromIdErrorAllResources": "Unable to get {0} for all resources in ResourceGroup : '{1}'", + "AFC_MachineNameFromIdError": "Unable to get {0} for '{1}' resources in ResourceGroup : '{2}'", + "AFC_ResourceGroupNotFoundForSelectedConnection": "Unable to find the resource '{1}' using selected service connection '{0}'. Selected service connection '{0}' supports classic resources only (Service Management model).", + "AFC_NoClassicVMResources": "No machine exists under resource group: '{0}' for copy. Selected service connection '{1}' supports Virtual Machines of Azure Classic type only.", + "AFC_NoARMVMResources": "No machine exists under resource group: '{0}' for copy. Selected service connection '{1}' supports Virtual Machines of Azure Resource Manager type only.", + "AFC_NoGenericVMResources": "No machine exists under resource group: '{0}' for copy.", + "AFC_FilteringNoVMResources": "No machine exists under resource group: '{0}' with the following {1} '{2}'.", + "AFC_CopyStarted": "Copy started for machine: '{0}'", + "AFC_CopyCompleted": "Copy status for machine '{0}' : '{1}'", + "AFC_WinRMHelpMessage": "To fix WinRM service connection related issues, select the 'Enable Copy Prerequisites' option in the task. If set already, and the target Virtual Machines are backed by a Load balancer, ensure Inbound NAT rules are configured for target port (5986). Applicable only for ARM VMs.", + "AFC_CopyFailed": "Copy failed on machine '{0}'. Refer logs for more details.", + "AFC_ParallelCopyFailed": "Copy to one or more machines failed. Refer logs for more details.", + "AFC_CopySuccessful": "Copied files from source path: '{0}' to target azure VMs in resource group: '{1}' successfully", + "AFC_SetCustomScriptExtensionFailed": "Setting the custom script extension '{0}' for virtual machine '{1}' failed with error : {2}", + "AFC_AddNetworkSecurityRuleFailed": "Failed to add the network security rule: {0}", + "AFC_UnableToSetCustomScriptExtension": "Unable to set the custom script extension '{0}' for virtual machine '{1}': {2}", + "AFC_CopyPrereqsFailed": "Failed to enable copy prerequisites. {0}", + "AFC_BlobStorageNotFound": "Storage account: {0} not found. Please specify existing storage account", + "AFC_RootContainerAndDirectory": "'/S' option is not valid for $root containers.", + "AFC_RedirectResponseInvalidStatusCode": "The HTTP response code: '{0}' is not a valid redirect status code", + "AFC_RedirectResponseLocationHeaderIsNull": "Redirect response location header is null.", + "AFC_AzCopyBlobUploadNonZeroExitCode": "AzCopy.exe exited with non-zero exit code while uploading files to blob storage.", + "AFC_PreexecutionJob_UnableToGetStorageKey": "Unable to fetch storage account key. Error: '{0}'", + "AFC_UninstallWinRMCustomScriptExtension": "Uninstall WinRM custom script manually and retry deployment.", + "ExpiredServicePrincipal": "Could not fetch access token for Azure. Verify if the Service Principal used is valid and not expired.", + "UnsupportedAuthScheme": "Unsupported authentication scheme '{0}' for endpoint.", + "ServicePrincipalError": "There was an error with the service principal used for the deployment.", + "AzModuleNotFound": "Could not find the modules: 'Az.Accounts'. If the module was recently installed, retry after restarting the Azure Pipelines task agent." + }, + "_buildConfigMapping": { + "Default": "6.237.0", + "Node20_229_2": "6.237.1" + } +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/task.loc.json b/_generated/AzureFileCopyV6_Node20/task.loc.json new file mode 100644 index 000000000000..bbaf66aaf5f0 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/task.loc.json @@ -0,0 +1,298 @@ +{ + "id": "EB72CB01-A7E5-427B-A8A1-1B31CCAC8A43", + "name": "AzureFileCopy", + "friendlyName": "ms-resource:loc.friendlyName", + "description": "ms-resource:loc.description", + "helpUrl": "https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/azure-file-copy", + "helpMarkDown": "ms-resource:loc.helpMarkDown", + "category": "Deploy", + "visibility": [ + "Build", + "Release" + ], + "author": "Microsoft Corporation", + "version": { + "Major": 6, + "Minor": 237, + "Patch": 1 + }, + "demands": [ + "azureps" + ], + "releaseNotes": "ms-resource:loc.releaseNotes", + "minimumAgentVersion": "1.103.0", + "inputs": [ + { + "name": "SourcePath", + "type": "filePath", + "label": "ms-resource:loc.input.label.SourcePath", + "defaultValue": "", + "required": true, + "helpMarkDown": "ms-resource:loc.input.help.SourcePath" + }, + { + "name": "ConnectedServiceNameARM", + "aliases": [ + "azureSubscription" + ], + "type": "connectedService:AzureRM", + "label": "ms-resource:loc.input.label.ConnectedServiceNameARM", + "defaultValue": "", + "required": true, + "helpMarkDown": "ms-resource:loc.input.help.ConnectedServiceNameARM" + }, + { + "name": "Destination", + "type": "pickList", + "label": "ms-resource:loc.input.label.Destination", + "defaultValue": "", + "required": true, + "options": { + "AzureBlob": "Azure Blob", + "AzureVMs": "Azure VMs" + }, + "helpMarkDown": "ms-resource:loc.input.help.Destination" + }, + { + "name": "StorageAccountRM", + "aliases": [ + "storage" + ], + "type": "pickList", + "label": "ms-resource:loc.input.label.StorageAccountRM", + "defaultValue": "", + "required": true, + "helpMarkDown": "ms-resource:loc.input.help.StorageAccountRM", + "properties": { + "EditableOptions": "True" + } + }, + { + "name": "ContainerName", + "type": "string", + "label": "ms-resource:loc.input.label.ContainerName", + "defaultValue": "", + "required": true, + "helpMarkDown": "ms-resource:loc.input.help.ContainerName", + "visibleRule": "Destination = AzureBlob" + }, + { + "name": "BlobPrefix", + "type": "string", + "label": "ms-resource:loc.input.label.BlobPrefix", + "defaultValue": "", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.BlobPrefix", + "visibleRule": "Destination = AzureBlob" + }, + { + "name": "EnvironmentNameRM", + "aliases": [ + "resourceGroup" + ], + "type": "pickList", + "label": "ms-resource:loc.input.label.EnvironmentNameRM", + "defaultValue": "", + "required": true, + "helpMarkDown": "ms-resource:loc.input.help.EnvironmentNameRM", + "properties": { + "EditableOptions": "True" + }, + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "ResourceFilteringMethod", + "type": "radio", + "label": "ms-resource:loc.input.label.ResourceFilteringMethod", + "required": false, + "defaultValue": "machineNames", + "options": { + "machineNames": "Machine Names", + "tags": "Tags" + }, + "helpMarkDown": "ms-resource:loc.input.help.ResourceFilteringMethod", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "MachineNames", + "type": "string", + "label": "ms-resource:loc.input.label.MachineNames", + "defaultValue": "", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.MachineNames", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "vmsAdminUserName", + "type": "string", + "label": "ms-resource:loc.input.label.vmsAdminUserName", + "defaultValue": "", + "required": true, + "helpMarkDown": "ms-resource:loc.input.help.vmsAdminUserName", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "vmsAdminPassword", + "type": "string", + "label": "ms-resource:loc.input.label.vmsAdminPassword", + "defaultValue": "", + "required": true, + "helpMarkDown": "ms-resource:loc.input.help.vmsAdminPassword", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "TargetPath", + "type": "string", + "label": "ms-resource:loc.input.label.TargetPath", + "defaultValue": "", + "required": true, + "helpMarkDown": "ms-resource:loc.input.help.TargetPath", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "AdditionalArgumentsForBlobCopy", + "type": "multiLine", + "label": "ms-resource:loc.input.label.AdditionalArgumentsForBlobCopy", + "required": false, + "defaultValue": "", + "helpMarkDown": "ms-resource:loc.input.help.AdditionalArgumentsForBlobCopy" + }, + { + "name": "AdditionalArgumentsForVMCopy", + "type": "multiLine", + "label": "ms-resource:loc.input.label.AdditionalArgumentsForVMCopy", + "required": false, + "defaultValue": "", + "helpMarkDown": "ms-resource:loc.input.help.AdditionalArgumentsForVMCopy", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "enableCopyPrerequisites", + "type": "boolean", + "label": "ms-resource:loc.input.label.enableCopyPrerequisites", + "defaultValue": "false", + "visibleRule": "Destination = AzureVMs", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.enableCopyPrerequisites" + }, + { + "name": "CopyFilesInParallel", + "type": "boolean", + "label": "ms-resource:loc.input.label.CopyFilesInParallel", + "defaultValue": "true", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.CopyFilesInParallel", + "visibleRule": "Destination = AzureVMs" + }, + { + "name": "CleanTargetBeforeCopy", + "type": "boolean", + "label": "ms-resource:loc.input.label.CleanTargetBeforeCopy", + "defaultValue": "false", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.CleanTargetBeforeCopy" + }, + { + "name": "skipCACheck", + "type": "boolean", + "label": "ms-resource:loc.input.label.skipCACheck", + "defaultValue": "true", + "required": false, + "helpMarkDown": "ms-resource:loc.input.help.skipCACheck", + "visibleRule": "Destination = AzureVMs" + } + ], + "outputVariables": [ + { + "name": "StorageContainerUri", + "description": "Uri of the container where the files were copied to. Valid only when the selected destination is Azure Blob." + } + ], + "dataSourceBindings": [ + { + "target": "StorageAccountRM", + "endpointId": "$(ConnectedServiceNameARM)", + "dataSourceName": "AzureStorageAccountRM" + }, + { + "target": "EnvironmentNameRM", + "endpointId": "$(ConnectedServiceNameARM)", + "dataSourceName": "AzureVirtualMachinesV2Id", + "resultTemplate": "{\"Value\":\"{{{ #extractResource resourceGroups}}}\",\"DisplayValue\":\"{{{ #extractResource resourceGroups}}}\"}" + } + ], + "instanceNameFormat": "ms-resource:loc.instanceNameFormat", + "prejobexecution": { + "Node10": { + "target": "PreJobExecutionAzureFileCopy.js" + }, + "Node16": { + "target": "PreJobExecutionAzureFileCopy.js", + "argumentFormat": "" + }, + "Node20_1": { + "target": "PreJobExecutionAzureFileCopy.js", + "argumentFormat": "" + } + }, + "execution": { + "PowerShell3": { + "target": "AzureFileCopy.ps1" + } + }, + "messages": { + "AFC_StorageAccountNotFound": "ms-resource:loc.messages.AFC_StorageAccountNotFound", + "AFC_ResourceGroupNotFound": "ms-resource:loc.messages.AFC_ResourceGroupNotFound", + "AFC_GetVMStatus": "ms-resource:loc.messages.AFC_GetVMStatus", + "AFC_GetVMStatusComplete": "ms-resource:loc.messages.AFC_GetVMStatusComplete", + "AFC_GetCustomScriptExtension": "ms-resource:loc.messages.AFC_GetCustomScriptExtension", + "AFC_GetCustomScriptExtensionComplete": "ms-resource:loc.messages.AFC_GetCustomScriptExtensionComplete", + "AFC_SetCustomScriptExtension": "ms-resource:loc.messages.AFC_SetCustomScriptExtension", + "AFC_SetCustomScriptExtensionComplete": "ms-resource:loc.messages.AFC_SetCustomScriptExtensionComplete", + "AFC_RemoveCustomScriptExtension": "ms-resource:loc.messages.AFC_RemoveCustomScriptExtension", + "AFC_RemoveCustomScriptExtensionComplete": "ms-resource:loc.messages.AFC_RemoveCustomScriptExtensionComplete", + "AFC_NoNetworkInterface": "ms-resource:loc.messages.AFC_NoNetworkInterface", + "AFC_NullOrEmptyResourceGroup": "ms-resource:loc.messages.AFC_NullOrEmptyResourceGroup", + "AFC_AzurePSNotInstalled": "ms-resource:loc.messages.AFC_AzurePSNotInstalled", + "AFC_ClassicStorageAccountNotFound": "ms-resource:loc.messages.AFC_ClassicStorageAccountNotFound", + "AFC_GenericStorageAccountNotFound": "ms-resource:loc.messages.AFC_GenericStorageAccountNotFound", + "AFC_AzureFileCopyMoreHelp": "ms-resource:loc.messages.AFC_AzureFileCopyMoreHelp", + "AFC_UploadFilesStorageAccount": "ms-resource:loc.messages.AFC_UploadFilesStorageAccount", + "AFC_UploadContainerStorageAccount": "ms-resource:loc.messages.AFC_UploadContainerStorageAccount", + "AFC_UploadFileSuccessful": "ms-resource:loc.messages.AFC_UploadFileSuccessful", + "AFC_IncorrectTags": "ms-resource:loc.messages.AFC_IncorrectTags", + "AFC_MachineDoesNotExist": "ms-resource:loc.messages.AFC_MachineDoesNotExist", + "AFC_MachineNameFromIdErrorAllResources": "ms-resource:loc.messages.AFC_MachineNameFromIdErrorAllResources", + "AFC_MachineNameFromIdError": "ms-resource:loc.messages.AFC_MachineNameFromIdError", + "AFC_ResourceGroupNotFoundForSelectedConnection": "ms-resource:loc.messages.AFC_ResourceGroupNotFoundForSelectedConnection", + "AFC_NoClassicVMResources": "ms-resource:loc.messages.AFC_NoClassicVMResources", + "AFC_NoARMVMResources": "ms-resource:loc.messages.AFC_NoARMVMResources", + "AFC_NoGenericVMResources": "ms-resource:loc.messages.AFC_NoGenericVMResources", + "AFC_FilteringNoVMResources": "ms-resource:loc.messages.AFC_FilteringNoVMResources", + "AFC_CopyStarted": "ms-resource:loc.messages.AFC_CopyStarted", + "AFC_CopyCompleted": "ms-resource:loc.messages.AFC_CopyCompleted", + "AFC_WinRMHelpMessage": "ms-resource:loc.messages.AFC_WinRMHelpMessage", + "AFC_CopyFailed": "ms-resource:loc.messages.AFC_CopyFailed", + "AFC_ParallelCopyFailed": "ms-resource:loc.messages.AFC_ParallelCopyFailed", + "AFC_CopySuccessful": "ms-resource:loc.messages.AFC_CopySuccessful", + "AFC_SetCustomScriptExtensionFailed": "ms-resource:loc.messages.AFC_SetCustomScriptExtensionFailed", + "AFC_AddNetworkSecurityRuleFailed": "ms-resource:loc.messages.AFC_AddNetworkSecurityRuleFailed", + "AFC_UnableToSetCustomScriptExtension": "ms-resource:loc.messages.AFC_UnableToSetCustomScriptExtension", + "AFC_CopyPrereqsFailed": "ms-resource:loc.messages.AFC_CopyPrereqsFailed", + "AFC_BlobStorageNotFound": "ms-resource:loc.messages.AFC_BlobStorageNotFound", + "AFC_RootContainerAndDirectory": "ms-resource:loc.messages.AFC_RootContainerAndDirectory", + "AFC_RedirectResponseInvalidStatusCode": "ms-resource:loc.messages.AFC_RedirectResponseInvalidStatusCode", + "AFC_RedirectResponseLocationHeaderIsNull": "ms-resource:loc.messages.AFC_RedirectResponseLocationHeaderIsNull", + "AFC_AzCopyBlobUploadNonZeroExitCode": "ms-resource:loc.messages.AFC_AzCopyBlobUploadNonZeroExitCode", + "AFC_PreexecutionJob_UnableToGetStorageKey": "ms-resource:loc.messages.AFC_PreexecutionJob_UnableToGetStorageKey", + "AFC_UninstallWinRMCustomScriptExtension": "ms-resource:loc.messages.AFC_UninstallWinRMCustomScriptExtension", + "ExpiredServicePrincipal": "ms-resource:loc.messages.ExpiredServicePrincipal", + "UnsupportedAuthScheme": "ms-resource:loc.messages.UnsupportedAuthScheme", + "ServicePrincipalError": "ms-resource:loc.messages.ServicePrincipalError", + "AzModuleNotFound": "ms-resource:loc.messages.AzModuleNotFound" + }, + "_buildConfigMapping": { + "Default": "6.237.0", + "Node20_229_2": "6.237.1" + } +} \ No newline at end of file diff --git a/_generated/AzureFileCopyV6_Node20/tsconfig.json b/_generated/AzureFileCopyV6_Node20/tsconfig.json new file mode 100644 index 000000000000..0cd3f3f78ed5 --- /dev/null +++ b/_generated/AzureFileCopyV6_Node20/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "target": "ES6", + "module": "commonjs", + "skipLibCheck": true + }, + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/make-options.json b/make-options.json index 02bf57c9f72d..c426b8a12b4c 100644 --- a/make-options.json +++ b/make-options.json @@ -21,6 +21,7 @@ "AzureFileCopyV3", "AzureFileCopyV4", "AzureFileCopyV5", + "AzureFileCopyV6", "AzureFunctionAppV1", "AzureFunctionAppV2", "AzureFunctionAppContainerV1", @@ -300,6 +301,7 @@ "AzureFileCopyV3", "AzureFileCopyV4", "AzureFileCopyV5", + "AzureFileCopyV6", "AzureFunctionAppContainerV1", "AzureFunctionOnKubernetesV0", "AzureFunctionOnKubernetesV1",