Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jenkins pipeline running inside docker image just hangs

I have a very simple script to test running inside a docker container. The container starts and I can connect to the container.

node('docker') {
    docker.image('python:3').inside() {
        sh "python --version"
    }
}

In the end the job fails. Any ideas what is wrong?


Update 1:

I have added the environment variable to Jenkins and now see the following. Looks like some strange variables are passed to docker. Any idea how I can examine the command given in the sh?

[Pipeline] stage
[Pipeline] { (test)
[Pipeline] echo
I'm here
[Pipeline] sh
invalid argument "=" for "-e, --env" flag: invalid environment variable: =
See 'docker exec --help'.
process apparently never started in /var/lib/jenkins- 
slave/workspace/SYSTEM/clean-artifactory@tmp/durable-4d51de81
[Pipeline] }
[Pipeline] // stage
like image 798
uncletall Avatar asked Jul 19 '19 08:07

uncletall


Video Answer


1 Answers

This was a bug in the Durable Task plugin and has been fixed by the latest release (1.33).

See JENKINS-59903

like image 174
uncletall Avatar answered Oct 19 '22 14:10

uncletall