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

I can't use selectedValue and useRepository for git parameter job-dsl-plugin

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • job-dsl-plugin
    • None
    • Dev and QA

      Hello,

      I am using a DSL groovy script to create Jenkins job of Git Parameter.

       

      DevJenkinsJobs.groovy:

      gitParam('sha') {
                  description('sha sha')
                  type('BRANCH_TAG')
                  branch('.*')
                  tagFilter('*')
                  sortMode('NONE')
                  defaultValue('master')
                  //selectedValue('NONE')
                  //useRepository('https://github.com/xxxx/xxxxxxxxx-xxx-xxxx')
                }

      The last two commented lines are failing with error.
      No signature of method: javaposse.jobdsl.dsl.helpers.GitParamContext.selectedValue() is applicable for argument types: (java.lang.String) values: [NONE]


      No signature of method: javaposse.jobdsl.dsl.helpers.GitParamContext.useRepository() is applicable for argument types: (java.lang.String)

      I cannot find much help online and found https://github.com/jenkinsci/job-dsl-plugin/blob/master/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/GitParamContext.groovy and it seems jenkins currently support just
      String description
      String type = 'TAG'
      String branch
      String tagFilter
      String sortMode = 'NONE'
      String defaultValue

      I can't seems to be see selectedValue and useRepository. This is some what urgent to fix in our environment and your help is greatly appreciated.

          [JENKINS-49438] I can't use selectedValue and useRepository for git parameter job-dsl-plugin

          Sreeni Gadila created issue -
          Daniel Spilker made changes -
          Resolution New: Not A Defect [ 7 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Daniel Spilker made changes -
          Priority Original: Critical [ 2 ] New: Minor [ 4 ]
          Sreeni Gadila made changes -
          Resolution Original: Not A Defect [ 7 ]
          Status Original: Resolved [ 5 ] New: Reopened [ 4 ]
          Sreeni Gadila made changes -
          Comment [ Hello - This is not resolved, I can't use this in DSL and it is giving me the error
          No signature of method: javaposse.jobdsl.dsl.helpers.GitParamContext.useRepository() is applicable for argument types: (java.lang.String)
          for both below lines of groovy script.
                  selectedValue()
                   useRepository()
          Please advise If I am not using right method. ]
          Sreeni Gadila made changes -
          Sreeni Gadila made changes -
          Comment [ Hi Daniel,
           Please review my last two comments, I have double checked and it is not working. ]
          Sreeni Gadila made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Reopened [ 4 ] New: Resolved [ 5 ]
          Daniel Spilker made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]
          Daniel Spilker made changes -
          Link New: This issue is duplicated by JENKINS-55469 [ JENKINS-55469 ]
          Daniel Spilker made changes -
          Link New: This issue is duplicated by JENKINS-63172 [ JENKINS-63172 ]

            daspilker Daniel Spilker
            gadilasr Sreeni Gadila
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: