Pip not able to run inside container if using extra index

13 views
Skip to first unread message

bar...@bossanova.com

unread,
Dec 5, 2017, 9:53:24 PM12/5/17
to Jenkins Users
The following does not work while running inside a container from a scripted Jenkinsfile.  The operation simply hangs (or at least I should say I haven't waited long enough for it to timeout.)


                  sh(" pip install -r requirements.txt --extra-index-url https://scru...@company.jfrog.io/company/api/pypi/python/simple")

}

If I remove the extra-index-url then the operation completes. What is interesting is the first listing in my requirements.txt is not an artifact in my own private repo, but rather one in pypi. 

Running the command from the same image locally works, without issue.



Björn Pedersen

unread,
Dec 7, 2017, 9:16:44 AM12/7/17
to Jenkins Users
Hi,

there are two things to consider:

1) does the jenkins host allow access to  outside services?
2) Jenkins will run things in the container as user 'jenkins', not as root, which is the default if you are using "docker run".
    If you did not omit the virtualenv actviation for brevity here, pip will probably fail.

Am Mittwoch, 6. Dezember 2017 03:53:24 UTC+1 schrieb bar...@bossanova.com:
The following does not work while running inside a container from a scripted Jenkinsfile.  The operation simply hangs (or at least I should say I haven't waited long enough for it to timeout.)


                  sh(" pip install -r requirements.txt --extra-index-url https://scrubbed@company.jfrog.io/company/api/pypi/python/simple")
Reply all
Reply to author
Forward
0 new messages