upgrade pause_before (#10654)
This commit is contained in:
parent
ab89df9a88
commit
37d05c85ff
|
@ -981,6 +981,9 @@ func writeProvisioner(typeName string, provisioner *template.Provisioner) []byte
|
||||||
if provisioner.Timeout > 0 {
|
if provisioner.Timeout > 0 {
|
||||||
cfg["timeout"] = provisioner.Timeout.String()
|
cfg["timeout"] = provisioner.Timeout.String()
|
||||||
}
|
}
|
||||||
|
if provisioner.PauseBefore > 0 {
|
||||||
|
cfg["pause_before"] = provisioner.PauseBefore.String()
|
||||||
|
}
|
||||||
body.AppendNewline()
|
body.AppendNewline()
|
||||||
jsonBodyToHCL2Body(block.Body(), cfg)
|
jsonBodyToHCL2Body(block.Body(), cfg)
|
||||||
return provisionerContent.Bytes()
|
return provisionerContent.Bytes()
|
||||||
|
|
|
@ -243,6 +243,7 @@ build {
|
||||||
provisioner "shell-local" {
|
provisioner "shell-local" {
|
||||||
inline = ["sleep 100000"]
|
inline = ["sleep 100000"]
|
||||||
only = ["amazon-ebs"]
|
only = ["amazon-ebs"]
|
||||||
|
pause_before = "5s"
|
||||||
timeout = "5s"
|
timeout = "5s"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -189,6 +189,7 @@
|
||||||
"amazon-ebs"
|
"amazon-ebs"
|
||||||
],
|
],
|
||||||
"timeout": "5s",
|
"timeout": "5s",
|
||||||
|
"pause_before": "5s",
|
||||||
"inline": [
|
"inline": [
|
||||||
"sleep 100000"
|
"sleep 100000"
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue