pipeline {
agent any
parameters {
booleanParam(name: 'RUN_Deploy', defaultValue: false)
}
stages {
stage('Deploy') {
when {
allOf {
expression {
echo "Info - RUN_Deploy : ${params.RUN_Deploy}"
return params.RUN_Deploy
}
}
}
steps {
script {
echo 'Deploying the project'
}
}
}
}
}
The script above is my Jenkinsfile, when I push this script to github then set defaultValue to true and push to github again,
then Jenkins get notified to run the script, but it will print "Info - RUN_Deploy : false"
but when I type some dummy comment, then push to github then Jenkins get update and run script, it will print "Info - RUN_Deploy : true" successfully
I have no idea what's going on
And I can't find any information for my problem