Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewandrews committed Mar 30, 2022
2 parents eb71990 + 5fa30a1 commit 2fdd4f5
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ stage ('Clear file locks') {
datasets.removeAll(batch3.split(" "))
datasets.removeAll(batch4.split(" "))
//split into 6 batches
def batches = ["",""]
//split into n-node batches
def batches = [""] * jenkins.model.Jenkins.instance.nodes.size()
datasets.eachWithIndex { datasetId, index ->
batches[index.mod(2)] = batches[index.mod(2)] + " " + datasetId
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ stage('Run image load on jenkins nodes') {
}
@NonCPS def batchDatasets(datasets, noOfBatches){
//split into 6 batches
def batches = ["","","","","",""]
//split into n-node batches
def batches = [""] * noOfBatches
datasets.eachWithIndex { datasetId, index ->
batches[index.mod(noOfBatches)] = datasetId + " " + batches[index.mod(noOfBatches)]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ stage('Interpret small datasets on jenkins nodes') {
}
@NonCPS def batchDatasets(datasets, noOfBatches){
//split into 6 batches
def batches = ["","","","","",""]
//split into n-node batches
def batches = [""] * noOfBatches
datasets.eachWithIndex { datasetId, index ->
batches[index.mod(noOfBatches)] = datasetId + " " + batches[index.mod(noOfBatches)]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ stage('Index small datasets on jenkins nodes') {
@NonCPS def batchDatasets(datasets, noOfBatches){
//split into 6 batches
def batches = ["","","","","",""]
//split into n-node batches
def batches = [""] * noOfBatches
datasets.eachWithIndex { datasetId, index ->
batches[index.mod(noOfBatches)] = datasetId + " " + batches[index.mod(noOfBatches)]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ stage('Interpret small datasets on jenkins nodes') {
}
@NonCPS def batchDatasets(datasets, noOfBatches){
//split into 6 batches
def batches = ["","","","","",""]
//split into n-node batches
def batches = [""] * noOfBatches
datasets.eachWithIndex { datasetId, index ->
batches[index.mod(noOfBatches)] = datasetId + " " + batches[index.mod(noOfBatches)]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ stage('Interpret small datasets on jenkins nodes') {
}
@NonCPS def batchDatasets(datasets, noOfBatches){
//split into 6 batches
def batches = ["","","","","",""]
//split into n-node batches
def batches = [""] * noOfBatches
datasets.eachWithIndex { datasetId, index ->
batches[index.mod(noOfBatches)] = datasetId + " " + batches[index.mod(noOfBatches)]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@

</properties>
<definition class="org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition" plugin="[email protected]">
<script>nodeNames().each { nodeName -&gt;
<script>// Skip if we are not using docker
def use_docker_with_pipelines = {{ use_docker_with_pipelines | string | lower }}
if (!use_docker_with_pipelines) return
nodeNames().each { nodeName -&gt;
node(nodeName) {
echo 'nodeName ' + nodeName
sh 'sudo sh -c "docker kill $(docker ps -q)" || true'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ stage('SDS small datasets on jenkins nodes') {
@NonCPS def batchDatasets(datasets, noOfBatches){
//split into 6 batches
def batches = ["","","","","",""]
//split into n-node batches
def batches = [&quot;&quot;] * noOfBatches
datasets.eachWithIndex { datasetId, index -&gt;
batches[index.mod(noOfBatches)] = datasetId + " " + batches[index.mod(noOfBatches)]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ stage('SDS small datasets on jenkins nodes') {
@NonCPS def batchDatasets(datasets, noOfBatches){
//split into 6 batches
def batches = ["","","","","",""]
//split into n-node batches
def batches = [&quot;&quot;] * noOfBatches
datasets.eachWithIndex { datasetId, index -&gt;
batches[index.mod(noOfBatches)] = datasetId + " " + batches[index.mod(noOfBatches)]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ stage('UUID small datasets on jenkins nodes') {
@NonCPS def batchDatasets(datasets, noOfBatches){
//split into 6 batches
def batches = ["","","","","",""]
//split into n-node batches
def batches = [&quot;&quot;] * noOfBatches
datasets.eachWithIndex { datasetId, index -&gt;
batches[index.mod(noOfBatches)] = datasetId + " " + batches[index.mod(noOfBatches)]
}
Expand Down

0 comments on commit 2fdd4f5

Please sign in to comment.