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

          dtorres_vl Diego Torres created issue -
          dtorres_vl Diego Torres made changes -
          Field Original Value New Value
          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: -->

          {code:java}
          keychainPwd('password'){code}
          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: -->

           
          {code:java}
          def keychainPwdVar = hudson.util.Secret.fromString('password')
          keychainPwd(hadson.util.Secret.fromString("password"))
          {code}
          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.
          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: -->

          {code:java}
          keychainPwd('password'){code}
          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: -->

           
          {code:java}
          def keychainPwdVar = hudson.util.Secret.fromString('password')
          keychainPwd(keychainPwdVar)
          {code}
          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.
          dtorres_vl Diego Torres made changes -
          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: -->

          {code:java}
          keychainPwd('password'){code}
          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: -->

           
          {code:java}
          def keychainPwdVar = hudson.util.Secret.fromString('password')
          keychainPwd(keychainPwdVar)
          {code}
          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.
          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: -->

          {code:java}
          keychainPwd('password'){code}
          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: -->

           
          {code:java}
          def keychainPwdVar = hudson.util.Secret.fromString('password')

          keychainPwd(keychainPwdVar)
          {code}
          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.
          kazuhidet Kazuhide Takahashi made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          kazuhidet Kazuhide Takahashi made changes -
          Assignee Kazuhide Takahashi [ kazuhidet ]
          kazuhidet Kazuhide Takahashi made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]

          People

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

            Dates

              Created:
              Updated:
              Resolved: