Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostProcessor does not respect PackerConfig.PackerForce #10536

Closed
tduffield opened this issue Jan 29, 2021 · 3 comments · Fixed by #10571
Closed

PostProcessor does not respect PackerConfig.PackerForce #10536

tduffield opened this issue Jan 29, 2021 · 3 comments · Fixed by #10571

Comments

@tduffield
Copy link

tduffield commented Jan 29, 2021

Overview of the Issue

I am working on adding a post-processor to a custom plugin that works with Veertu Anka. The custom plugin contains a builder (to build the VM) and a post-processor (to upload the VM to a registry) The issue I'm running into is that while the builder config seems to respect the -force flag, the post-processor does not.

Reproduction Steps

  1. Install Anka Develop
  2. Install packer 1.7 nightly
  3. Build/install the 089a00b87a5f23cf271c098e6bbe73d555aa9a9e commit of the packer-builder-veertu-anka plugin.
  4. Execute build with PACKER_LOG=1

Packer version

1.7.0-dev [go1.15.7 darwin amd64]

Simplified Packer Buildfile

source "veertu-anka-vm" "core-10_15" {
  vm_name = "10.15-core"
  installer_app = "/Applications/Install macOS Catalina.app"
}

build {
  name = "core"

  sources = [
    "source.veertu-anka-vm.core-10_15",
  ]

  post-processor "veertu-anka-registry" {
    tag = "latest"
  }
}

Operating system and Environment details

Running on MacOS 10.5.7.

Log Fragments and crash.log files

Full Gist Output

You'll notice that I output the Config value twice: once for the builder and again for the post-processor.

@tduffield tduffield added the bug label Jan 29, 2021
@nywilken
Copy link
Contributor

Hi there @tduffield thanks for reaching out. We're excited to hear about the custom builder you are working on. We just updated issue #8610 pertaining to an improve plugin experience we are working on for v1.7.0 that will be helpful to you #8610 (comment)

Regarding your original issue around the force flag not being honored by your Post-Processor. I need to dive a little deeper to see if we have support for the force flag in HCL2 for provisioners and post-processors. As a quick glance it seems like we might be missing it.

If you run your build using a JSON configuration does the post-processor honor the force flag?

@tduffield
Copy link
Author

@nywilken Thanks for the reference to that issue; I'll have to check it out.

I was able to confirm that the post-processor does support the PackerForce flag when used with JSON configuration.

@ghost
Copy link

ghost commented Mar 8, 2021

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked as resolved and limited conversation to collaborators Mar 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants