Reputation: 81
Is it possible to set the default value of a choice parameter dynamically to TRUE or FALSE through pipeline script with an input(TRUE/FALSE of that parameter itself)
So that in the next execution no need to set the default value again it should take the value from the previous execution until there is a change in choice once again.
Upvotes: 0
Views: 1231
Reputation: 14574
Yes, you can, Check the sample below.
pipeline {
agent any
parameters { booleanParam(name: 'FLAG', defaultValue: FLAG, description: '') }
stages {
stage('Build') {
steps {
script {
echo "Build"
}
}
}
}
}
Upvotes: 1