mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +00:00
Add Google Cloud SDK for Windows (#1102)
* Add Google Cloud SDK * Add Validate-GoogleCloudSDK.ps1 script
This commit is contained in:
committed by
GitHub
parent
f342a7de2d
commit
4c34ad64df
@@ -682,6 +682,12 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Install-MongoDB.ps1"
|
"{{ template_dir }}/scripts/Installers/Install-MongoDB.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "powershell",
|
||||||
|
"scripts":[
|
||||||
|
"{{ template_dir }}/scripts/Installers/Install-GoogleCloudSDK.ps1"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "windows-restart",
|
"type": "windows-restart",
|
||||||
"restart_timeout": "30m"
|
"restart_timeout": "30m"
|
||||||
@@ -998,6 +1004,12 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Validate-MongoDB.ps1"
|
"{{ template_dir }}/scripts/Installers/Validate-MongoDB.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "powershell",
|
||||||
|
"scripts":[
|
||||||
|
"{{ template_dir }}/scripts/Installers/Validate-GoogleCloudSDK.ps1"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
|
|||||||
@@ -667,6 +667,12 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Install-MongoDB.ps1"
|
"{{ template_dir }}/scripts/Installers/Install-MongoDB.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "powershell",
|
||||||
|
"scripts":[
|
||||||
|
"{{ template_dir }}/scripts/Installers/Install-GoogleCloudSDK.ps1"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "windows-restart",
|
"type": "windows-restart",
|
||||||
"restart_timeout": "10m"
|
"restart_timeout": "10m"
|
||||||
@@ -989,6 +995,12 @@
|
|||||||
"{{ template_dir }}/scripts/Installers/Validate-AliyunCli.ps1"
|
"{{ template_dir }}/scripts/Installers/Validate-AliyunCli.ps1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "powershell",
|
||||||
|
"scripts":[
|
||||||
|
"{{ template_dir }}/scripts/Installers/Validate-GoogleCloudSDK.ps1"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "powershell",
|
"type": "powershell",
|
||||||
"scripts":[
|
"scripts":[
|
||||||
|
|||||||
9
images/win/scripts/Installers/Install-GoogleCloudSDK.ps1
Normal file
9
images/win/scripts/Installers/Install-GoogleCloudSDK.ps1
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
################################################################################
|
||||||
|
## File: Install-GoogleCloudSDK.ps1
|
||||||
|
## Desc: Install Google Cloud SDK
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# https://cloud.google.com/sdk/docs/downloads-interactive
|
||||||
|
$googleCloudSDKInstaller = "https://dl.google.com/dl/cloudsdk/channels/rapid/GoogleCloudSDKInstaller.exe"
|
||||||
|
$argumentList = @("/S", "/allusers", "/noreporting")
|
||||||
|
Install-Binary -Url $googleCloudSDKInstaller -Name "GoogleCloudSDKInstaller.exe" -ArgumentList $argumentList
|
||||||
19
images/win/scripts/Installers/Validate-GoogleCloudSDK.ps1
Normal file
19
images/win/scripts/Installers/Validate-GoogleCloudSDK.ps1
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
################################################################################
|
||||||
|
## File: Validate-GoogleCloudSDK.ps1
|
||||||
|
## Desc: Validate Install Google Cloud SDK for Windows
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# Simple validation gcloud, gsutil, and bq command line tools
|
||||||
|
$validateTools = @("bq", "gcloud", "gsutil")
|
||||||
|
foreach($tool in $validateTools)
|
||||||
|
{
|
||||||
|
if (Get-Command -Name $tool)
|
||||||
|
{
|
||||||
|
Write-Host "$tool on path"
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Write-Host "$tool is not on path"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -101,7 +101,8 @@ $markdown += New-MDList -Style Unordered -Lines @(
|
|||||||
(Get-AWSSAMVersion),
|
(Get-AWSSAMVersion),
|
||||||
(Get-AlibabaCLIVersion),
|
(Get-AlibabaCLIVersion),
|
||||||
(Get-CloudFoundryVersion),
|
(Get-CloudFoundryVersion),
|
||||||
(Get-HubVersion)
|
(Get-HubVersion),
|
||||||
|
(Get-GoogleCloudSDKVersion)
|
||||||
)
|
)
|
||||||
|
|
||||||
$markdown += New-MDHeader "Browsers and webdrivers" -Level 3
|
$markdown += New-MDHeader "Browsers and webdrivers" -Level 3
|
||||||
|
|||||||
@@ -202,4 +202,8 @@ function Get-StackVersion {
|
|||||||
((stack --version --quiet) | Out-String) -match "Version (?<version>\d+\.\d+\.\d+)," | Out-Null
|
((stack --version --quiet) | Out-String) -match "Version (?<version>\d+\.\d+\.\d+)," | Out-Null
|
||||||
$stackVersion = $Matches.Version
|
$stackVersion = $Matches.Version
|
||||||
return "Stack $stackVersion"
|
return "Stack $stackVersion"
|
||||||
|
}
|
||||||
|
|
||||||
|
function Get-GoogleCloudSDKVersion {
|
||||||
|
(gcloud --version) -match "Google Cloud SDK"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user