-
Bug
-
Resolution: Unresolved
-
Blocker
-
None
When setting a default value for a password parameter from shared library code, we get the warning "Unknown parameter(s) found for class type 'hudson.model.PasswordParameterDefinition': defaultValue" in the build log .
As an example, the Jenkinsfile:
#!/usr/bin/env groovy @Library('<git-branch-name>')_
passwordUse()
shared library, vars/passwordUse.groovy:
def call() { stage('Show parameters') { echo "test_password : " + params.test_password } stage('Add password parameter') { properties([ parameters([ password(name: 'test_password', defaultValue: 'default_password', description: 'test password') ]) ]) } }
The warning in the build log:
[Pipeline] stage [Pipeline] { (Add password parameter) [Pipeline] properties (hide) WARNING: Unknown parameter(s) found for class type 'hudson.model.PasswordParameterDefinition': defaultValue [Pipeline] } [Pipeline] // stage