Skip to content

Commit 99c390d

Browse files
committed
Merge remote-tracking branch 'origin/master' into Localization
2 parents 4ae9e5f + b93fa97 commit 99c390d

File tree

141 files changed

+7047
-1394
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+7047
-1394
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ Tasks/DockerV2/ @microsoft/release-management-task-team @manolerazvan
193193

194194
Tasks/DockerComposeV0/ @microsoft/release-management-task-team @manolerazvan
195195

196+
Tasks/DockerComposeV1/ @microsoft/release-management-task-team @manolerazvan
197+
196198
Tasks/DockerInstallerV0/ @microsoft/release-management-task-team @manolerazvan
197199

198200
Tasks/DotNetCoreCLIV2/ @microsoft/akvelon-build-task-team @DergachevE

Tasks/AzureCloudPowerShellDeploymentV1/task.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"author": "Microsoft Corporation",
1717
"version": {
1818
"Major": 1,
19-
"Minor": 241,
20-
"Patch": 1
19+
"Minor": 242,
20+
"Patch": 0
2121
},
2222
"demands": [
2323
"azureps"

Tasks/AzureCloudPowerShellDeploymentV1/task.loc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"author": "Microsoft Corporation",
1717
"version": {
1818
"Major": 1,
19-
"Minor": 241,
20-
"Patch": 1
19+
"Minor": 242,
20+
"Patch": 0
2121
},
2222
"demands": [
2323
"azureps"

Tasks/AzureCloudPowerShellDeploymentV2/task.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"author": "Microsoft Corporation",
1717
"version": {
1818
"Major": 2,
19-
"Minor": 241,
20-
"Patch": 1
19+
"Minor": 242,
20+
"Patch": 0
2121
},
2222
"demands": [
2323
"azureps"

Tasks/AzureCloudPowerShellDeploymentV2/task.loc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"author": "Microsoft Corporation",
1717
"version": {
1818
"Major": 2,
19-
"Minor": 241,
20-
"Patch": 1
19+
"Minor": 242,
20+
"Patch": 0
2121
},
2222
"demands": [
2323
"azureps"

Tasks/AzureFileCopyV1/AzureFileCopy.ps1

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ $containerName = $containerName.Trim().ToLower()
5454
$azCopyExeLocation = 'AzCopy\AzCopy.exe'
5555
$azCopyLocation = [System.IO.Path]::GetDirectoryName($azCopyExeLocation)
5656

57-
# Initialize Azure.
58-
Import-Module $PSScriptRoot\ps_modules\VstsAzureHelpers_
59-
Initialize-Azure
60-
6157
# Import the loc strings.
6258
Import-VstsLocStrings -LiteralPath $PSScriptRoot/Task.json
6359

@@ -69,6 +65,15 @@ Import-Module "$PSScriptRoot\DeploymentUtilities\Microsoft.TeamFoundation.Distri
6965
. "$PSScriptRoot\AzureFileCopyJob.ps1"
7066
. "$PSScriptRoot\Utility.ps1"
7167

68+
if ($featureFlags.retireAzureRM)
69+
{
70+
Modify-PSModulePathForHostedAgent
71+
}
72+
73+
# Initialize Azure.
74+
Import-Module $PSScriptRoot\ps_modules\VstsAzureHelpers_
75+
Initialize-Azure
76+
7277
# Enabling detailed logging only when system.debug is true
7378
$enableDetailedLoggingString = $env:system_debug
7479
if ($enableDetailedLoggingString -ne "true")

Tasks/AzureFileCopyV1/Utility.ps1

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,4 +1454,40 @@ function Check-ContainerNameAndArgs
14541454
{
14551455
Write-Warning (Get-vstsLocString -Key "AFC_RootContainerAndDirectory")
14561456
}
1457+
}
1458+
1459+
function Modify-PSModulePathForHostedAgent {
1460+
$newEnvPSModulePath = $env:PSModulePath
1461+
1462+
if (Test-Path "C:\Modules\az_*") {
1463+
$azPSModulePath = (Get-ChildItem "C:\Modules\az_*" -Directory `
1464+
| Sort-Object { [version]$_.Name.Split('_')[-1] } `
1465+
| Select-Object -Last 1).FullName
1466+
1467+
Write-Verbose "Found Az module path $azPSModulePath, will be used"
1468+
$env:PSModulePath = ($azPSModulePath + ";" + $newEnvPSModulePath).Trim(";")
1469+
}
1470+
1471+
Import-AzModule -moduleName "Az.Resources"
1472+
Import-AzModule -moduleName "Az.Storage"
1473+
Import-AzModule -moduleName "Az.Compute"
1474+
Import-AzModule -moduleName "Az.Network"
1475+
}
1476+
1477+
function Import-AzModule
1478+
{
1479+
param([string]$moduleName)
1480+
1481+
if (!(Get-Module $moduleName))
1482+
{
1483+
$module = Get-Module -Name $moduleName -ListAvailable | Sort-Object Version -Descending | Select-Object -First 1
1484+
if (!$module) {
1485+
Write-Verbose "No module found with name: $moduleName"
1486+
}
1487+
else {
1488+
# Import the module.
1489+
Write-Host "##[command]Import-Module -Name $($module.Path) -Global"
1490+
$module = Import-Module -Name $module.Path -Global -PassThru -Force
1491+
}
1492+
}
14571493
}

Tasks/AzureFileCopyV1/task.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 1,
1616
"Minor": 242,
17-
"Patch": 0
17+
"Patch": 1
1818
},
1919
"demands": [
2020
"azureps"

Tasks/AzureFileCopyV1/task.loc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"version": {
1515
"Major": 1,
1616
"Minor": 242,
17-
"Patch": 0
17+
"Patch": 1
1818
},
1919
"demands": [
2020
"azureps"

Tasks/AzureFileCopyV2/AzureFileCopy.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ Import-Module $PSScriptRoot\ps_modules\RemoteDeployer
7171
Import-Module $PSScriptRoot\ps_modules\VstsAzureHelpers_
7272

7373
. "$PSScriptRoot\Utility.ps1"
74+
75+
if ($featureFlags.retireAzureRM)
76+
{
77+
Modify-PSModulePathForHostedAgent
78+
}
79+
7480
$endpoint = Get-Endpoint -connectedServiceName $connectedServiceName
7581
Update-PSModulePathForHostedAgentWithLatestModule -Endpoint $endpoint
7682
Initialize-Azure

0 commit comments

Comments
 (0)