This commit is contained in:
2023-04-22 13:28:35 +03:00
parent fd4f32b0ee
commit 5389f17e59

View File

@@ -2,12 +2,25 @@ package org.SHS
class Platforms { class Platforms {
def steps def steps
public Platforms(steps) {this.steps = steps} public Platforms(steps) {this.steps = steps}
public Boolean get() {
public void get() {
steps.stage("Download platforms.json") { steps.stage("Download platforms.json") {
steps.sh "rm -rf platforms" steps.sh "rm -rf platforms"
steps.sh "git clone --depth 1 ${steps.env.PLATFORMS_GIT} 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)
}
}
}
}
} }