Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up[JENKINS-34561] Support for configuring the Jenkinsfile location/name #44
Conversation
|
IIRC there is already a plugin that does something much like this; would prefer to keep this plugin simple and add extended behaviors there. |
kuhnroyal
commented
Dec 16, 2016
|
I basically have a similar patch in use currently, if there is another plugin that can intgerate here I have not found it. Would be nice though. |
leewinder
commented
Dec 21, 2016
|
What's the expectation of getting this pull request merged in? The other plug-in (with defaults) doesn't really perform the same behaviour, it simply allows you to specify another (and only one other) file which could be used. It doesn't allow us to define different names and paths for the Jenkinsfile in branch builds. Adds a significant and powerful element to this plug-in. |
…ugin # Conflicts: # src/main/java/org/jenkinsci/plugins/workflow/multibranch/WorkflowBranchProjectFactory.java Conflict fixed into refactor
|
Lee's mirrored my thoughts too. I'm not seeing how this PR slots in with the functionality of multibranch-defaults. |
kuhnroyal
commented
Dec 21, 2016
|
I have to agree, the multibranch-defaults-plugin doesn't solve my problems. |
|
So is there anything that prevents merging this PR? |
leewinder
commented
Jan 10, 2017
|
For those needing this, I built @dbut023's repo so I could use the config option. Just download and unzip the above hpi file, and upload it to Jenkins manually. Make sure you've installed the official version first as manually uploading it won't sort out the dependancies. I added a stupid verison number (100.0.0) so updates to the official release won't override it, but obviously there's no fixes going into that if new official release are done without this pull request being merged in... |
y3ti
commented
Jan 12, 2017
|
Other arguments for merge this patch:
|
crummy
commented
Jan 13, 2017
|
This is a very useful feature for monorepos. Hoping to see it merged. |
matejsp
commented
Jan 16, 2017
|
Is there any reason for this to not be merged? |
psufoxman
commented
Jan 20, 2017
|
I will add my vote as well to have this merged. Would like to have this on the open source. |
teramawi
commented
Jan 27, 2017
|
Voted for this pull request as I am feeling quite limited in multibranch pipeline usage. Currently I'm using a workaround as mentioned in the manual loading documentation but with the pipeline model definition coming up this workaround does no longer work. One cannot use the groovy dsl to load another Jenkinsfile and use the model definition dsl there. |
malinoff
commented
Jan 27, 2017
|
I can describe an other use-case: I'd like to keep my project root simple and clean, all dirty ops-related stuff goes into |
dedalusj
commented
Feb 20, 2017
|
Any chance this pull request is going to be merged? There have been a few use cases already outlined in the comments. |
konetzed
commented
Feb 24, 2017
•
|
Is there anyway with this add on to have jenkins create multiple jobs based off a directory structure like below
Where each dir would have its own Jenkinsfile but the branch would still be just master? If not does someone know a better way of doing that? |
ajohnstone
commented
Feb 25, 2017
|
@konetzed that would be awesome, this is one of the larger issues I have with using jenkinsfiles. A single repo needing multiple jobs. I think you can generate new jobs from a jenkinsfile. |
zloylos
commented
Mar 3, 2017
|
This is very important and useful feature for many people. |
|
Concept is fine but the implementation is all wrong, I am afraid. I would need to rewrite from scratch. |
| } | ||
| }; | ||
| @DataBoundConstructor public WorkflowBranchProjectFactory() { | ||
| super(SCRIPT); |
This comment has been minimized.
This comment has been minimized.
| } | ||
|
|
||
| @Extension public static class DescriptorImpl extends MultiBranchProjectDescriptor implements IconSpec { | ||
|
|
||
| @DataBoundConstructor public DescriptorImpl(){ |
This comment has been minimized.
This comment has been minimized.
|
|
||
| public DescriptorImpl(){} | ||
|
|
||
| @DataBoundConstructor public DescriptorImpl(AbstractWorkflowBranchProjectFactory factory){ |
This comment has been minimized.
This comment has been minimized.
| @@ -56,20 +57,27 @@ | |||
|
|
|||
| private static final Logger LOGGER = Logger.getLogger(WorkflowMultiBranchProject.class.getName()); | |||
|
|
|||
| public WorkflowMultiBranchProject(ItemGroup parent, String name) { | |||
| @DataBoundConstructor | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
marvinthepa
Mar 10, 2017
Hello @jglick: would it be possible to elaborate on how it should be handled instead?
|
Closing this PR in preference to PR#59 |
dbut023 commentedDec 15, 2016
Adds support to configure the location and name of the Jenkinsfile.
I've tested it with both different file names and sticking Jenkinsfile in a subfolder; my test-multibranch repo shows the test scenarios.
One thing I haven't got working is have the descriptor in SCMBinder return the configured script path as part of its display name.