In Jenkins I want to set a field in the parameters section depending on the value on a parameters set in properties folder.
Each time I try to use withFolderProperties outside stages sections, I've an error. so I ask the next question...
Can I use it for my need ?
here my code :
pipeline {
agent {
label "xxx.yyy"
}
parameters {
/* it doen't work*/
withFolderProperties{
choice(name: 'Projet', choices: [${cicdListeProjets}], description: 'Projet concerne')
}
}
tools {
jdk 'openjdk-8'
}
options {
buildDiscarder(logRotator(numToKeepStr: '5'))
disableConcurrentBuilds()
}
stages {
stage('Checkout') {
steps {
checkout(...)
}
}
stage('Build') {
steps {
sh """
echo "$Projet"
"""
}
}
}
}
thanks