[plugin] Executors booking

2020-02-06 Thread Tomasz Markiewicz
Hi,

I was wondering if it is possible to "integrate" heavy-job-plugin 
functionality into pipeline projects.

The result I aim for is something (more or less) like this to be available 
from the pipeline:

bookExecutors(20) {
sh 'make -j20`
}

Which should mark/reserve 20 executors (19 actually -- one would be used by 
make)
on the node on which make invocation takes place.

Currently I derived from org.jenkinsci.plugins.workflow.steps.Step,
so I can run my "plugin" directly from the pipeline. But I have no idea how 
to "reserve" or
"mark as busy" some executors.

Is it even possible?

I tried to add analogous JobProperty to the one defined in heavy-job-plugin 
[1] via:

public boolean start() throws Exception {

final StepContext context = getContext();
final Job job = run.getParent();
final Run run = context.get(Run.class);

job.addProperty(...);

context.newBodyInvoker().
withCallback(BodyExecutionCallback.wrap(context)).start();
return false;
}

But it didn't work.

Any ideas on how I should attack the problem?

Thanks,

TGM

Refs:
[1] 
https://github.com/jenkinsci/heavy-job-plugin/blob/master/src/main/java/hudson/plugins/heavy_job/HeavyJobProperty.java

-- 
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/9ddb6de1-ab6e-4191-b5a4-527385217c76%40googlegroups.com.


Re: JAMS in meetup account disappearing

2020-02-06 Thread Oleg Nenashev
Some updates in this thread:

   - Last week we had a discussion with Jacqueline Salinas at FOSDEM, and 
   she escalated the meetups recovery topic to meetup.com (again)
   - Around 20 meetups were restored after that. IIUC it represents all 
   meetup groups which have ever hosted a Jenkins meetup 
   - We updated all the documentation for mailing lists to redirect them to 
   Advocacy INFRA tickets have been created for archiving old 
   channels, but it will take a while due to other higher priorities in the 
   INFRA team

So now we can iterate on contacting these meetup groups and exploring 
options to recover regular Jenkins or CI/CD meetups there. If you are a 
leader of any restored meetup groups, please consider scheduling something

Best regards,
Oleg

On Thursday, January 16, 2020 at 6:25:40 AM UTC-5, Oleg Nenashev wrote:
>
> Just a quick update here, yesterday both topics were approved by the 
> Governance board:
>
>- Approve the suggested process in general && delegate the final 
>process decision to the event officer and Advocacy and Outreach SIG 
>(immediate/short-term stepdown for meetups which never happened, grace 
>period for stale ones)
>- Approve archiving of jenkinsci-jam and events mailing lists mailing 
>lists in favor of Advocacy & Outreach channels
>
> We will proceed at Advocacy SIG meeting on 16th 
> 
>  with 
> these topics
>
> Best regards,
> Oleg
>
> On Wednesday, January 15, 2020 at 11:02:09 AM UTC+1, ogondza wrote:
>>
>> +1 from me on doing the cleanup. Meetup groups come and go. Great to see 
>> a documented way to gring them back to life. 
>>
>> On 14/01/2020 14.59, Oleg Nenashev wrote: 
>> > Thanks a lot for the notice Alyssa! 
>> > 
>> > If my message is too long, *TL;DR: *the meetups will be restored, but 
>> it 
>> > is time to clean up the inactive meetups. There is a proposal below 
>> > 
>> > Some updates there: 
>> > 
>> >   * As communicated by Tracy, the root cause is that meetup.com 
>> support 
>> > removed more meetups than it was requested by CDF. 
>> >   * Last week we had a meeting with CDF where we discussed the issue. 
>> > Participants: Alyssa Tong (Jenkins Event Officer), Jacqueline 
>> > Salinas (Director of Ecosystem, CDF), Tracy Miranda and me 
>> >   * At this meeting we agreed that: 
>> >   o Removed meetups meetups will be restored. It will take a while 
>> > since it is a lengthy manual process by meetup.com support 
>> >   o CDF will grant us an additional grace 3-month grace period to 
>> > try restoring inactive meetups in the Jenkins community (and/or 
>> > to convert them to CI/CD meetups). Heads-up about cleaning up 
>> > inactive meetups was sent out on *Oct 26* to meetup organizers, 
>> > so we will need to reimplement the process and do additional 
>> > communications 
>> >   o If meetups are not restored, CDF will use the "step down" 
>> > process 
>> > <
>> https://help.meetup.com/hc/en-us/articles/360002882191-Stepping-down-as-the-organizer-of-a-group>
>>  
>>
>> > instead of deleting the meetups. It will give the local 
>> > communities an additional chance to restore the meetups 
>> > 
>> > Just to explain the reasons of the Jenkins Area Meetups cleanup: 
>> > 
>> >   * Running CI/CD Pro Meetup.com account 
>> >  costs *12k USD per 
>> quarter*. 
>> > The majority of these costs used to go to *106 *Jenkins Area 
>> Meetups 
>> >   * CDF has a limited budget for Outreach programs and meetups. They 
>> are 
>> > happy to sponsor active meetups, but in the case of Jenkins we 
>> > accumulated a number of inactive ones 
>> >   * Meanwhile, more than 60% of the meetups are dormant. Inactive 
>> > meetups cost the same amount of money as active ones 
>> >   o *27* JAMs groups have NEVER had a meetup on meetup.com 
>> >   o *40* other JAMs did not have any events organized in 2019 
>> >   * Dormant JAMs prevent CDF from... 
>> >   o Sponsoring swag/food/venue for meetups and other events 
>> >   o Onboarding new CI/CD and Jenkins meetups in active local 
>> communities 
>> >   o Organizing other events and running outreach programs 
>> > 
>> > So you may see there is a good reason to cleanup meetups which are 
>> > really inactive. Some of us might be mentally attached to these meetups 
>> > (e.g. I was a co-org in several removed meetups), but IMO we need to 
>> > face the reality and adjust our meetup program. I would suggest the 
>> > following process: 
>> > 
>> >  1. Wait till meetups are restored 
>> >  2. Do a best effort attempt to revive the meetups 
>> >   * Communicate the incoming deprecation/cleanup of meetups AGAIN 
>> to 
>> > meetup organizers and all meetup members 
>> >   * For meetups that