Thanks Megan. That’s got me closer, but it only leaves the VM. I want the
build container to pause, so I can debug from there if possible?

On Fri, 8 May 2020 at 17:36, Megan Marsh <[email protected]> wrote:

> I'd suggest just setting --on-error=abort; that will make Packer exit
> without cleaning up the container so that you can get onto it and start
> debugging.
>
> On Thu, May 7, 2020 at 7:57 AM Adam Rush <[email protected]> wrote:
>
>> Sure. For some context, I'm running Packer via a Jenkins pipeline, which
>> spins up an ephemeral container within a Kubernetes cluster.
>> As some builds can take an hour or more to run, I'd like Packer to pause
>> when an error occurs, then I can attach to the container and start
>> debugging the current environment.
>> This would greatly improve the dev process and make debugging much faster.
>>
>> I believe this doesnt currently work as I thought as the container doesnt
>> have a terminal attached, so I'm looking for possible solutions.
>>
>> On Thursday, 7 May 2020 15:50:08 UTC+1, Lesley Kimmel wrote:
>>>
>>> Can you describe more what you are trying to see and why you are unable
>>> to? I'm currently using Packer inside a CI pipeline. The pipeline itself
>>> usually gives me the Packer output at the end. I also found that, on the
>>> Packer server itself, Packer has a log (/tmp/packer-logXXXXXX) that
>>> contains all of it's normal CLI output. Packer logging is generally pretty
>>> clear on what any issues are.
>>>
>>> On Tuesday, May 5, 2020 at 12:24:41 PM UTC-5, Adam Rush wrote:
>>>>
>>>> I know we can use `-debug` and `-on-error=ask` when doing local Packer
>>>> builds, but they don't seem to work within a CI build pipeline (like
>>>> Jenkins).
>>>>
>>>> Has anyone else found a solution for debugging within a CI pipeline?
>>>>
>>> --
>> This mailing list is governed under the HashiCorp Community Guidelines -
>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>> violation of those guidelines may result in your removal from this mailing
>> list.
>>
>> GitHub Issues: https://github.com/mitchellh/packer/issues
>> IRC: #packer-tool on Freenode
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Packer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/packer-tool/ac67577c-7c3b-4c8e-875d-1991c7e987d2%40googlegroups.com
>> <https://groups.google.com/d/msgid/packer-tool/ac67577c-7c3b-4c8e-875d-1991c7e987d2%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Packer" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/packer-tool/iizE3UkXMgo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/CAGPV1upTK2s-supCyM4%3DNCpQqnN8181UW4-nQd4dS4Ca7hgaHQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/packer-tool/CAGPV1upTK2s-supCyM4%3DNCpQqnN8181UW4-nQd4dS4Ca7hgaHQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CABYej0-cX-c_ECXr4rneprzbR%2Bb9_QaXMtVXyt-5U%2BByHHS2mg%40mail.gmail.com.

Reply via email to