Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to avoid checkout of sources on master node with jenkins pipeline

Tags:

git

jenkins

I want to define my builds using the Jenkins 2 pipeline feature and I want this configuration to be loaded from sources in a Jenkinsfile. However I don't want to clutter my master node with workspace.

Ideally, I could specify that a pipeline job is meant to be run a given node type but that doesn't seems possible.

I see 2 alternatives:

  • use a dedicated repository where the jenkins job configuration is stored.
  • use a cleaver git checkout strategy (shallow + sparse).

Did I miss something? What would be the best practice ?

like image 273
Manuel VACELET Avatar asked Jul 25 '16 15:07

Manuel VACELET


1 Answers

There's a Jenkins issue that claims this is now fixed, and only the Jenkinsfile itself needs to be checked out on the master: https://issues.jenkins-ci.org/browse/JENKINS-33273

(It isn't working for me at the moment though.)

like image 163
armb Avatar answered Sep 30 '22 19:09

armb