Global Pipeline Libraries support for p4-plugin

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Global Pipeline Libraries support for p4-plugin

Paul Allen
Hi Guys,

Please can you point me to where I would need to implement support for 'Global Pipeline Libraries' for the p4-plugin. Currently only 'Retrieval method' of 'Legacy SCM' is available.

If it was part of the scm-api implementation then I must have overlooked the extension point.

Kind regards,
Paul

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/8e82bc9d-e011-49dc-b41c-337fd05cbe60%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Global Pipeline Libraries support for p4-plugin

Jesse Glick-4
On Fri, Aug 18, 2017 at 11:50 AM, pallen <[hidden email]> wrote:
> Please can you point me to where I would need to implement support for
> 'Global Pipeline Libraries' for the p4-plugin. Currently only 'Retrieval
> method' of 'Legacy SCM' is available.

http://javadoc.jenkins.io/scm-api/jenkins/scm/api/SCMSource.html#retrieve-java.lang.String-hudson.model.TaskListener-

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2cgHnKH5g4v_A7k12Pto7Sg30cb4N1VYJn-i27UQZxYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Global Pipeline Libraries support for p4-plugin

Paul Allen
Thank you :-)

I had implemented SCMSource for MultiBranch, but only the retrieve method for observer (2.0).  I can't find any 2.0 methods in the documentation link you sent - is this out-of-date?

Think I found the method in the source...
/**
* SPI: Looks up a specific revision based on some SCM-specific set of permissible syntaxes.
* The default implementation uses {@link #retrieve(SCMSourceCriteria, SCMHeadObserver, TaskListener)}
* and looks for {@link SCMHead#getName} matching the argument (so typically only supporting branch names).
* @param thingName might be a branch name, a tag name, a cryptographic hash, a revision number, etc.
* @param listener the task listener
* @return a valid revision object corresponding to the argument, with a usable corresponding head, or null if malformed or not found
* @throws IOException if an error occurs while performing the operation.
* @throws InterruptedException if any thread has interrupted the current thread.
* @since 1.3
*/
@CheckForNull
protected SCMRevision retrieve(@NonNull final String thingName, @NonNull TaskListener listener)
throws IOException, InterruptedException {
SCMHeadObserver.Named baptist = SCMHeadObserver.named(thingName);
_retrieve(null, baptist, null, listener);
return baptist.result();
}

The Implementation guide has no reference to this older 1.3 method:



Should I override the method or has the API moved on and replaced this with a 2.x implementation?

On 18 Aug 2017, at 16:52, Jesse Glick <[hidden email]> wrote:

On Fri, Aug 18, 2017 at 11:50 AM, pallen <[hidden email]> wrote:
Please can you point me to where I would need to implement support for
'Global Pipeline Libraries' for the p4-plugin. Currently only 'Retrieval
method' of 'Legacy SCM' is available.

http://javadoc.jenkins.io/scm-api/jenkins/scm/api/SCMSource.html#retrieve-java.lang.String-hudson.model.TaskListener-

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+[hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2cgHnKH5g4v_A7k12Pto7Sg30cb4N1VYJn-i27UQZxYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--------------------------------------------------------------------------------
Perforce Software UK Ltd is registered in England and Wales as company no.
3816019 at the following address: West Forest Gate,
Wellington Road, Wokingham,
RG40 2AT, UK
--------------------------------------------------------------------------------

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/1BC91928-2262-4814-B28B-8FBA6577D431%40perforce.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Global Pipeline Libraries support for p4-plugin

Jesse Glick-4
On Fri, Aug 18, 2017 at 12:28 PM, Paul Allen <[hidden email]> wrote:
> I can't find any 2.0 methods in the documentation link
> you sent - is this out-of-date?

Apparently. I do not know what process generated this Javadoc. You can
file a JIRA ticket in the INFRA project.

> The Implementation guide has no reference to this older 1.3 method:
>
> https://github.com/jenkinsci/scm-api-plugin/blob/master/docs/implementation.adoc

“Feel free” to file a PR mentioning it. This method is needed for
Pipeline libraries and might have other use cases as well.

> Should I override the method

Yes. (It is unrelated to 2.x changes.)

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3jqokVQ99Dp6-mTvWWDxq%3DHN6cmUKYhXXaAxCj4_8UGQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.