Understanding the pipeline better

39 views
Skip to first unread message

ter...@gmail.com

unread,
Dec 2, 2016, 12:10:24 AM12/2/16
to Jenkins Users
I understand that the pipeline approach is the new modern approach when working with Jenkins.

I'm having a difficult time learning about how to use it exactly in the context of Python, Docker, Jenkins.

I've got Gradle, docker, Python to execute from within the pipeline window through proper installations of those products. So I am good there.

I got the docker plug in to work and it has a bunch of methods to do the various build, run, pull commands.

Here are some newbie questions. Apologies.

If I want to write most of my code in Python because I want cross compatibility with Windows, where would I store the Python script files so that the pipeline portal could access them?
Would they be part of the git repository when I do my pull in the scripts would become available and that manner?
Is Jenkins stateless such that I have to download everything I want to work with?

I would love to see an end to end tutorial that shows me how to trigger a docker build locally after code check in and then run unit tests on that locally built image using Python.
.
Any help is much appreciated.

Christoph Nenning

unread,
Dec 2, 2016, 3:04:13 AM12/2/16
to jenkins...@googlegroups.com
Hi,


> where would I store the Python script
> files so that the pipeline portal could access them?

> Would they be part of the git repository when I do my pull in the
> scripts would become available and that manner?


Yes, you put all of your code (including Jenkinsfile) in a git repository.


> Is Jenkins stateless such that I have to download everything I want
> to work with?


Your build jobs must checkout all the code your build needs. If you have just a single Jenkins instance it usually keeps the workspace so on next run the files are still present (this can be configured).


Note that Jenkins keeps track of repository URLs your build uses. If you checkout additonal SCM repositories in your Jenkinsfile, Jenkins will remember that.



Regards,
Christoph
>
> --
> 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-use...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/
> d/msgid/jenkinsci-users/6c08441c-20eb-4ae1-a6b9-b4c349a9fa2d%
> 40googlegroups.com.
> For more options, visit
https://groups.google.com/d/optout.


This Email was scanned by Sophos Anti Virus

ter...@gmail.com

unread,
Dec 2, 2016, 11:02:19 AM12/2/16
to Jenkins Users, Christop...@lex-com.net
Thanks, Christoph, for demystifying some of my gaps.
Reply all
Reply to author
Forward
0 new messages