This repository has been archived by the owner on Feb 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ac4050
commit 6d11316
Showing
3 changed files
with
154 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# escape=` | ||
|
||
FROM octopuslabs/workertools:latest-windows.2022 | ||
SHELL ["powershell", "-Command"] | ||
|
||
ARG GOOGLE_CLOUD_CLI_VERSION=433.0.0 | ||
|
||
# Install Terraform | ||
RUN choco install terraform -y --no-progress | ||
|
||
# Install gcloud | ||
RUN $GCLOUD_VERSION = $env:GOOGLE_CLOUD_CLI_VERSION; ` | ||
Write-Host "GCLOUD_VERSION: ${env:GOOGLE_CLOUD_CLI_VERSION}"; ` | ||
Write-Host "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${env:GOOGLE_CLOUD_CLI_VERSION}-windows-x86_64.zip"; ` | ||
Invoke-WebRequest "https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${env:GOOGLE_CLOUD_CLI_VERSION}-windows-x86_64.zip" -OutFile google-cloud-sdk-$env:GOOGLE_CLOUD_CLI_VERSION-windows-x86_64.zip; ` | ||
& '.\Program Files\7-Zip\7z.exe' x .\google-cloud-sdk-$env:GOOGLE_CLOUD_CLI_VERSION-windows-x86_64.zip; ` | ||
.\google-cloud-sdk\install.bat --quiet; ` | ||
rm .\google-cloud-sdk-$env:GOOGLE_CLOUD_CLI_VERSION-windows-x86_64.zip | ||
|
||
# Update Path | ||
RUN $old = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name path).path; ` | ||
Write-Host $old; ` | ||
$gcloudPath = ';C:\google-cloud-sdk\bin'; ` | ||
$new = $old + $gcloudPath; ` | ||
Write-Host $new; ` | ||
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name path -Value $new; ` | ||
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1; ` | ||
refreshenv |