mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-28 04:20:23 +08:00
[Windows] Implement new directories hierarchy (#8616)
This commit is contained in:
committed by
GitHub
parent
84a7deae24
commit
d1f2c9a3be
27
images/windows/scripts/build/Install-CloudFoundryCli.ps1
Normal file
27
images/windows/scripts/build/Install-CloudFoundryCli.ps1
Normal file
@@ -0,0 +1,27 @@
|
||||
################################################################################
|
||||
## File: Install-CloudFoundryCli.ps1
|
||||
## Desc: Install Cloud Foundry CLI
|
||||
################################################################################
|
||||
|
||||
# Download the latest cf cli exe
|
||||
$CloudFoundryCliName = "cf-cli.zip"
|
||||
$CloudFoundryCliUrl = "https://packages.cloudfoundry.org/stable?release=windows64-exe&source=github"
|
||||
|
||||
$CloudFoundryArchPath = Start-DownloadWithRetry -Url $CloudFoundryCliUrl -Name $CloudFoundryCliName
|
||||
|
||||
# Create directory for cf cli
|
||||
$CloudFoundryCliPath = "C:\cf-cli"
|
||||
New-Item -Path $CloudFoundryCliPath -ItemType Directory -Force
|
||||
|
||||
# Extract the zip archive
|
||||
Write-Host "Extracting cf cli..."
|
||||
Extract-7Zip -Path $CloudFoundryArchPath -DestinationPath $CloudFoundryCliPath
|
||||
|
||||
# Add cf to path
|
||||
Add-MachinePathItem $CloudFoundryCliPath
|
||||
|
||||
# Validate cf signature
|
||||
$CloudFoundrySignatureThumbprint = "4C69EDD13930ED01B83DD1D17B09C434DC1F2177"
|
||||
Test-FileSignature -FilePath "$CloudFoundryCliPath\cf.exe" -ExpectedThumbprint $CloudFoundrySignatureThumbprint
|
||||
|
||||
Invoke-PesterTests -TestFile "CLI.Tools" -TestName "CloudFoundry CLI"
|
||||
Reference in New Issue
Block a user