Early working version of YAML-based pipeline.
This commit is contained in:
parent
9758e483fa
commit
20750b77a3
|
@ -5,27 +5,35 @@ String releaseURL = "https://code-repo.d4science.org/gCubeCI/gCubeRelease/raw/br
|
|||
//check and parse the release file
|
||||
println "Querying ${releaseURL}"
|
||||
def text = releaseURL.toURL().getText()
|
||||
echo text
|
||||
|
||||
//parsing
|
||||
def jsonConfig = new Yaml().load(text)
|
||||
println jsonConfig.inspect()
|
||||
echo "gCube v. ${jsonConfig.gCube_release.Version}"
|
||||
|
||||
echo "components:"
|
||||
echo "Found components:"
|
||||
jsonConfig.gCube_release.Components.each{println it.key}
|
||||
|
||||
pipeline {
|
||||
agent any
|
||||
// see https://jenkins.io/doc/book/pipeline/syntax/#agent
|
||||
agent {
|
||||
label 'pipeline-agent'
|
||||
}
|
||||
|
||||
//see https://jenkins.io/doc/book/pipeline/syntax/#stages
|
||||
stages {
|
||||
stage('build') {
|
||||
stage('build SmartGears components') {
|
||||
steps {
|
||||
buildComponents items: ("a".."f").collect { "Stage ${it}" }
|
||||
buildComponents items: jsonConfig.gCube_release.Components.SmartGears.collect { "${it}" }
|
||||
}
|
||||
}
|
||||
stage('build2') {
|
||||
stage('build Enabling components') {
|
||||
steps {
|
||||
buildComponents items: ("g".."p").collect { "Stage ${it}" }
|
||||
buildComponents items: jsonConfig.gCube_release.Components.Enabling.collect { "${it}" }
|
||||
}
|
||||
}
|
||||
stage('build Data components') {
|
||||
steps {
|
||||
buildComponents items: jsonConfig.gCube_release.Components.Data.collect { "${it}" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,8 +41,6 @@ pipeline {
|
|||
|
||||
def buildComponents(args) {
|
||||
parallel args.items.collectEntries { name -> [ "${name}": {
|
||||
stage("${name}") {
|
||||
echo name
|
||||
}
|
||||
build name
|
||||
}]}
|
||||
}
|
Loading…
Reference in New Issue