Hi,



There's a restriction currently that prevents the use of a milestone step 
within a parallel execution of multiple tasks and I'm trying to understand 
if this is something that we could remove (I would submit a PR), but I'd 
like to discuss it first.


I have multiple jobs with the following pattern:

1. Build and run unit tests 
2. In parallel: 
  a. Run Integration Tests
  b. Generate Documentation
  c. Run very slow unit tests (if any)

I need to limit the number of jobs running integration tests to 1 per 
server and I want to use the milestone step to cancel previous builds when 
a newer job acquires the lock.
Currently my only option is to acquire the lock and set the milestone right 
before the parallel task, but then I will keep the lock until all branches 
complete and prevent other jobs from running their integration tests.
My only other option would be to take the integration tests branch out of 
the parallel step and run it before or after, but then my job will take 
longer to build.

Ideally, I'd like to keep the same structure but only lock resources and 
use the milestone step within the integration tests branch.


Option A: Modify the milestone plugin to allow it within a parallel 
execution, (no restriction at all)?

  - I understand it becomes unpredictable if used incorrectly , but we 
could print a WARNING in the console and let the users make sure they use 
it correctly (milestone number sequence need to increase, whatever the 
order they are executed, etc).


Option B: Allow a single milestone step for all branches of a parallel step?

  - Then the milestone step order becomes predictable, but it could mean 
stopping other branches that are currently executing


Option C: We cannot modify the current behavior

  - Please let me know why this is a bad idea to allow it in a branch



Please let me know what you think.
It would really improve my build times if I can lock only the integration 
tests branch.


Thanks,
Daniel






-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/b6360b88-273f-4e0b-9a46-a613ecd1287e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to