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

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

XMLWordPrintable

    • 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.

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

              Created:
              Updated:
              Resolved: