-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Users/ajya/nationalcloudclientsidechanges #3551
Changes from all commits
75ff28b
c0ea485
c948cb9
23cbd25
4162125
2ae2c5e
a484fcf
047f93c
ff1f403
107a0ee
a5cea63
28c263d
41b7a4e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
"version": { | ||
"Major": 1, | ||
"Minor": 0, | ||
"Patch": 84 | ||
"Patch": 85 | ||
}, | ||
"demands": [ | ||
"azureps" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
"version": { | ||
"Major": 1, | ||
"Minor": 0, | ||
"Patch": 84 | ||
"Patch": 85 | ||
}, | ||
"demands": [ | ||
"azureps" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
"version": { | ||
"Major": 1, | ||
"Minor": 113, | ||
"Patch": 0 | ||
"Patch": 1 | ||
}, | ||
"demands": [ | ||
"azureps" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
"version": { | ||
"Major": 1, | ||
"Minor": 113, | ||
"Patch": 0 | ||
"Patch": 1 | ||
}, | ||
"demands": [ | ||
"azureps" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
"version": { | ||
"Major": 2, | ||
"Minor": 0, | ||
"Patch": 0 | ||
"Patch": 1 | ||
}, | ||
"demands": [], | ||
"minimumAgentVersion": "2.0.0", | ||
|
@@ -320,6 +320,8 @@ | |
"ClientIdCannotBeEmpty": "clientId must be a non empty string.", | ||
"DomainCannotBeEmpty": "domain must be a non empty string.", | ||
"SecretCannotBeEmpty": "secret must be a non empty string.", | ||
"armUrlCannotBeEmpty": "arm Url must be a non empty string.", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the plan only to add support in latest task version for ARG? I am fine with that call, but want to confirm with PMs. |
||
"authorityUrlCannotBeEmpty": "authority must be a non empty string.", | ||
"CouldNotFetchAccessTokenforAzureStatusCode": "Could not fetch access token for azure. Status code: %s, status message: %s", | ||
"LoadBalancerNameCannotBeNull": "'loadBalancerName cannot be null or undefined and it must be of type string.'", | ||
"NetworkInterfaceNameCannotBeNull": "networkInterfaceName cannot be null or undefined and it must be of type string.", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,11 @@ function Initialize-AzureSubscription { | |
|
||
#Set UserAgent for Azure Calls | ||
Set-UserAgent | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you ensure Azure PowerShell task is covered as part of your testing? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I have tested Azure Powershell Task |
||
$environmentName = "AzureCloud" | ||
if($Endpoint.Data.Environment) { | ||
$environmentName = $Endpoint.Data.Environment | ||
} | ||
|
||
if ($Endpoint.Auth.Scheme -eq 'Certificate') { | ||
# Certificate is only supported for the Azure module. | ||
|
@@ -57,11 +62,6 @@ function Initialize-AzureSubscription { | |
$additional['CurrentStorageAccountName'] = $StorageAccount | ||
} | ||
|
||
$environmentName = "AzureCloud" | ||
if( $Endpoint.Data.Environment ) { | ||
$environmentName = $Endpoint.Data.Environment | ||
} | ||
|
||
# Set the subscription. | ||
Write-Host "##[command]Set-AzureSubscription -SubscriptionName $($Endpoint.Data.SubscriptionName) -SubscriptionId $($Endpoint.Data.SubscriptionId) -Certificate ******** -Environment $environmentName $(Format-Splat $additional)" | ||
Set-AzureSubscription -SubscriptionName $Endpoint.Data.SubscriptionName -SubscriptionId $Endpoint.Data.SubscriptionId -Certificate $certificate -Environment $environmentName @additional | ||
|
@@ -126,8 +126,8 @@ function Initialize-AzureSubscription { | |
} else { | ||
# Else, this is AzureRM. | ||
try { | ||
Write-Host "##[command]Add-AzureRMAccount -ServicePrincipal -Tenant $($Endpoint.Auth.Parameters.TenantId) -Credential $psCredential" | ||
$null = Add-AzureRMAccount -ServicePrincipal -Tenant $Endpoint.Auth.Parameters.TenantId -Credential $psCredential | ||
Write-Host "##[command]Add-AzureRMAccount -ServicePrincipal -Tenant $($Endpoint.Auth.Parameters.TenantId) -Credential $psCredential -EnvironmentName $environmentName" | ||
$null = Add-AzureRMAccount -ServicePrincipal -Tenant $Endpoint.Auth.Parameters.TenantId -Credential $psCredential -EnvironmentName $environmentName | ||
} catch { | ||
# Provide an additional, custom, credentials-related error message. | ||
Write-VstsTaskError -Message $_.Exception.Message | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did this API version work fine in other Cloud environment types. Do you see any issue with Azure deployments causing issues?