Usage of password parameter in a jenkinsfile throws warnings to jenkins log every minute

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Using following jenkinsfile:

      properties([
          parameters([
              password(name: 'PASSWD', description: 'Test passwd')
          ])
      ])
      node('ansible'){
          stage("Stage 1"){
              echo 'test'
          }
      }

      After running a job following warning is thrown to the jenkins log every minute:

      2022-06-01 10:39:12 WARNING hudson.util.Secret toString Use of toString() on hudson.util.Secret from java.lang.String.valueOf(String.java:2994). Prefer getPlainText() or getEncryptedValue() depending your needs. see https://www.jenkins.io/redirect/hudson.util.Secret/
      

      This should be correct usage of password parameter but it still throws a warning. When there is more jobs using this approach the jenkins log is flooded by hundreds warning messages every minute.

      Attaching plugins list.

            Assignee:
            Unassigned
            Reporter:
            Filip Brychta
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: