sh
steps inside that container. The workspace is mounted read-write into the container.
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/a851cbd9-364c-4ce8-bd22-a972debce310%40googlegroups.com.
for debugging,why not put some more echo/ls commands to check if the file you are looking is there or not from the container.
The documentation says:Takes an image ID or symbolic name which must already have been pulled locally and starts a container based on that image. Runs all nestedsh
steps inside that container. The workspace is mounted read-write into the container.Did you checked if the workspace have the file?A really brut way, if you want to really shell into the container, might be to docker run the same image, in the workspace mnaually and try to trigger the steps manually. Else, use try and catch to not keep the container enaged even if the main execution fails.
--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPpy_fGNZ90Wa9nOx6n3h2m6N0bsvpCjHhaH0vqdyaHVcM3SBQ%40mail.gmail.com.
Just an idea, you have tried with the docker.inside syntax? (https://jenkins.io/doc/book/pipeline/docker/#running-sidecar-containers) It might give you the chance to debug it somehow.
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