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 [email protected]:
>
> 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.)
>
> docker.image("container.jfrog.io/build-images/python:11.4.2").inside() {
>
> sh(" pip install -r requirements.txt --extra-index-url
> https://[email protected]/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.
>
>
>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/a5c94eaf-23f1-4810-b174-b85b8c50838d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.