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

Not able to use git, sh, pwd etc in active choice parameter script

XMLWordPrintable

      git, sh groovy scripts generated by pipeline script generator are not working in active choice parameter. The same work in pipeline script.
      For example following groovy script:
      git branch: 'branch', credentialsId: 'gitCred', url: 'https://some.ur.com/somthing.git'
      gives exception groovy.lang.MissingMethodException: No signature of method: Script1.git()

      sh "ls" would give exception groovy.lang.MissingMethodException: No signature of method: Script1.sh()

      Same exception is thrown while using pwd(), node() in active choice parameter groovy script.

      Note that in pipeline script everything works as expected.

            kinow Bruno P. Kinoshita
            bipulr Bipul Raj
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: