Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AzureFileCopy] Pick up latest Azure PowerShell module on Hosted agent #13067

Merged
merged 12 commits into from
Jun 8, 2020

Conversation

arjgupta
Copy link
Member

@arjgupta arjgupta commented Jun 5, 2020

No description provided.

@@ -17,7 +17,7 @@
"version": {
"Major": 1,
"Minor": 167,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the minor version to the current sprint number.

@@ -0,0 +1,27 @@
function Get-EndpointAuthenticationScheme
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this utility ?

@@ -17,7 +17,7 @@
"version": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we currently fixing this for AzureCloudPowerShellDeployment task as well ?

@@ -14,7 +14,7 @@
"version": {
"Major": 2,
"Minor": 167,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the minor version to the current sprint number.

@@ -14,7 +14,7 @@
"version": {
"Major": 3,
"Minor": 167,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the minor version to the current sprint number.

Write-Verbose "Latest AzureRM module path is null or empty."
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extra line

@@ -65,6 +65,8 @@ Import-Module $PSScriptRoot\ps_modules\RemoteDeployer

# Initialize Azure.
Import-Module $PSScriptRoot\ps_modules\VstsAzureHelpers_
$endpoint = Get-Endpoint -connectedServiceName $connectedServiceName
Update-PSModulePathForHostedAgentWithLatestModule -Endpoint $endpoint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move the line . "$PSScriptRoot\Utility.ps1" before the Get-Endpoint call

@asranja asranja changed the title Users/arjgupta/afcv2 latestmodule [AzureFileCopy] Pick up latest Azure PowerShell module on Hosted agent Jun 8, 2020
@asranja asranja merged commit 9c1e149 into master Jun 8, 2020
asranja added a commit that referenced this pull request Jun 8, 2020
#13067)

* update azure file copy to use latest available azure rm module on hosted agent environment

* update task version

* check for null for latestazurermmodulepath

* move psmoduleutility to common. afcv2 and afcv3

* refactor out get-endpointauthenticationscheme function

* use endpoint.type instead of authentication scheme to check whether or not to update env:psmodulepath

* update task version of tasks using common modules dependency

* remove endpoint utility as it is not needed

* load utility.ps1 before calling get-endpoint

* update minor version

Co-authored-by: Ashish Ranjan 💩 <asranja@microsoft.com>
asranja added a commit that referenced this pull request Jun 9, 2020
#13067) (#13083)

* update azure file copy to use latest available azure rm module on hosted agent environment

* update task version

* check for null for latestazurermmodulepath

* move psmoduleutility to common. afcv2 and afcv3

* refactor out get-endpointauthenticationscheme function

* use endpoint.type instead of authentication scheme to check whether or not to update env:psmodulepath

* update task version of tasks using common modules dependency

* remove endpoint utility as it is not needed

* load utility.ps1 before calling get-endpoint

* update minor version

Co-authored-by: Ashish Ranjan 💩 <asranja@microsoft.com>

Co-authored-by: Arjun Gupta <arjgupta@microsoft.com>
asranja added a commit that referenced this pull request Jun 10, 2020
asranja added a commit that referenced this pull request Jun 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants