Hello,

I'm experimenting with the "stage" command using the flow below, and 
running the job 4 times in a row (#59, #60, #61, #62).

My test show that the concurrency limit I set for stage 'build_and_test' is 
not accounted for, but the one for the 'test' stage is (great feature, 
thanks!).

Maybe limiting concurrency only works within a node scope? Or am I missing 
something?

Doc is quite sparce regarding the stage command.

stage name: 'sync'
> node("qisrc") {
>   echo "before sync"
>   sh "sleep 10"
>   echo "after sync"
> }
>
> stage name: 'build_and_test', concurrency: 1
> node("qisrc") {
>   stage name: 'build'
>   echo "before build"
>   sh "sleep 10"
>   echo "build 1/3"
>   sh "sleep 10"
>   echo "build 2/3"
>   sh "sleep 10"
>   echo "build 3/3"
>
>   stage name: 'test', concurrency: 1
>   echo "before test"
>   sh "sleep 10"
>   echo "test 1/3"
>   sh "sleep 10"
>   echo "test 2/3"
>   sh "sleep 10"
>   echo "test 3/3"
> }
>

job/workflow/59/console:

> Started by user admin <http://agility-test.local/user/admin>
> Running: sync
> Entering stage sync
> Proceeding
> Running: Allocate node : Start
> Running on qisrc in /home/jenkins/jenkins/workspace/workflow
> Running: Allocate node : Body : Start
> Running: Print Message
> before sync
> Running: Shell Script
> [workflow] Running shell script
> + sleep 10
> Running: Print Message
> after sync
> Running: Allocate node : Body : End
> Running: Allocate node : End
> Running: build_and_test
> Entering stage build_and_test
> Proceeding
> Running: Allocate node : Start
> Running on qisrc in /home/jenkins/jenkins/workspace/workflow
> Running: Allocate node : Body : Start
> Running: build
> Entering stage build
> Proceeding
> Running: Print Message
> before build
> Running: Shell Script
> [workflow] Running shell script
> + sleep 10
> Running: Print Message
> build 1/3
> Running: Shell Script
> [workflow] Running shell script
> + sleep 10
> Running: Print Message
> build 2/3
> Running: Shell Script
> [workflow] Running shell script
> + sleep 10
> Running: Print Message
> build 3/3
> Running: test
> Entering stage test
> Proceeding
> Running: Print Message
> before test
> Running: Shell Script
> [workflow] Running shell script
> + sleep 10
> Running: Print Message
> test 1/3
> Running: Shell Script
> [workflow] Running shell script
> + sleep 10
> Running: Print Message
> test 2/3
> Running: Shell Script
> [workflow] Running shell script
> + sleep 10
> Running: Print Message
> test 3/3
> Running: Allocate node : Body : End
> Running: Allocate node : End
> Running: End of Workflow
> Finished: SUCCESS
>
>
job/workflow/60/console:

> Started by user admin <http://agility-test.local/user/admin>
> Running: sync
> Entering stage sync
> Proceeding
> Running: Allocate node : Start
> Running on qisrc in /home/jenkins/jenkins/workspace/workflow@2
> Running: Allocate node : Body : Start
> Running: Print Message
> before sync
> Running: Shell Script
> [workflow@2] Running shell script
> + sleep 10
> Running: Print Message
> after sync
> Running: Allocate node : Body : End
> Running: Allocate node : End
> Running: build_and_test
> Entering stage build_and_test
> Proceeding
> Running: Allocate node : Start
> Running on qisrc in /home/jenkins/jenkins/workspace/workflow@2
> Running: Allocate node : Body : Start
> Running: build
> Entering stage build
> Proceeding
> Running: Print Message
> before build
> Running: Shell Script
> [workflow@2] Running shell script
> + sleep 10
> Running: Print Message
> build 1/3
> Running: Shell Script
> [workflow@2] Running shell script
> + sleep 10
> Running: Print Message
> build 2/3
> Running: Shell Script
> [workflow@2] Running shell script
> + sleep 10
> Running: Print Message
> build 3/3
> Running: test
> Entering stage test
> Waiting for builds [59]
> Canceled since #61 got here
> Running: Allocate node : Body : End
> Running: Allocate node : End
> Running: End of Workflow
> Superseded by #61
> Finished: NOT_BUILT
>
>
http://agility-test.local/job/workflow/61/console

> Started by user admin <http://agility-test.local/user/admin>
> Running: sync
> Entering stage sync
> Proceeding
> Running: Allocate node : Start
> Running on qisrc in /home/jenkins/jenkins/workspace/workflow@3
> Running: Allocate node : Body : Start
> Running: Print Message
> before sync
> Running: Shell Script
> [workflow@3] Running shell script
> + sleep 10
> Running: Print Message
> after sync
> Running: Allocate node : Body : End
> Running: Allocate node : End
> Running: build_and_test
> Entering stage build_and_test
> Proceeding
> Running: Allocate node : Start
> Running on qisrc in /home/jenkins/jenkins/workspace/workflow@3
> Running: Allocate node : Body : Start
> Running: build
> Entering stage build
> Proceeding
> Running: Print Message
> before build
> Running: Shell Script
> [workflow@3] Running shell script
> + sleep 10
> Running: Print Message
> build 1/3
> Running: Shell Script
> [workflow@3] Running shell script
> + sleep 10
> Running: Print Message
> build 2/3
> Running: Shell Script
> [workflow@3] Running shell script
> + sleep 10
> Running: Print Message
> build 3/3
> Running: test
> Entering stage test
> Canceling older #60
> Waiting for builds [59]
> Canceled since #62 got here
> Running: Allocate node : Body : End
> Running: Allocate node : End
> Running: End of Workflow
> Superseded by #62
> Finished: NOT_BUILT
>
>
http://agility-test.local/job/workflow/62/console

> Started by user admin <http://agility-test.local/user/admin>
> Running: sync
> Entering stage sync
> Proceeding
> Running: Allocate node : Start
> Running on qisrc in /home/jenkins/jenkins/workspace/workflow@4
> Running: Allocate node : Body : Start
> Running: Print Message
> before sync
> Running: Shell Script
> [workflow@4] Running shell script
> + sleep 10
> Running: Print Message
> after sync
> Running: Allocate node : Body : End
> Running: Allocate node : End
> Running: build_and_test
> Entering stage build_and_test
> Proceeding
> Running: Allocate node : Start
> Running on qisrc in /home/jenkins/jenkins/workspace/workflow@4
> Running: Allocate node : Body : Start
> Running: build
> Entering stage build
> Proceeding
> Running: Print Message
> before build
> Running: Shell Script
> [workflow@4] Running shell script
> + sleep 10
>
> Running: Print Message
> build 1/3
> Running: Shell Script
>
> [workflow@4] Running shell script
> + sleep 10
>
> Running: Print Message
> build 2/3
> Running: Shell Script
> [workflow@4] Running shell script
>
> + sleep 10
>
> Running: Print Message
> build 3/3
> Running: test
> Entering stage test
> Canceling older #61
> Waiting for builds [59]
>
> Unblocked since #59 finished
> Running: Print Message
> before test
> Running: Shell Script
> [workflow@4] Running shell script
> + sleep 10
>
> Running: Print Message
> test 1/3
> Running: Shell Script
> [workflow@4] Running shell script
> + sleep 10
>
> Running: Print Message
> test 2/3
> Running: Shell Script
> [workflow@4] Running shell script
> + sleep 10
>
> Running: Print Message
> test 3/3
> Running: Allocate node : Body : End
> Running: Allocate node : End
> Running: End of Workflow
> Finished: SUCCESS
>
>  

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/fd4542b7-b418-4895-8fc3-ae26f4a115db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to