On Tue, Feb 13, 2018 at 7:56 AM, Reinhold Füreder <r.fuere...@xortex.com>
wrote:

> Hi aps,
>
>
>
> Just in case the problem is still there and to avoid a misunderstanding:
>
>
>
> Based on (a) Victor’s hint “tr[y] with the docker.inside syntax […] It
> might give you the chance to debug it somehow.” and (b) your own comment
> “I'm really surprised you can't pause the build”:
>
>
>
> docker.image(…).inside(…) {
>
>   sh ‘<some shell command that shows kind of debug output>’
>
>
>
>   // And now “workaround” to pause the build to allow connecting to the
> still running Docker container:
>
>   input(message: "Continue?")
>
> }
>
>
>
> Due to the “input” step the pipeline is then pausing and allows you to
> e.g.:
>
>
>
> ...@jenkins:...$ docker ps -a
>
> CONTAINER ID        IMAGE               COMMAND
> CREATED             STATUS              PORTS               NAMES
>
> 51c00502c727        acme/...:5    "cat"               20 seconds ago
> Up 20 seconds                           zealous_thompson
>
> ...@jenkins:...$ docker exec -it 51c00502c727 /bin/bash
>
> jenkins@51c00502c727:<jenkins workspace>$ # Now you are in the running
> Docker container…
>
>
>
> HTH Reinhold
>
>
>

Thanks! That is a neat idea. A bit of a hack, but definitely does the
trick. I actually wound up exec'ing into the container as the pipeline was
running.

-aps

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAPpy_fHMhuJ94zUh3Wc6BQEMW5LVb-jPjh05XCbON_cJr_1PBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to