On Wednesday, December 24, 2014 1:16:10 PM UTC-5, LesMikesell wrote: > > Is there - or could there be - a workflow step that pre-allocates and > locks a set of nodes that a given user is allowed to use?
The access control aspect can be handled by independent plugins, such as https://jenkins-enterprise.cloudbees.com/docs/user-guide-docs/foldersplus-sect-controlledslaves.html in Jenkins Enterprise by CloudBees (but there may be other ways of doing this I am less familiar with). “Waiting for other jobs to complete” is automatic; the ‘node’ step will simply defer its body until it can grab an open executor slot on a matching node. For some test jobs it may be necessary to have a guarantee of exclusive > access on multiple nodes before starting. > Well Workflow 1.2 will have a ‘waitUntil’ step so I guess you could make a DIY semaphore: def acquired = 0 def branch(label) { node(label) { acquired++ waitUntil {acquired == 2} // run stuff on this node } } parallel server: {branch('server')}, client: {branch('client')} This is prone to deadlocks, though. Making a deadlock-free semaphore is trickier (you need to sometimes back out of a workspace lock and wait before trying again); probably best left to a custom 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/832eae2a-b7ad-4cab-a437-e6ad6e23d40d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
