An alternative may be to look at the buildflow plugin (latest source code 
not latest release) and one of its extensions.

If you move your pipeline to be managed by the flow - the flow can control 
which jobs are allowed to run concurrently (for the same flow) - and the 
actual jobs can run as many times as you want to allow manual triggering to 
deploy to random server X.  This wouldn't prevent finger trouble where some 
user hit build now on the deploy job and deployed files to a SUT - but 
should work in the happy case.

https://wiki.jenkins-ci.org/display/JENKINS/Build+Flow+Plugin
https://wiki.jenkins-ci.org/display/JENKINS/Build+Flow+Extensions+Plugin

/James

On Tuesday, 25 March 2014 10:03:56 UTC, David Campos wrote:
>
> I figured out how to use the plugin (thanks documentation spread across 
> forums...) but I think that it does not solve my problem. With this plugin 
> I am able to queue the execution of a job but not based on conditionals. I 
> would need to be able to set the category or filter through parameter 
> injection so, when the desired blocking pipeline starts they can lock but 
> not on manual triggers for example.
>
> Example:
>
> Parent project triggers deploy with category #1 -> deploy #1 -> Smoke #1 
> -> Compat #1
> Parent project triggers deploy with category #2 -> deploy (locked by #1 
> pipeline)
> Manual trigger of deploy to server Y (OK)
>
> On Tuesday, March 25, 2014 10:41:53 AM UTC+1, David Campos wrote:
>>
>> Hi Marc,
>>
>> Being honest I do not know how to use that plugin... I was trying to set 
>> all projects into a category but I do not know how to do that... Any hint?
>>
>> On Thursday, March 20, 2014 5:11:48 PM UTC+1, Marc MacIntyre wrote:
>>>
>>> Will this solve your problem?
>>>
>>>
>>> https://wiki.jenkins-ci.org/display/JENKINS/Throttle+Concurrent+Builds+Plugin
>>>
>>>
>>> On Thu, Mar 20, 2014 at 5:17 AM, David Campos <[email protected]>wrote:
>>>
>>>> Hi all,
>>>>
>>>> I have a scenario that I am not able to solve without some downsides. I 
>>>> don't know if my workflow is currently supported or not so I search for 
>>>> your help.
>>>>
>>>> *Scenario:*
>>>>
>>>> *Compilation job:* Maven job that executes unit tests and creates 
>>>> deliverables
>>>> *Deploy job:* Capistrano deployment that deploys deliverables to 
>>>> target machines based on eligible parameters (cd, testing, staging...) 
>>>> *Integration job:* Executes a smoke test using BDD.
>>>> *BCT job:* Same as Integration but with customer tests and multiple 
>>>> browsers.
>>>>
>>>> *Process:*
>>>>
>>>>  We have a build pipeline based on [compilation -> deployment to 
>>>> server -> execution of smoke tests (integration) -> execution of 
>>>> compatibility tests] that has a step that takes too much time to complete 
>>>> (smoke test). Since deployments should not happen when tests are being 
>>>> executed (would break the compilation chain) we have decided to block 
>>>> deployment build until the downstream finishes... That's OK.
>>>>
>>>> *Problem:*
>>>>
>>>> Since deployment jobs are blocked by downstream, whenever an IT or BCT 
>>>> job is being executed deployment is forbidden, either to the affected 
>>>> machine or to any testing machine, so we can not perform deployments to 
>>>> testing scenarios for QA to test (an old build for example).
>>>>
>>>> *Possible solution:*
>>>>
>>>> My possible solution would be to block the execution of deployment *if 
>>>> and only if* the target machine is cd and smoke or BCT tests are being 
>>>> executed. I need a two factor check, one from parameters of the current 
>>>> build (easy) and another from downstream executors. 
>>>>
>>>> I don't know if that is possible. If that scenario is possible... how 
>>>> can I implement it? Groovy? Can I mark a build as queued and allow other 
>>>> builds to go ahead (parallel builds maybe)?
>>>>
>>>> Thanks for the help.
>>>>
>>>> -- 
>>>> 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].
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> -- 
>>> Marc MacIntyre
>>>  
>>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to