Is there Python support for ci.jenkins.io plugin builds?

14 views
Skip to first unread message

Chris Kilding

unread,
May 15, 2019, 12:19:09 PM5/15/19
to jenkin...@googlegroups.com
My plugin uses an external dependency, Moto (the AWS mock server) for its integration tests.

Moto is written in Python, installed with Pip, in a virtualenv. It can be used either directly (where we must do the pip install ourselves) or through the Java wrapper Localstack (which does little more than run those same commands for us).

It appears that ci.jenkins.io agents have *some* kind of Python toolchain installed, but it’s limited: there is no ‘pip’ and maybe no ‘virtualenv’ either.

Do any other Jenkins plugins use Python or Python dependencies, and if so how are Python/Pip/Virtualenv set up in their builds?

R. Tyler Croy

unread,
May 15, 2019, 12:36:27 PM5/15/19
to jenkin...@googlegroups.com
(replies inline)

On Wed, 15 May 2019, Chris Kilding wrote:

> My plugin uses an external dependency, Moto (the AWS mock server) for its
> integration tests.
>
> Moto is written in Python, installed with Pip, in a virtualenv. It can be used
> either directly (where we must do the pip install ourselves) or through the
> Java wrapper Localstack (which does little more than run those same commands
> for us).
>
> It appears that ci.jenkins.io agents have *some* kind of Python toolchain
> installed, but it’s limited: there is no ‘pip’ and maybe no ‘virtualenv’
> either.
>
> Do any other Jenkins plugins use Python or Python dependencies, and if so how
> are Python/Pip/Virtualenv set up in their builds?


The fact that there is Python is incidental more than anything. We will not be
installing any system packages on agents however, so I suggest working out how
to use Docker containers to meet your needs, as those are definitely supported
on machines with the 'docker' label.

Cheers.

--
GitHub: https://github.com/rtyler

GPG Key ID: 0F2298A980EE31ACCA0A7825E5C92681BEF6CEA2

Chris Kilding

unread,
May 15, 2019, 12:55:20 PM5/15/19
to jenkin...@googlegroups.com
Yep, that sounds reasonable. (I had suspected as much - there would be no end to the possible system packages that plugin developers might want.)

Do the ‘docker’-labelled Jenkins agents support the usual ‘dockerfile’ directive to let the build define a Docker image ad-hoc? Or do all images have to be pre-packed and hosted on a registry?

Chris
-- 
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


R. Tyler Croy

unread,
May 15, 2019, 1:45:21 PM5/15/19
to jenkin...@googlegroups.com
(replies inline)

On Wed, 15 May 2019, Chris Kilding wrote:

> Yep, that sounds reasonable. (I had suspected as much - there would be no end
> to the possible system packages that plugin developers might want.)
>
> Do the ‘docker’-labelled Jenkins agents support the usual ‘dockerfile’
> directive to let the build define a Docker image ad-hoc? Or do all images have
> to be pre-packed and hosted on a registry?


The 'docker' labeled agents are all full VMs and the pipelines do have full
access to the Docker socket, so Dockerfiles should be fine.
signature.asc

Chris Kilding

unread,
May 16, 2019, 8:23:55 AM5/16/19
to jenkin...@googlegroups.com
I was able to substitute in the fabric8 Docker Maven Plugin to run Moto. It seems to work fine on the Linux build agent, but the Windows agent doesn’t like it (no Docker host or docker.sock available.)

Is there another way to get Docker support on the Windows agent, or is this ‘in the works’ for the future?

Chris
-- 
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Attachments:
  • signature.asc

R. Tyler Croy

unread,
May 16, 2019, 10:14:47 AM5/16/19
to jenkin...@googlegroups.com
(replies inline)

On Thu, 16 May 2019, Chris Kilding wrote:

> I was able to substitute in the fabric8 Docker Maven Plugin to run Moto. It
> seems to work fine on the Linux build agent, but the Windows agent doesn’t like
> it (no Docker host or docker.sock available.)
>
> Is there another way to get Docker support on the Windows agent, or is this ‘in
> the works’ for the future?


Neither unfortunately. There is an infrastructure ticket which I don't have any
plans to get to: https://issues.jenkins.io/browse/INFRA-1400
signature.asc

Joseph P

unread,
May 17, 2019, 10:05:15 AM5/17/19
to Jenkins Developers
We use testcontainers in JCasC with great success and we are able to run those tests on Windows (if only they weren't so unstable)

We use assumeTrue to disable tests when docker is not available.


On Thursday, May 16, 2019 at 2:23:55 PM UTC+2, Chris Kilding wrote:
I was able to substitute in the fabric8 Docker Maven Plugin to run Moto. It seems to work fine on the Linux build agent, but the Windows agent doesn’t like it (no Docker host or docker.sock available.)

Is there another way to get Docker support on the Windows agent, or is this ‘in the works’ for the future?

Chris

On Wed, 15 May 2019, at 6:45 PM, R. Tyler Croy wrote:
(replies inline)

On Wed, 15 May 2019, Chris Kilding wrote:

> Yep, that sounds reasonable. (I had suspected as much - there would be no end
> to the possible system packages that plugin developers might want.)

> Do the ‘docker’-labelled Jenkins agents support the usual ‘dockerfile’
> directive to let the build define a Docker image ad-hoc? Or do all images have
> to be pre-packed and hosted on a registry?


The 'docker' labeled agents are all full VMs and the pipelines do have full
access to the Docker socket, so Dockerfiles should be fine.



--

GPG Key ID: 0F2298A980EE31ACCA0A7825E5C92681BEF6CEA2

-- 
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkin...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages