locks vs stage w/concurrency

62 views
Skip to first unread message

David Karlsen

unread,
Sep 21, 2016, 3:31:46 PM9/21/16
to jenkins...@googlegroups.com
I have a question on locks vs stage w/ concurrency:

lock(inversePrecedence: true, resource: 'myLock') {
    // some block
}

vs 
stage(name:'myStage',concurrency:1) {
    // some block
}


With stages newer builds would "win" over older ones while waiting to run so that unnecessary was avoided, however with locks all builds will run - I want the newer job to wait for a lock to win, and the ones that became stale to disappear - this does not seem possible?


--

Michael Kobit

unread,
Sep 21, 2016, 5:37:26 PM9/21/16
to Jenkins Users
I believe the stage step with concurrency has been deprecated so I would avoid using that.

It sounds like you are looking for https://issues.jenkins-ci.org/plugins/servlet/mobile#issue/JENKINS-27039 (milestone step).

David Karlsen

unread,
Sep 21, 2016, 7:13:06 PM9/21/16
to jenkins...@googlegroups.com
Thanks - last I checked it was not finished - now it is! :)

2016-09-21 23:37 GMT+02:00 Michael Kobit <mko...@gmail.com>:
I believe the stage step with concurrency has been deprecated so I would avoid using that.

It sounds like you are looking for https://issues.jenkins-ci.org/plugins/servlet/mobile#issue/JENKINS-27039 (milestone step).

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c758e13a-c59c-4c8b-a0a6-36645c57477c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

James Nord

unread,
Sep 27, 2016, 6:49:55 PM9/27/16
to Jenkins Users

Antonio Muñiz

unread,
Oct 3, 2016, 5:29:08 AM10/3/16
to jenkins...@googlegroups.com

On Wed, Sep 28, 2016 at 12:49 AM, James Nord <james...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Antonio Muñiz
Software Engineer
CloudBees, Inc.

Reply all
Reply to author
Forward
0 new messages