[JIRA] (JENKINS-44950) Support a quantity of zero required resources

0 views
Skip to first unread message

tobias-jenkins@23.gs (JIRA)

unread,
Oct 12, 2019, 9:59:03 AM10/12/19
to jenkinsc...@googlegroups.com
Tobias Gruetzmacher commented on Improvement JENKINS-44950
 
Re: Support a quantity of zero required resources

Does this fix in release 2.6 from today help?

This allows an "empty" lock when using the "extra" list:

def locks = []
if (cond) {
    locks << [quantity: 1, resource: 'foo']
}
lock(extra: locks) {
    // some block
}
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

tobias-jenkins@23.gs (JIRA)

unread,
Oct 12, 2019, 10:00:01 AM10/12/19
to jenkinsc...@googlegroups.com

Nathan.Vahrenberg@cerner.com (JIRA)

unread,
Oct 14, 2019, 10:07:03 AM10/14/19
to jenkinsc...@googlegroups.com
Nathan Vahrenberg commented on Improvement JENKINS-44950
 
Re: Support a quantity of zero required resources

I threw together a quick test and it looks like that works. It logs out this when it doesn't have anything to lock:

09:03:55  Trying to acquire lock on [nothing]
09:03:55  Lock acquired on [nothing] 

 

Which is better than what it said previously, something like "no resource specified - probably a bug." There were a few times people were misled by that message. I think that's good enough to close this out.

Nathan.Vahrenberg@cerner.com (JIRA)

unread,
Oct 14, 2019, 10:08:02 AM10/14/19
to jenkinsc...@googlegroups.com
Nathan Vahrenberg closed an issue as Done
 
Change By: Nathan Vahrenberg
Status: Open Closed
Resolution: Done
Reply all
Reply to author
Forward
0 new messages