packer-cn/command/test-fixtures/validate/validate_except.pkr.hcl
Adrien Delorme c7b35dd6bc
HCL2: add post-processors block to run multiple post-processor after a build (#9638)
added `post-processors` block to run chained post-processors after a build.
Before this, defining multiple `post-processor` blocks after
provisioning steps would run them sequentially, now doing this makes them start
from the build's artifact. To queue post-processors you now have to define them
in a `post-processors` block.

This is a breaking change.
2020-07-28 10:02:37 +02:00

31 lines
507 B
HCL

source "file" "chocolate" {
content = "chocolate"
target = "chocolate.txt"
}
source "file" "vanilla" {
content = "vanilla"
}
build {
sources = [
"source.file.chocolate",
"source.file.vanilla"
]
post-processors {
post-processor "shell-local" {
name = "apple"
inline = [ "echo apple 'apple'" ]
}
post-processor "shell-local" {
name = "pear"
inline = [ "echo apple 'pear'" ]
}
post-processor "shell-local" {
name = "banana"
}
}
}