Skip to content

Commit

Permalink
(refactor): replace early return with break and explicit return at th…
Browse files Browse the repository at this point in the history
…e end

requested in:

* opendevstack#1108 (comment)
  • Loading branch information
serverhorror committed May 13, 2024
1 parent 2f1dfe3 commit 6cb7307
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/org/ods/orchestration/phases/DeployOdsComponent.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class DeployOdsComponent {
for (def i = 0; i < retries; i++) {
podData = os.checkForPodData(project.targetProject, deploymentMean.selector)
if (podData) {
return podData
break
}
steps.echo("Could not find 'running' pod(s) with label '${deploymentMean.selector}' - waiting")
steps.sleep(12)
Expand All @@ -83,6 +83,7 @@ class DeployOdsComponent {
repo.data.openshift.deployments << [(deploymentName): pod]
def deploymentMeanKey = deploymentName + '-deploymentMean'
repo.data.openshift.deployments << [(deploymentMeanKey): deploymentMean]
return podData
}
} else {
def originalDeploymentVersions =
Expand Down

0 comments on commit 6cb7307

Please sign in to comment.