pipeline {
agent any
stages {
stage('build') {
steps {
buildComponents items: ("a".."f").collect { "Stage ${it}" }
}
def buildComponents(args) {
parallel args.items.collectEntries { name -> [ "${name}": {
stage("${name}") {
echo name
}]}