mirror of
https://github.com/actions/runner-images.git
synced 2025-12-11 03:27:05 +00:00
Remove authentication method from script (#11616)
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
param(
|
param(
|
||||||
[String] [Parameter (Mandatory=$true)] $TemplatePath,
|
[String] [Parameter (Mandatory=$true)] $TemplatePath,
|
||||||
[String] [Parameter (Mandatory=$true)] $ClientId,
|
[String] [Parameter (Mandatory=$true)] $ClientId,
|
||||||
[String] [Parameter (Mandatory=$true)] $ClientSecret,
|
[String] [Parameter (Mandatory=$false)] $ClientSecret,
|
||||||
[String] [Parameter (Mandatory=$true)] $Location,
|
[String] [Parameter (Mandatory=$true)] $Location,
|
||||||
[String] [Parameter (Mandatory=$true)] $ImageName,
|
[String] [Parameter (Mandatory=$true)] $ImageName,
|
||||||
[String] [Parameter (Mandatory=$true)] $ImageResourceGroupName,
|
[String] [Parameter (Mandatory=$true)] $ImageResourceGroupName,
|
||||||
@@ -13,7 +13,7 @@ param(
|
|||||||
[String] [Parameter (Mandatory=$false)] $VirtualNetworkRG,
|
[String] [Parameter (Mandatory=$false)] $VirtualNetworkRG,
|
||||||
[String] [Parameter (Mandatory=$false)] $VirtualNetworkSubnet,
|
[String] [Parameter (Mandatory=$false)] $VirtualNetworkSubnet,
|
||||||
[String] [Parameter (Mandatory=$false)] $AllowedInboundIpAddresses = "[]",
|
[String] [Parameter (Mandatory=$false)] $AllowedInboundIpAddresses = "[]",
|
||||||
[hashtable] [Parameter (Mandatory=$False)] $Tags = @{}
|
[hashtable] [Parameter (Mandatory=$false)] $Tags = @{}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (-not (Test-Path $TemplatePath))
|
if (-not (Test-Path $TemplatePath))
|
||||||
|
|||||||
@@ -1,14 +1,7 @@
|
|||||||
param(
|
param(
|
||||||
[Parameter (Mandatory=$true)] [string] $TempResourceGroupName,
|
[Parameter (Mandatory=$true)] [string] $TempResourceGroupName
|
||||||
[Parameter (Mandatory=$true)] [string] $SubscriptionId,
|
|
||||||
[Parameter (Mandatory=$true)] [string] $ClientId,
|
|
||||||
[Parameter (Mandatory=$true)] [string] $ClientSecret,
|
|
||||||
[Parameter (Mandatory=$true)] [string] $TenantId
|
|
||||||
)
|
)
|
||||||
|
|
||||||
az login --service-principal --username $ClientId --password=$ClientSecret --tenant $TenantId | Out-Null
|
|
||||||
az account set --subscription $SubscriptionId | Out-Null
|
|
||||||
|
|
||||||
$groupExist = az group exists --name $TempResourceGroupName
|
$groupExist = az group exists --name $TempResourceGroupName
|
||||||
if ($groupExist -eq "true") {
|
if ($groupExist -eq "true") {
|
||||||
Write-Host "Found a match, deleting temporary files"
|
Write-Host "Found a match, deleting temporary files"
|
||||||
|
|||||||
Reference in New Issue
Block a user