Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-68657

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • None

      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.

            Unassigned Unassigned
            fbrychta Filip Brychta
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: