mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2026-01-06 18:17:26 +08:00
[Windows] Change Alibaba Cloud CLI installation to direct download (#1353)
* change aliyun-cli installation * change directory from system32 * fix typo * move aliyun installation block for win2016
This commit is contained in:
@@ -299,13 +299,13 @@
|
||||
{
|
||||
"type": "powershell",
|
||||
"scripts":[
|
||||
"{{ template_dir }}/scripts/Installers/Install-AliyunCli.ps1"
|
||||
"{{ template_dir }}/scripts/Installers/Install-7zip.ps1"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "powershell",
|
||||
"scripts":[
|
||||
"{{ template_dir }}/scripts/Installers/Install-7zip.ps1"
|
||||
"{{ template_dir }}/scripts/Installers/Install-AliyunCli.ps1"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -3,6 +3,18 @@
|
||||
## Desc: Install Alibaba Cloud CLI
|
||||
################################################################################
|
||||
|
||||
Choco-Install -PackageName aliyun-cli
|
||||
Write-Host "Download Latest aliyun-cli archive"
|
||||
$url = 'https://api.github.com/repos/aliyun/aliyun-cli/releases/latest'
|
||||
# Explicitly set type to string since match returns array by default
|
||||
[System.String] $aliyunLatest = (Invoke-RestMethod -Uri $url).assets.browser_download_url -match "aliyun-cli-windows"
|
||||
$aliyunArchivePath = Start-DownloadWithRetry -Url $aliyunLatest -Name "aliyun-cli.zip"
|
||||
|
||||
Write-Host "Expand aliyun-cli archive"
|
||||
$aliyunPath = "C:\aliyun-cli"
|
||||
New-Item -Path $aliyunPath -ItemType Directory -Force
|
||||
Extract-7Zip -Path $aliyunArchivePath -DestinationPath $aliyunPath
|
||||
|
||||
# Add aliyun-cli to path
|
||||
Add-MachinePathItem $aliyunPath
|
||||
|
||||
Invoke-PesterTests -TestFile "Tools" -TestName "AliyunCli"
|
||||
Reference in New Issue
Block a user