Re: Checking whether a step from a plugin is in actual use in an instance

2022-04-18 Thread Tim Van Holder
Daniel offered a similar suggestion off-list. I'll have a look once I get a
release out with what I have now.

One question though - what would the migration path be like?
Can a plugin include code that will update a freestyle project that uses
the DotNetFoo builder to use the DotNet builder with a Foo argument instead?
I would assume I'd normally have read-only access to the freestyle jobs.

I suppose I could just keep both around, with isApplicable() for the old
ones returning false (so that existing uses remain valid, but only the new
builder could be used for new steps), but an automatic upgrade would be
nice too.

I'd have to keep them around for pipeline use anyway; is there anything in
Jenkins that will report warnings for use of deprecated steps in a pipeline
job? There's no isApplicable() there to keep them from being written in
scripts, so if I can at least have the build report that the new steps
should be used instead, that's something. I wouldn't want to keep the old
builders around in perpetuity (even if they can become simple wrappers
around the new one).


On Fri, 15 Apr 2022 at 21:25, 'Jesse Glick' via Jenkins Developers <
jenkinsci-dev@googlegroups.com> wrote:

> On Tue, Apr 12, 2022 at 1:40 PM Tim Van Holder 
> wrote:
>
>> a relatively simple way to have a build step for freestyle that would
>> essentially then have a dropdown for the 11 "real" steps which then shows
>> their configuration when selected
>>
>
> This is straightforward. (`ui-samples-plugin` may be instructive.) Just an
> abstract `Describable` supertype for the real things, and the `config.xml`
> for the `Builder` can have a `f:dropdownDescriptorSelector` and maybe
> nothing else. Each real thing has its own `config.jelly`. If you also add
> `@Symbol`’s, then for Pipeline you would get syntax like
>
> dotnet tool: makeAssembly(assemblySpecificOption: true), genericOption:
> 'whatever'
>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3eG-v5vNV4ScKYLPHRSCgCheLjGJsQ9H7_JVCbmTx6Xw%40mail.gmail.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAKMi--D%3DfSYQLej3Pqx7autnAm3izuGbhHQ4sNkN9suW09HwYQ%40mail.gmail.com.


Re: Checking whether a step from a plugin is in actual use in an instance

2022-04-18 Thread 'Jesse Glick' via Jenkins Developers
On Mon, Apr 18, 2022 at 4:38 AM Tim Van Holder 
wrote:

> Can a plugin include code that will update a freestyle project that uses
> the DotNetFoo builder to use the DotNet builder with a Foo argument instead?
>
It is possible with an `@Initializer`.

I'd have to keep them around for pipeline use anyway
>
Correct.

is there anything in Jenkins that will report warnings for use of
> deprecated steps in a pipeline job?
>
No, but you could print a message to a `TaskListener` in case the user is
paying attention. If you want to be more aggressive, there is always
`AdministrativeMonitor`.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1hYyguDRxfxdWGyEKp_Yv%3D-XxjnGVbUhAnLGFMQQsKEQ%40mail.gmail.com.


Re: Checking whether a step from a plugin is in actual use in an instance

2022-04-18 Thread 'Daniel Beck' via Jenkins Developers



> On 18. Apr 2022, at 10:38, Tim Van Holder  wrote:
> 
> Can a plugin include code that will update a freestyle project that uses the 
> DotNetFoo builder to use the DotNet builder with a Foo argument instead?

Potentially doable via readResolve as well.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/B11CEEEF-9E52-4CAE-A7B7-7171AC4A9881%40beckweb.net.


Re: Checking whether a step from a plugin is in actual use in an instance

2022-04-18 Thread 'Jesse Glick' via Jenkins Developers
On Mon, Apr 18, 2022 at 3:16 PM 'Daniel Beck' via Jenkins Developers <
jenkinsci-dev@googlegroups.com> wrote:

> Potentially doable via readResolve as well.
>
>
Unfortunately you cannot do this sort of thing via `readResolve` so far as
I know.

