Skip to content

Instantly share code, notes, and snippets.

@mrled
Last active April 3, 2017 16:46
Show Gist options
  • Save mrled/a6454b8432fc20b043ee70d64d6fd552 to your computer and use it in GitHub Desktop.
Save mrled/a6454b8432fc20b043ee70d64d6fd552 to your computer and use it in GitHub Desktop.
Supporting files for bug report https://github.com/mitchellh/packer/issues/4140 #bugreport
{
"variables": {
"testinputartifact": "C:\\Windows\\system32\\cmd.exe"
},
"builders": [
{
"type": "file",
"source": "{{user `testinputartifact`}}",
"target": "testing.box"
}
],
"post-processors": [
{
"type": "shell-local",
"execute_command": "Powershell.exe -File {{.Script}}",
"inline": ["write-output HIIIIIIIII"]
}
]
}
file output will be in this color.
==> file: Copying C:\Users\micah\Documents\WinTrialLab\testing_non.box to testing_win10_32_virtualbox.box
==> file: Copied 6570 bytes
==> file: Running post-processor: shell-local
==> file (shell-local): Post processing with local shell script: Powershell.exe -File C:\Users\micah\AppData\Local\Temp\packer-shell018534603
==> file (shell-local): Executing local script: C:\Users\micah\AppData\Local\Temp\packer-shell018534603
Build 'file' errored: 1 error(s) occurred:
* Post-processor failed: Error executing script: C:\Users\micah\AppData\Local\Temp\packer-shell018534603
Please see output above for more information.
==> Some builds didn't complete successfully and had errors:
--> file: 1 error(s) occurred:
* Post-processor failed: Error executing script: C:\Users\micah\AppData\Local\Temp\packer-shell018534603
Please see output above for more information.
==> Builds finished but no artifacts were created.
{
"variables": {
"testinputartifact": "C:\\Windows\\system32\\cmd.exe"
},
"builders": [
{
"type": "file",
"source": "{{user `testinputartifact`}}",
"target": "testing.box"
}
],
"post-processors": [
{
"type": "shell-local",
"execute_command": "C:\\Python35\\python.exe {{.Script}}",
"inline": ["print('HIIIIII')"]
}
]
}
file output will be in this color.
==> file: Copying C:\Users\micah\Documents\WinTrialLab\testing_non.box to testing_win10_32_virtualbox.box
==> file: Copied 6570 bytes
==> file: Running post-processor: shell-local
==> file (shell-local): Post processing with local shell script: C:\Python35\python.exe C:\Users\micah\AppData\Local\Temp\packer-shell346107183
==> file (shell-local): Executing local script: C:\Users\micah\AppData\Local\Temp\packer-shell346107183
Build 'file' errored: 1 error(s) occurred:
* Post-processor failed: Error executing script: C:\Users\micah\AppData\Local\Temp\packer-shell346107183
Please see output above for more information.
==> Some builds didn't complete successfully and had errors:
--> file: 1 error(s) occurred:
* Post-processor failed: Error executing script: C:\Users\micah\AppData\Local\Temp\packer-shell346107183
Please see output above for more information.
==> Builds finished but no artifacts were created.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment