Skip to content

Commit

Permalink
Fix #17
Browse files Browse the repository at this point in the history
  • Loading branch information
simaotwx committed Aug 14, 2024
1 parent e51dc67 commit 5a1a3b8
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
22 changes: 22 additions & 0 deletions examples/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ resource "packer_image" "image2" {
resource "packer_image" "plugins_test" {
file = "tests/plugins.pkr.hcl"
force = true
triggers = {
packer_version = data.packer_version.version.version
}
}

data "packer_files" "plugins" {
Expand All @@ -84,6 +87,25 @@ data "packer_files" "plugins" {
resource "packer_image" "plugins_dir_test" {
directory = "tests/plugins"
force = true
environment = {
PACKER_LOG = "1"
PACKER_LOG_PATH = "/tmp/test-plugins-dir-packer.log"
}
triggers = {
packer_version = data.packer_version.version.version
}
}

resource "packer_image" "log_output_test_17" {
file = "tests/17_log_output.pkr.hcl"
force = true
environment = {
PACKER_LOG = "1"
PACKER_LOG_PATH = "/tmp/test-17-packer.log"
}
triggers = {
packer_version = data.packer_version.version.version
}
}

output "packer_version" {
Expand Down
8 changes: 8 additions & 0 deletions examples/tests/17_log_output.pkr.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
source "file" "example" {
content = ""
target = "/dev/null"
}

build {
sources = ["sources.file.example"]
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/hashicorp/packer v1.10.0 => github.com/toowoxx/packer v1.10.0-toowoxx.custom.101
replace github.com/hashicorp/packer v1.10.0 => github.com/toowoxx/packer v1.10.0-toowoxx.custom.103

// see https://github.com/cirruslabs/packer-plugin-tart/pull/54
// go-cty removed support for gob which is the wire protocol between packer and
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,10 @@ github.com/toowoxx/go-lib-userspace-common v0.12.1 h1:0HqrigUVulBLqwcEUudKrxOXvO
github.com/toowoxx/go-lib-userspace-common v0.12.1/go.mod h1:xtrffFHlk7/H675YsYW8jkCyYwFrtMB1JzjvX9Y/hjE=
github.com/toowoxx/packer v1.10.0-toowoxx.custom.101 h1:uhA7NXH7kpqOP5D6p/i9IF6Iz/GLElwArbzoyWgss/w=
github.com/toowoxx/packer v1.10.0-toowoxx.custom.101/go.mod h1:qrcVKtOwfXnsTCqSWjJpdHizFF3bak0cDq8SQHUiE+8=
github.com/toowoxx/packer v1.10.0-toowoxx.custom.102 h1:5ocNuq/rqjR8a43wrRs+OkZLacJqSt+VhYqdxixnwi0=
github.com/toowoxx/packer v1.10.0-toowoxx.custom.102/go.mod h1:qrcVKtOwfXnsTCqSWjJpdHizFF3bak0cDq8SQHUiE+8=
github.com/toowoxx/packer v1.10.0-toowoxx.custom.103 h1:WVIKKSrnMzA1RXNr0JsYTcf4kl5yZe5YlUesOFAmZ8I=
github.com/toowoxx/packer v1.10.0-toowoxx.custom.103/go.mod h1:qrcVKtOwfXnsTCqSWjJpdHizFF3bak0cDq8SQHUiE+8=
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0=
github.com/ugorji/go/codec v1.2.6 h1:7kbGefxLoDBuYXOms4yD7223OpNMMPNPZxXk5TvFcyQ=
Expand Down

0 comments on commit 5a1a3b8

Please sign in to comment.