Skip to content

Unable to get Powershell provisioner to cause packer fail #11198

@richardgavel

Description

@richardgavel

When filing a bug, please include the following headings if possible. Any
example text in this template can be deleted.

Overview of the Issue

I am trying to develop a docker build (windows container) + powershell provisioner HCL that deliberately fails as a simple example to understand why my more complex version of the same does not fail. However, I can't.

Reproduction Steps

source docker core_service {
  image             = "mcr.microsoft.com/windows/servercore:2004"
  windows_container = true
}

build {
  name    = "docker"
  sources = ["source.docker.core_service"]
  commit = true

  provisioner "powershell" {
    inline = ["exit 1"]
  }

Packer version

1.7.4

Log Fragments and crash.log files

https://gist.github.com/richardgavel/c272800fb5a55a120bb967ffde36054e

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions