Reputation: 1
I want to create jenkins job which can inherit parmeters from folder with DSL script but can't find any declaration for this task.
I don't want to do it in the pipeline because I am to create the whole catalogue of jobs with folders and subfolders and without any steering file with parameters. Parameters in the main folder are to be inherited by subfolders and jobs
In the pipeline there is routine: withFolderProperties - which can't be used here
Here is my code.
folder('Folder A') {
properties {
folderProperties {
properties {
stringProperty {
key('Parameter_A')
value('Value of A')
}
}
}
}
}
job('/Folder A/Job B') {
parameters {
stringParam('Parameter_B', 'Value of B', '')
}
steps {
powerShell("Write-Host Values of my parameters:")
powerShell("Write-Host \${env:Parameter_A}")
powerShell("Write-Host \${env:Parameter_B}")
}
}
Is there any declaration for folder properties inheritance in job dsl After proper execution of this seed script, there should be box folder properties checked in Job B:
Upvotes: 0
Views: 32