Jenkins and plugins versions report
Environment
Jenkins: 2.387.2
OS: Linux - 5.4.0-146-generic
Java: 11.0.11 - AdoptOpenJDK (OpenJDK 64-Bit Server VM)
file-parameters:285.v757c5b_67a_c25
What Operating System are you using (both controller, and any agents involved in the problem)?
Ubuntu 20.04 and Windows 10 VMs
Reproduction steps
Scripted pipeline definition:
properties([
parameters([
base64File(name: 'myFile')
])
])
node {
deleteDir()
stage('test') {
withFileParameter(name: 'myFile', allowNoFile: false) {
echo readFile(file: myFile)
}
}
}
Expected Results
When a build is started without providing a file to the 'myFile' Job parameter, I expect the build to fail since the allowNoFile attribute is set to false.
Actual Results
The build does not fail when no file is given as a Job parameter, even though the allowNoFile argument is set to false.
However, the build fails if no parameters are declared in the Job configuration. This isn't absurd, but it's not what you'd expect from the allowNoFile argument. After all, the argument isn't called allowNoParameter.
Anything else?
No response
Jenkins and plugins versions report
Environment
What Operating System are you using (both controller, and any agents involved in the problem)?
Ubuntu 20.04 and Windows 10 VMs
Reproduction steps
Scripted pipeline definition:
properties([ parameters([ base64File(name: 'myFile') ]) ]) node { deleteDir() stage('test') { withFileParameter(name: 'myFile', allowNoFile: false) { echo readFile(file: myFile) } } }Expected Results
When a build is started without providing a file to the 'myFile' Job parameter, I expect the build to fail since the
allowNoFileattribute is set tofalse.Actual Results
The build does not fail when no file is given as a Job parameter, even though the
allowNoFileargument is set tofalse.However, the build fails if no parameters are declared in the Job configuration. This isn't absurd, but it's not what you'd expect from the
allowNoFileargument. After all, the argument isn't called allowNoParameter.Anything else?
No response