Skip to content

Commit bca30bf

Browse files
Remove authentication method from script (#11616)
1 parent 14b6c38 commit bca30bf

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

images.CI/linux-and-win/build-image.ps1

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
param(
22
[String] [Parameter (Mandatory=$true)] $TemplatePath,
33
[String] [Parameter (Mandatory=$true)] $ClientId,
4-
[String] [Parameter (Mandatory=$true)] $ClientSecret,
4+
[String] [Parameter (Mandatory=$false)] $ClientSecret,
55
[String] [Parameter (Mandatory=$true)] $Location,
66
[String] [Parameter (Mandatory=$true)] $ImageName,
77
[String] [Parameter (Mandatory=$true)] $ImageResourceGroupName,
@@ -13,7 +13,7 @@ param(
1313
[String] [Parameter (Mandatory=$false)] $VirtualNetworkRG,
1414
[String] [Parameter (Mandatory=$false)] $VirtualNetworkSubnet,
1515
[String] [Parameter (Mandatory=$false)] $AllowedInboundIpAddresses = "[]",
16-
[hashtable] [Parameter (Mandatory=$False)] $Tags = @{}
16+
[hashtable] [Parameter (Mandatory=$false)] $Tags = @{}
1717
)
1818

1919
if (-not (Test-Path $TemplatePath))

images.CI/linux-and-win/cleanup.ps1

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
param(
2-
[Parameter (Mandatory=$true)] [string] $TempResourceGroupName,
3-
[Parameter (Mandatory=$true)] [string] $SubscriptionId,
4-
[Parameter (Mandatory=$true)] [string] $ClientId,
5-
[Parameter (Mandatory=$true)] [string] $ClientSecret,
6-
[Parameter (Mandatory=$true)] [string] $TenantId
2+
[Parameter (Mandatory=$true)] [string] $TempResourceGroupName
73
)
84

9-
az login --service-principal --username $ClientId --password=$ClientSecret --tenant $TenantId | Out-Null
10-
az account set --subscription $SubscriptionId | Out-Null
11-
125
$groupExist = az group exists --name $TempResourceGroupName
136
if ($groupExist -eq "true") {
147
Write-Host "Found a match, deleting temporary files"

0 commit comments

Comments
 (0)