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

IndexOutOfBoundsException for pipeline job

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • git-parameter-plugin
    • Git parameter plugin: 0.8.1 Jenkins: 2.79

      I have configured a pipeline job with inline Jenkins file ("Pipeline script") where the script looks similar to this:

       

      node {
        stage "Fetch"
        git 'https://github.com/user/project.git'
        sh "git clean -dxf"
        stage "Build"
        sh 'export TERM=xterm && make -j $(grep -c ^processor /proc/cpuinfo)'
        archiveArtifacts 'bin/file'
      }

       And with "Git parameter" with all default settings - just filled in the name.

       But when I use "Build with Parameters" I get the following:

       

      java.lang.IndexOutOfBoundsException: Index: 0 at java.util.Collections$EmptyList.get(Collections.java:4454) at net.uaznia.lukanus.hudson.plugins.gitparameter.scms.SCMFactory.getFirstGitSCM(SCMFactory.java:51) at net.uaznia.lukanus.hudson.plugins.gitparameter.scms.SCMFactory.getGitSCMs(SCMFactory.java:27) at net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition$DescriptorImpl.getProjectSCMs(GitParameterDefinition.java:570) at net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition$DescriptorImpl.doFillValueItems(GitParameterDefinition.java:551) at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627) at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)

       

      I also tried the "Use repository" setting but whatever I tried there so far I got "!No Git repository configured in SCM ocnfiguration" - but without any exception.

      Is what I try supported, if so do I do something wrong or is it a bug?

            klimas7 Boguslaw Klimas
            zitrax Daniel Bengtsson
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: