| Also faced this issue and want to add that it is really painful in case of concurrent builds that use the same lock resource. For example: Build 1:: Stage 1 ----------> Stage 2 (get lock A) [(when branch is master) == true ] -----------> Stage 3 Build 2:: Stage 1 ----------> Stage 2 (get lock A) [(when branch is master) == false ] -----------> Stage 3 Expected behaviour: Build 2 skips Stage 2 because it executed not from master branch. Lock not even tried to be allocated Current behaviour: Build 2 is trying to allocate lock A before checking when conditional, so it will skip Stage 2 only after Stage 2 will be finished in Build 1 |