diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 7d28939cd..e4fef5d1c 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -158,7 +158,7 @@ $cliTools.AddToolVersion("AWS SAM CLI", $(Get-AWSSAMVersion)) $cliTools.AddToolVersion("Azure CLI", $(Get-AzureCliVersion)) $cliTools.AddToolVersion("Azure CLI (azure-devops)", $(Get-AzureDevopsVersion)) $cliTools.AddToolVersion("GitHub CLI", $(Get-GitHubCliVersion)) -$cliTools.AddToolVersion("Google Cloud SDK", $(Get-GoogleCloudSDKVersion)) +$cliTools.AddToolVersion("Google Cloud CLI", $(Get-GoogleCloudCLIVersion)) $cliTools.AddToolVersion("Hub CLI", $(Get-HubCliVersion)) $cliTools.AddToolVersion("Netlify CLI", $(Get-NetlifyCliVersion)) $cliTools.AddToolVersion("OpenShift CLI", $(Get-OCCliVersion)) diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index 9c07f38cc..594aeeb6b 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -109,7 +109,7 @@ function Get-GitFTPVersion { return $gitftpVersion } -function Get-GoogleCloudSDKVersion { +function Get-GoogleCloudCLIVersion { return (gcloud --version | Select-Object -First 1) | Take-OutputPart -Part 3 } diff --git a/images/linux/scripts/installers/google-cloud-sdk.sh b/images/linux/scripts/installers/google-cloud-cli.sh similarity index 79% rename from images/linux/scripts/installers/google-cloud-sdk.sh rename to images/linux/scripts/installers/google-cloud-cli.sh index 81b91925f..88708155f 100644 --- a/images/linux/scripts/installers/google-cloud-sdk.sh +++ b/images/linux/scripts/installers/google-cloud-cli.sh @@ -1,16 +1,16 @@ #!/bin/bash -e ################################################################################ -## File: google-cloud-sdk.sh -## Desc: Installs the Google Cloud SDK +## File: google-cloud-cli.sh +## Desc: Installs the Google Cloud CLI ################################################################################ REPO_URL="https://packages.cloud.google.com/apt" -# Install the Google Cloud SDK +# Install the Google Cloud CLI echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] $REPO_URL cloud-sdk main" > /etc/apt/sources.list.d/google-cloud-sdk.list wget -qO- https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor > /usr/share/keyrings/cloud.google.gpg apt-get update -y -apt-get install -y google-cloud-sdk +apt-get install -y google-cloud-cli # remove apt rm /etc/apt/sources.list.d/google-cloud-sdk.list @@ -19,4 +19,4 @@ rm /usr/share/keyrings/cloud.google.gpg # add repo to the apt-sources.txt echo "google-cloud-sdk $REPO_URL" >> $HELPER_SCRIPTS/apt-sources.txt -invoke_tests "CLI.Tools" "Google Cloud SDK" +invoke_tests "CLI.Tools" "Google Cloud CLI" diff --git a/images/linux/scripts/tests/CLI.Tools.Tests.ps1 b/images/linux/scripts/tests/CLI.Tools.Tests.ps1 index 5be4d67ea..2f6ecdfd5 100644 --- a/images/linux/scripts/tests/CLI.Tools.Tests.ps1 +++ b/images/linux/scripts/tests/CLI.Tools.Tests.ps1 @@ -41,8 +41,8 @@ Describe "GitHub CLI" { } } -Describe "Google Cloud SDK" { - It "Google Cloud SDK" { +Describe "Google Cloud CLI" { + It "Google Cloud CLI" { "gcloud --version" | Should -ReturnZeroExitCode } } diff --git a/images/linux/ubuntu2004.json b/images/linux/ubuntu2004.json index b9514c57a..5fc6d909f 100644 --- a/images/linux/ubuntu2004.json +++ b/images/linux/ubuntu2004.json @@ -218,7 +218,7 @@ "{{template_dir}}/scripts/installers/git.sh", "{{template_dir}}/scripts/installers/github-cli.sh", "{{template_dir}}/scripts/installers/google-chrome.sh", - "{{template_dir}}/scripts/installers/google-cloud-sdk.sh", + "{{template_dir}}/scripts/installers/google-cloud-cli.sh", "{{template_dir}}/scripts/installers/haskell.sh", "{{template_dir}}/scripts/installers/heroku.sh", "{{template_dir}}/scripts/installers/hhvm.sh", diff --git a/images/linux/ubuntu2204.pkr.hcl b/images/linux/ubuntu2204.pkr.hcl index 0001838c8..1f06f8212 100644 --- a/images/linux/ubuntu2204.pkr.hcl +++ b/images/linux/ubuntu2204.pkr.hcl @@ -301,7 +301,7 @@ build { "${path.root}/scripts/installers/git.sh", "${path.root}/scripts/installers/github-cli.sh", "${path.root}/scripts/installers/google-chrome.sh", - "${path.root}/scripts/installers/google-cloud-sdk.sh", + "${path.root}/scripts/installers/google-cloud-cli.sh", "${path.root}/scripts/installers/haskell.sh", "${path.root}/scripts/installers/heroku.sh", "${path.root}/scripts/installers/java-tools.sh", diff --git a/images/win/scripts/Installers/Install-GoogleCloudSDK.ps1 b/images/win/scripts/Installers/Install-GoogleCloudCLI.ps1 similarity index 57% rename from images/win/scripts/Installers/Install-GoogleCloudSDK.ps1 rename to images/win/scripts/Installers/Install-GoogleCloudCLI.ps1 index 03b9e8ddf..fdb0b4f7c 100644 --- a/images/win/scripts/Installers/Install-GoogleCloudSDK.ps1 +++ b/images/win/scripts/Installers/Install-GoogleCloudCLI.ps1 @@ -1,11 +1,11 @@ ################################################################################ -## File: Install-GoogleCloudSDK.ps1 -## Desc: Install Google Cloud SDK +## File: Install-GoogleCloudCLI.ps1 +## Desc: Install Google Cloud CLI ################################################################################ # https://cloud.google.com/sdk/docs/downloads-interactive -$googleCloudSDKInstaller = "https://dl.google.com/dl/cloudsdk/channels/rapid/GoogleCloudSDKInstaller.exe" +$googleCloudCLIInstaller = "https://dl.google.com/dl/cloudsdk/channels/rapid/GoogleCloudSDKInstaller.exe" $argumentList = @("/S", "/allusers", "/noreporting") -Install-Binary -Url $googleCloudSDKInstaller -Name "GoogleCloudSDKInstaller.exe" -ArgumentList $argumentList +Install-Binary -Url $googleCloudCLIInstaller -Name "GoogleCloudSDKInstaller.exe" -ArgumentList $argumentList -Invoke-PesterTests -TestFile "Tools" -TestName "GoogleCloudSDK" +Invoke-PesterTests -TestFile "Tools" -TestName "GoogleCloudCLI" diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 2f26df19d..f76a96a8d 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -78,7 +78,7 @@ $tools.AddToolVersion("ghc", $(Get-GHCVersion)) $tools.AddToolVersion("Git", $(Get-GitVersion)) $tools.AddToolVersion("Git LFS", $(Get-GitLFSVersion)) if (Test-IsWin19) { - $tools.AddToolVersion("Google Cloud SDK", $(Get-GoogleCloudSDKVersion)) + $tools.AddToolVersion("Google Cloud CLI", $(Get-GoogleCloudCLIVersion)) } $tools.AddToolVersion("ImageMagick", $(Get-ImageMagickVersion)) $tools.AddToolVersion("InnoSetup", $(Get-InnoSetupVersion)) diff --git a/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index 543c75536..4952e90e8 100644 --- a/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/win/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -262,7 +262,7 @@ function Get-StackVersion { return $stackVersion } -function Get-GoogleCloudSDKVersion { +function Get-GoogleCloudCLIVersion { return (((cmd /c "gcloud --version") -match "Google Cloud SDK") -replace "Google Cloud SDK").Trim() } diff --git a/images/win/scripts/Tests/Tools.Tests.ps1 b/images/win/scripts/Tests/Tools.Tests.ps1 index 26675fed5..80dbfbea7 100644 --- a/images/win/scripts/Tests/Tools.Tests.ps1 +++ b/images/win/scripts/Tests/Tools.Tests.ps1 @@ -117,7 +117,7 @@ Describe "Mingw64" { } } -Describe "GoogleCloudSDK" -Skip:(Test-IsWin22) { +Describe "GoogleCloudCLI" -Skip:(Test-IsWin22) { It "" -TestCases @( @{ ToolName = "bq" } @{ ToolName = "gcloud" } diff --git a/images/win/windows2019.json b/images/win/windows2019.json index 48c95a21f..1cb5e2922 100644 --- a/images/win/windows2019.json +++ b/images/win/windows2019.json @@ -269,7 +269,7 @@ "{{ template_dir }}/scripts/Installers/Install-AliyunCli.ps1", "{{ template_dir }}/scripts/Installers/Install-RootCA.ps1", "{{ template_dir }}/scripts/Installers/Install-MongoDB.ps1", - "{{ template_dir }}/scripts/Installers/Install-GoogleCloudSDK.ps1", + "{{ template_dir }}/scripts/Installers/Install-GoogleCloudCLI.ps1", "{{ template_dir }}/scripts/Installers/Install-CodeQLBundle.ps1", "{{ template_dir }}/scripts/Installers/Install-BizTalkBuildComponent.ps1", "{{ template_dir }}/scripts/Installers/Disable-JITDebugger.ps1",