-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Cannot setup a pipeline #461
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please summarize in the commit message why it broke?
Should we raise the minimal supported version of Jenkins to avoid having a too large range?
…group_id=101) Cannot setup a pipeline using a Tuleap Branch Source Even if the `Tuleap` type can be selected in `Multibranch Pipeline` project type, it never properly worked whatever the Jenkins version. The implemented code did not take in account the fact that user can configure a `Tuleap` project in a `Multibranch Pipeline` project. During the first implementation of the plugin, the creation of `Mulitbranch Pipeline` projects was directly made by the "navigator" of `Tuleap Organization Folder` project and other cases was not taken in account. Now, users should now be able to create a new Tuleap multibranch project. No functional changes expected for Tuleap Organization project type It should works fine with the Jenkins version 2.361.4 and later
5647a2f
to
4ae353b
Compare
Done
No, it should be fine, finally the bug was not dependent of the Jenkins version |
public TuleapSCMSource(TuleapProject project, TuleapGitRepository repository) { | ||
this.repository = repository; | ||
this.project = project; | ||
this.projectId = String.valueOf(project.getId()); | ||
this.repositoryPath = repository.getPath(); | ||
} | ||
|
||
@DataBoundConstructor | ||
public TuleapSCMSource(String projectId, String repositoryPath) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is possible, I think it would be better if this constructor also populated this.project
and this.projectId
itself so that we are always sure of what we have.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already thought to do that, but I think this is not a good idea because of the DataBoundConstructor
, it does some automagic binding, and it may introduce some unwanted side effect which can be hard to debug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't the @DataBounConstructor
only taking into account the arguments of the constructior ie projectId
and repositoryPath
?
https://javadoc.jenkins.io/component/stapler/org/kohsuke/stapler/DataBoundConstructor.html
The matching is done by using the constructor parameter name
Or are your worried about something else that I don't see ? I haven't looked into this in quite a while...
Fixes request #33320 Cannot setup a pipeline using a Tuleap Branch Source
Users should now be able to create a new Tuleap multibranch project.
No functional changes expected for Tuleap Organization project type