Skip to content

Commit

Permalink
fix: apply windows-update provisioner multiple times to avoid edge ca…
Browse files Browse the repository at this point in the history
…ses as per rgl/packer-plugin-windows-update#90

Signed-off-by: Damien Duportal <[email protected]>
  • Loading branch information
dduportal committed Sep 17, 2021
1 parent 1eb7a22 commit 6d8c573
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions jenkins-agent.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -244,17 +244,16 @@ build {
async_resourcegroup_delete = true # Faster builds, but no deletion error reporting
}

provisioner "windows-update" {
max_retries = 3 # Fight against flaky Windows Updates
}

provisioner "windows-restart" {
max_retries = 3 # Fight against flaky Windows Updates
}
## Why repeating? https://github.com/rgl/packer-plugin-windows-update/issues/90#issuecomment-842569865
# Note that restarts are only done when required by windows updates
provisioner "windows-update" { pause_before = "1m" }
provisioner "windows-update" { pause_before = "1m" }
provisioner "windows-update" { pause_before = "1m" }

provisioner "file" {
source = "./scripts/addSSHPubKey.ps1"
destination = "C:/"
pause_before = "1m"
source = "./scripts/addSSHPubKey.ps1"
destination = "C:/"
}

provisioner "powershell" {
Expand Down

0 comments on commit 6d8c573

Please sign in to comment.