Re: Can a nested Jelly config figure out whether it's in a Build or Post Build?

2017-09-18 Thread Jesse Glick
On Fri, Sep 15, 2017 at 5:55 PM, 'Alexandra Goultiaeva' via Jenkins Developers wrote: > I guess to make it backward compatible I could still keep the old field The developer docs includes a page on using `readResolve` and the like, incl. testing with `@LocalData`.

Re: Can a nested Jelly config figure out whether it's in a Build or Post Build?

2017-09-15 Thread 'Alexandra Goultiaeva' via Jenkins Developers
> > Make the common parts into a `Describable` with a `config.jelly`. > Include those into the `Builder` and the `Publisher` as a field bound > to `f:property`. Then the `Publisher`’s `config.jelly` would simply > have another entry with an `f:checkbox`. > That makes sense! That would mean

Re: Can a nested Jelly config figure out whether it's in a Build or Post Build?

2017-09-15 Thread Jesse Glick
On Thu, Sep 14, 2017 at 11:51 AM, 'Alexandra Goultiaeva' via Jenkins Developers wrote: > It has an option ("on failed build") which makes sense for Post-Build, but > not for Build Step. I wanted to make that option hidden for the Build Step > version but not for

Re: Can a nested Jelly config figure out whether it's in a Build or Post Build?

2017-09-15 Thread 'Alexandra Goultiaeva' via Jenkins Developers
> > Then make a separate `Builder` (which would be the more natural one to > mark as a `SimpleBuildStep` as well, if you have to choose). Obviously > most implementation can be shared via a utility class. > Thanks! This is exactly what I've tried to do in the code I've linked to at the

Re: Can a nested Jelly config figure out whether it's in a Build or Post Build?

2017-09-15 Thread Jesse Glick
On Fri, Sep 15, 2017 at 10:43 AM, 'Alexandra Goultiaeva' via Jenkins Developers wrote: > Do I understand it correctly, that you are suggesting that we make the base > class implement SimpleBuildStep, which will allow it to be used in a > pipeline Correct. > but

Re: Can a nested Jelly config figure out whether it's in a Build or Post Build?

2017-09-15 Thread 'Alexandra Goultiaeva' via Jenkins Developers
Thanks for the suggestion! Do I understand it correctly, that you are suggesting that we make the base class implement SimpleBuildStep, which will allow it to be used in a pipeline - but will not expose it as a Build step for Freestyle project? We specifically wanted to allow this to be a

Re: Can a nested Jelly config figure out whether it's in a Build or Post Build?

2017-09-15 Thread Jesse Glick
On Thu, Sep 14, 2017 at 11:51 AM, 'Alexandra Goultiaeva' via Jenkins Developers wrote: > Does anyone have any suggestions on how to approach this? Make it a `Publisher & SimpleBuildStep`. For freestyle projects, it will appear as a post-build action, which is

Can a nested Jelly config figure out whether it's in a Build or Post Build?

2017-09-14 Thread 'Alexandra Goultiaeva' via Jenkins Developers
I'm trying to write a wrapper to allow the Google Storage Plugin Post-Build step to also act as a Build step. Here is my first attempt . There is an inner class (e.g., ClassicUpload) that might be