job('dsl-parent') {
configure { project ->
project.name = 'hudson.plugins.project__inheritance.projects.InheritanceProject'
}
parameters {
inheritableStringParameterDefinition {
name('name')
defaultValue('val')
description('desc')
inheritanceMode('OVERWRITABLE')
mustHaveDefaultValue(true)
mustBeAssigned(false)
whitespaceMode('TRIM')
isHidden(true)
}
}
steps {
shell('echo ${name}')
}
}
job('dsl-child') {
configure { project ->
project.name = 'hudson.plugins.project__inheritance.projects.InheritanceProject'
}
configure { node ->
node / 'parentReferences' / 'hudson.plugins.project__inheritance.projects.references.SimpleProjectReference' / name('dsl-parent')
}
parameters {
inheritableStringParameterReferenceDefinition {
name('name')
defaultValue('new-val')
}
}
}