diff --git a/src/ru/pulsar/jenkins/library/IStepExecutor.groovy b/src/ru/pulsar/jenkins/library/IStepExecutor.groovy index 18264408..0619e0c5 100644 --- a/src/ru/pulsar/jenkins/library/IStepExecutor.groovy +++ b/src/ru/pulsar/jenkins/library/IStepExecutor.groovy @@ -66,7 +66,7 @@ interface IStepExecutor { def withEnv(List strings, Closure body) - def lock(String label, int quantity, String resource, Closure body) + def lock(String resource, Closure body) def archiveArtifacts(String path) diff --git a/src/ru/pulsar/jenkins/library/StepExecutor.groovy b/src/ru/pulsar/jenkins/library/StepExecutor.groovy index d337aab6..6a22d7fe 100644 --- a/src/ru/pulsar/jenkins/library/StepExecutor.groovy +++ b/src/ru/pulsar/jenkins/library/StepExecutor.groovy @@ -150,8 +150,8 @@ class StepExecutor implements IStepExecutor { } @Override - def lock(String label, int quantity, String resource, Closure body) { - steps.lock(label: label, quantity: quantity, resource: resource) { + def lock(String resource, Closure body) { + steps.lock(resource: resource) { body() } } diff --git a/src/ru/pulsar/jenkins/library/steps/Bdd.groovy b/src/ru/pulsar/jenkins/library/steps/Bdd.groovy index 68241e3c..68200476 100644 --- a/src/ru/pulsar/jenkins/library/steps/Bdd.groovy +++ b/src/ru/pulsar/jenkins/library/steps/Bdd.groovy @@ -53,7 +53,7 @@ class Bdd implements Serializable { lockableResource = "${env.NODE_NAME}_$port" } - steps.lock(null, 1, lockableResource) { + steps.lock(lockableResource) { if (options.coverage) { steps.start("${coverageOpts.dbgsPath} --addr=127.0.0.1 --port=$port") steps.start("${coverageOpts.coverage41CPath} start -i DefAlias -u http://127.0.0.1:$port -P $workspaceDir -s $srcDir -o $COVERAGE_STASH_PATH") diff --git a/src/ru/pulsar/jenkins/library/steps/SmokeTest.groovy b/src/ru/pulsar/jenkins/library/steps/SmokeTest.groovy index 9578e434..74e220e3 100644 --- a/src/ru/pulsar/jenkins/library/steps/SmokeTest.groovy +++ b/src/ru/pulsar/jenkins/library/steps/SmokeTest.groovy @@ -117,7 +117,7 @@ class SmokeTest implements Serializable { lockableResource = "${env.NODE_NAME}_$port" } - steps.lock(null, 1, lockableResource) { + steps.lock(lockableResource) { if (options.coverage) { steps.start("${coverageOpts.dbgsPath} --addr=127.0.0.1 --port=$port") steps.start("${coverageOpts.coverage41CPath} start -i DefAlias -u http://127.0.0.1:$port -P $workspaceDir -s $srcDir -o $COVERAGE_STASH_PATH") diff --git a/src/ru/pulsar/jenkins/library/steps/Yaxunit.groovy b/src/ru/pulsar/jenkins/library/steps/Yaxunit.groovy index 83fc8f60..d704731c 100644 --- a/src/ru/pulsar/jenkins/library/steps/Yaxunit.groovy +++ b/src/ru/pulsar/jenkins/library/steps/Yaxunit.groovy @@ -80,7 +80,7 @@ class Yaxunit implements Serializable { lockableResource = "${env.NODE_NAME}_$port" } - steps.lock(null, 1, lockableResource) { + steps.lock(lockableResource) { if (options.coverage) { steps.start("${coverageOpts.dbgsPath} --addr=127.0.0.1 --port=$port") steps.start("${coverageOpts.coverage41CPath} start -i DefAlias -u http://127.0.0.1:$port -P $workspaceDir -s $srcDir -o $COVERAGE_STASH_PATH")