Commit 749617f
committed
CI: use non-deprecated packer var for GCP creds
Hopefully this resolves:
```
+ rake build:gcp
config file contents: {"builders":[{"type":"googlecompute","account_file":"{\n \"type\": \"service_account\",\n \"project_id\": \"REDACTED\",\n \"private_key_id\": \"REDACTED\",\n \"private_key\": \"REDACTED",\n \"client_email\": \"REDACTED\",\n \"client_id\": \"REDACTED\",\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n \"token_uri\": \"https://oauth2.googleapis.com/token\",\n \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n \"client_x509_cert_url\": \"REDACTED\"\n}","project_id":"REDACTED","tags":["winrm"],"source_image":"windows-server-2019-dc-core-v20241212","image_family":"windows-2019-core","zone":"us-east1-c","disk_size":32,"image_name":"packer-1735069447","machine_type":"n1-standard-4","omit_external_ip":false,"communicator":"winrm","winrm_username":"winrmuser","winrm_use_ssl":false,"winrm_timeout":"1h","state_timeout":"10m","metadata":{"sysprep-specialize-script-url":"https://raw.githubusercontent.com/cloudfoundry/bosh-windows-stemcell-builder/master/scripts/gcp/setup-winrm.ps1","name":"REDACTED"}}],"provisioners":[{"type":"file","source":"build/bosh-psmodules.zip","destination":"C:\\provision\\bosh-psmodules.zip","pause_before":"60s"},{"type":"file","source":"scripts/install-bosh-psmodules.ps1","destination":"C:\\provision\\install-bosh-psmodules.ps1","pause_before":"60s"},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","C:\\provision\\install-bosh-psmodules.ps1"],"pause_before":"60s"},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","New-Provisioner"]},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Remove-DockerPackage"]},{"type":"windows-restart","restart_timeout":"1h","check_registry":true},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Install-CFFeatures2016"]},{"type":"windows-restart","restart_timeout":"1h","check_registry":true},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Add-Account -User Provisioner -Password bbd102986fd686362af0!"]},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Register-WindowsUpdatesTask"]},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Wait-WindowsUpdates -Password bbd102986fd686362af0! -User Provisioner"]},{"type":"windows-restart","restart_timeout":"12h","check_registry":true},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Unregister-WindowsUpdatesTask"]},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Get-HotFix > hotfixes.log"]},{"type":"file","source":"hotfixes.log","destination":"hotfixes.log","direction":"download"},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Remove-Account -User Provisioner"]},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Protect-CFCell"]},{"type":"file","source":"../sshd/OpenSSH-Win64.zip","destination":"C:\\provision\\OpenSSH-Win64.zip"},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Install-SSHD -SSHZipFile 'C:\\provision\\OpenSSH-Win64.zip'"]},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Enable-SSHD"]},{"type":"file","source":"../lgpo-binary/LGPO_30/LGPO.exe","destination":"C:\\windows\\LGPO.exe"},{"type":"file","source":"build/agent.zip","destination":"C:\\provision\\agent.zip"},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Install-Agent -IaaS gcp -agentZipPath 'C:\\provision\\agent.zip' -EnableEphemeralDiskMounting"]},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","New-VersionFile -Version '2019.82.2-build.3'"]},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Disable-RC4"]},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Disable-TLS1"]},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Disable-TLS11"]},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Enable-TLS12"]},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Disable-3DES"]},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Get-WUCerts"]},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Remove-SSHKeys"]},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Clear-Provisioner"]},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Set-InternetExplorerRegistries"]},{"type":"powershell","inline":["$ErrorActionPreference = \"Stop\";","trap { $host.SetShouldExit(1) }","Invoke-Sysprep -IaaS gcp"]}]}
packer build -machine-readable /tmp/20241224-335-rjni8r
1735069450,,ui,say,Warning: Warning when preparing build: "googlecompute"\n\naccount_file is deprecated%!(PACKER_COMMA) please use either credentials_json or\ncredentials_file instead\n\n
```1 parent 04048ff commit 749617f
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
0 commit comments