Ideally there would be some API which you could call from `readResolve` or
otherwise mark a class which, if loaded in the context of some top-level
model object (in this case `Project`), would trigger a callback after the
top-level load completes, which you could use to immediately rewrite the
reference, add to `OldDataMonitor`, etc.

In the absence of that, your only option is to add a global initialization
hook which scans all build steps in all projects. Obviously this adds
startup overhead for everyone who installs your plugin, even if it is
unused. You could use a `GlobalConfiguration` (or simple `FileBoolean`) to
track whether the translation has been run before.

Another common use case is migrating `Secret` to `credentialsId`.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2v5kykDcTky_Y_9eT93n%2BDJ_sfK7LO6P0rph13ismRvQ%40mail.gmail.com.


Re: Hosting

2022-04-18 Thread 'Gavin Mogan' via Jenkins Developers
So last ticket is now closed.

On Sun, Apr 10, 2022 at 1:16 PM Gavin Mogan  wrote:
>
> Looks like its mostly waiting for security
> https://issues.jenkins.io/browse/HOSTING-1160
>
> On Sun, Apr 10, 2022 at 12:40 PM Alex Earl  wrote:
> >
> > Anything I can do to help get that one over the finish line?
> >
> > On Fri, Apr 8, 2022 at 9:10 AM 'Gavin Mogan' via Jenkins Developers 
> >  wrote:
> >>
> >> We have one left mostly waiting on security
> >>
> >> On Fri., Apr. 8, 2022, 9:08 a.m. Tim Jacomb,  wrote:
> >>>
> >>> It was kept while we processed the remaining stragglers in Jira, I think 
> >>> those have finished now so we can remove the code.
> >>>
> >>> The checker and hosted was copied into the RPU repo
> >>>
> >>> On Fri, 8 Apr 2022 at 15:30, slide  wrote:
> 
>  Since I have been out of the loop for a while, I was reviewing the 
>  new(ish) hosting requirements documentation here: 
>  https://www.jenkins.io/doc/developer/publishing/requesting-hosting/#open-hosting-request.
> 
>  Does this mean we can remove the hosting checker and such from the 
>  ircbot, or has it been updated for the new flow to check the PRs?
> 
>  Thanks,
> 
>  Alex
> 
>  --
>  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+unsubscr...@googlegroups.com.
>  To view this discussion on the web visit 
>  https://groups.google.com/d/msgid/jenkinsci-dev/3bf1914e-98ef-4132-8b27-afc3b3ac5f4en%40googlegroups.com.
> >>>
> >>> --
> >>> 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+unsubscr...@googlegroups.com.
> >>> To view this discussion on the web visit 
> >>> https://groups.google.com/d/msgid/jenkinsci-dev/CAH-3BifBUNEsO44SHA88h3WQ1OeptC074n9TPBhH4OyRZyCYsA%40mail.gmail.com.
> >>
> >> --
> >> You received this message because you are subscribed to a topic in the 
> >> Google Groups "Jenkins Developers" group.
> >> To unsubscribe from this topic, visit 
> >> https://groups.google.com/d/topic/jenkinsci-dev/O8ZKRm6x6Fc/unsubscribe.
> >> To unsubscribe from this group and all its topics, send an email to 
> >> jenkinsci-dev+unsubscr...@googlegroups.com.
> >> To view this discussion on the web visit 
> >> https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_DuscTzOfvrkD9LX86mKA21WEZqyGCJPOegGwKxvRE6DsBg%40mail.gmail.com.
> >
> >
> >
> > --
> > Website: http://earl-of-code.com
> >
> > --
> > 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+unsubscr...@googlegroups.com.
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/jenkinsci-dev/CAPiUgVdLb%2BU_9y_Kyp%2BH6XdTT4ea4CiL1X8AwuVuHiNp-9o4LA%40mail.gmail.com.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CAG%3D_DusgusdKj1V63OF2MGJqvcMaL9Mg6rjRB4S9q3JfH4VcOA%40mail.gmail.com.