Jenkins pipeline with github organization folder, avoiding multiple checkouts

212 views
Skip to first unread message

Jordan Soet

unread,
Dec 22, 2016, 3:39:55 AM12/22/16
to Jenkins Users
I'm trying to set up Jenkins with the Github Organization Folder plugin but I'm finding that it's checking out our entire repository twice, once in the @script directory and once in the actual workspace directory. This is a problem for us because our repository is quite large (>1GB - it contains a number of large libraries and assets) and so this takes a while and uses up a lot of extra space if we want to have it building all our different branches.

Looking online, I found a couple other people had similar problems:
http://stackoverflow.com/questions/39452030/jenkins-pipeline-is-it-possible-to-avoid-multiple-checkout - this one suggests that using the Github Organization Folder plugin should solve the problem, but that's what I'm using and it's not.
https://groups.google.com/forum/#!topic/jenkinsci-users/y9cJbGX1C0k - this one doesn't have an answer
https://botbot.me/freenode/jenkins/2016-08-31/?page=4 - here it's suggested just to use the @script folder as your workspace folder, but apparently that won't work if we want to have separate slaves.

Anyway, particularly because of the first link where it suggests that using the Github Organization Folder plugin should fix this, I'm wondering if I just have something mis-configured? Should that plugin only be grabbing the Jenkinsfile?

David Karr

unread,
Dec 23, 2016, 5:14:27 PM12/23/16
to jenkins...@googlegroups.com
In my opinion, the overall problem here is trying to define the build
process in the same place as what you're building. I have always felt
that the Jenkinsfile and related scripting should be in a separate
repository from what you're building. If you simply accept this
approach, you will never have these problems again.

Note that it still makes sense to have your Maven or Gradle build
script in the same repository as what it's building. Developers need
to be able to build a codebase out of the box, but the CI environment
is different.
Reply all
Reply to author
Forward
0 new messages