each try
This commit is contained in:
@@ -2,12 +2,25 @@ package org.SHS
|
||||
|
||||
class Platforms {
|
||||
def steps
|
||||
|
||||
public Platforms(steps) {this.steps = steps}
|
||||
public Boolean get() {
|
||||
|
||||
public void get() {
|
||||
steps.stage("Download platforms.json") {
|
||||
steps.sh "rm -rf platforms"
|
||||
steps.sh "git clone --depth 1 ${steps.env.PLATFORMS_GIT} platforms"
|
||||
}
|
||||
}
|
||||
|
||||
public void forEach(functor, stage_suffix = "") {
|
||||
def root = steps.readJSON(file: 'platforms/platforms.json')
|
||||
root.Platforms.each { key, dist ->
|
||||
if (dist.enabled) {
|
||||
steps.stage ("${key}${stage_suffix}") {
|
||||
functor(dist)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user