Updating Pipeline Code - Advice request

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

Updating Pipeline Code - Advice request

Richard Bywater-2
Hi

I'm currently maintaining the HTML publisher plugin ( https://github.com/jenkinsci/htmlpublisher-plugin ) but unfortunately I'm not really up-to-speed on coding plugins for pipelines just yet. 

Whilst looking at a recent question regarding HTML Publisher & Pipelines, I came across the fact that AbstractStepImpl was being used by HTML Publisher but perhaps this is an old deprecated approach which isn't used anymore.

I took a look at https://github.com/jenkinsci/workflow-step-api-plugin#creating-a-basic-synchronous-step and figured that the new way was fairly different.

So, looking for advice as to whether I should be considering updating the code to use the new way of working or whether it's fine to keep with the existing implementation (I guess knowing what I'm missing out on my not updating would be useful).

Thanks
Richard.

--
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/CAMui944Xw1aApRyoORYAuG5ttYkxLB0Bda5-6HKcgmEt4ZRRYg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Updating Pipeline Code - Advice request

slide

I've found that the easiest entry to pipeline is implementing SimpleBuildStep and overriding the perform method that doesn't has a void return. You'll have to make sure you change things to use Run<?,?> Instead of something like AbstractBuild. If you haven't already, it would be beneficial to add a dependency on the structs plugin and add an @Symbol annotation to your descriptor. I'd be willing to help out if you need it.


On Sat, Sep 9, 2017, 00:32 Richard Bywater <[hidden email]> wrote:
Hi

I'm currently maintaining the HTML publisher plugin ( https://github.com/jenkinsci/htmlpublisher-plugin ) but unfortunately I'm not really up-to-speed on coding plugins for pipelines just yet. 

Whilst looking at a recent question regarding HTML Publisher & Pipelines, I came across the fact that AbstractStepImpl was being used by HTML Publisher but perhaps this is an old deprecated approach which isn't used anymore.

I took a look at https://github.com/jenkinsci/workflow-step-api-plugin#creating-a-basic-synchronous-step and figured that the new way was fairly different.

So, looking for advice as to whether I should be considering updating the code to use the new way of working or whether it's fine to keep with the existing implementation (I guess knowing what I'm missing out on my not updating would be useful).

Thanks
Richard.

--
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/CAMui944Xw1aApRyoORYAuG5ttYkxLB0Bda5-6HKcgmEt4ZRRYg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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/CAPiUgVczTVPQxH_CMW6p%3D-NpLpDDevbzn7zfbSeSYUQPXqv8Ng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Updating Pipeline Code - Advice request

Mark Waite-2
In case a simple reference case is useful, you're welcome to refer to the hello-world implementation that I extended with pipeline for Jenkins World 2017 [1].  It took a while to learn how to write the tests for it [2].


On Sat, Sep 9, 2017 at 11:08 AM Slide <[hidden email]> wrote:

I've found that the easiest entry to pipeline is implementing SimpleBuildStep and overriding the perform method that doesn't has a void return. You'll have to make sure you change things to use Run<?,?> Instead of something like AbstractBuild. If you haven't already, it would be beneficial to add a dependency on the structs plugin and add an @Symbol annotation to your descriptor. I'd be willing to help out if you need it.


On Sat, Sep 9, 2017, 00:32 Richard Bywater <[hidden email]> wrote:
Hi

I'm currently maintaining the HTML publisher plugin ( https://github.com/jenkinsci/htmlpublisher-plugin ) but unfortunately I'm not really up-to-speed on coding plugins for pipelines just yet. 

Whilst looking at a recent question regarding HTML Publisher & Pipelines, I came across the fact that AbstractStepImpl was being used by HTML Publisher but perhaps this is an old deprecated approach which isn't used anymore.

I took a look at https://github.com/jenkinsci/workflow-step-api-plugin#creating-a-basic-synchronous-step and figured that the new way was fairly different.

So, looking for advice as to whether I should be considering updating the code to use the new way of working or whether it's fine to keep with the existing implementation (I guess knowing what I'm missing out on my not updating would be useful).

Thanks
Richard.

--
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/CAMui944Xw1aApRyoORYAuG5ttYkxLB0Bda5-6HKcgmEt4ZRRYg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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/CAPiUgVczTVPQxH_CMW6p%3D-NpLpDDevbzn7zfbSeSYUQPXqv8Ng%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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/CAO49JtH%3D3Ca2ZuWwN7t1Da5pBHUreY8PfKXPArXBsP-W651YLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Updating Pipeline Code - Advice request

Jesse Glick-4
In reply to this post by Richard Bywater-2
On Sat, Sep 9, 2017 at 3:31 AM, Richard Bywater <[hidden email]> wrote:
> Whilst looking at a recent question regarding HTML Publisher & Pipelines, I
> came across the fact that AbstractStepImpl was being used by HTML Publisher
> but perhaps this is an old deprecated approach which isn't used anymore.

`AbstractStepImpl` continues to work. Migrating to the recommended
APIs is optional, though it should result in simpler and more
transparent code.

--
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/CANfRfr3u-v2uXCHmN0BYUyv6RDX0GEoro94b_TDnkBfWO%2B1z-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.