Skip to content

Commit

Permalink
simplify lock step
Browse files Browse the repository at this point in the history
  • Loading branch information
ovcharenko-di committed Nov 29, 2024
1 parent 0499510 commit a7b557e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/ru/pulsar/jenkins/library/IStepExecutor.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ interface IStepExecutor {

def withEnv(List<String> strings, Closure body)

def lock(String label, int quantity, String resource, Closure<Object> body)
def lock(String resource, Closure<Object> body)

def archiveArtifacts(String path)

Expand Down
4 changes: 2 additions & 2 deletions src/ru/pulsar/jenkins/library/StepExecutor.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/ru/pulsar/jenkins/library/steps/Bdd.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion src/ru/pulsar/jenkins/library/steps/SmokeTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion src/ru/pulsar/jenkins/library/steps/Yaxunit.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit a7b557e

Please sign in to comment.