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

Error on using keychainPwd() with DSL groovy

    XMLWordPrintable

Details

    Description

      When defining the parameter keychainPwd() using groovy for describing a job using DSL, it seems with the new version cannot be done. 

      When using a string, job DSL processing shows this error:

      • Example: -->
      keychainPwd('password')

      Processing DSL script ios.groovy
      ERROR: (unknown source) No signature of method: javaposse.jobdsl.plugin.structs.DescribableContext.keychainPwd() is applicable for argument types: (java.lang.String) values: [password]

      Prior to 2.0.12 keychainPwd used a String.

      • Example: -->

       

      def keychainPwdVar = hudson.util.Secret.fromString('password')
      
      keychainPwd(keychainPwdVar)
      

      Processing DSL script ios.groovy
      ERROR: (unknown source) No signature of method: javaposse.jobdsl.plugin.structs.DescribableContext.keychainPwd() is applicable for argument types: (hudson.util.Secret) values: [password]

      In 2.0.12 keychainPwd could use a String (deprecated) or the newone Secret.

       

      I have tested all kind of possible combinations without luck. Not sure if I should define it in other way or this is a kind of bug when usind DSL.

      Attachments

        Activity

          People

            kazuhidet Kazuhide Takahashi
            dtorres_vl Diego Torres
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: