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

When specifying an invalid script path the build fails with an hard-to-read exception

    Details

    • Similar Issues:
    • Released As:
      workflow-cps 2.75

      Description

      Using a pipeline from SCM that is targetting a file that doesn't exist, the build fails immediately with the following exception.

       java.io.FileNotFoundException
       	at jenkins.plugins.git.GitSCMFile$3.invoke(GitSCMFile.java:173)
       	at jenkins.plugins.git.GitSCMFile$3.invoke(GitSCMFile.java:165)
       	at jenkins.plugins.git.GitSCMFileSystem$3.invoke(GitSCMFileSystem.java:195)
       	at org.jenkinsci.plugins.gitclient.AbstractGitAPIImpl.withRepository(AbstractGitAPIImpl.java:29)
       	at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.withRepository(CliGitAPIImpl.java:72)
       	at jenkins.plugins.git.GitSCMFileSystem.invoke(GitSCMFileSystem.java:191)
       	at jenkins.plugins.git.GitSCMFile.content(GitSCMFile.java:165)
       	at jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:335)
       	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:115)
       	at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:67)
       	at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:293)
       	at hudson.model.ResourceController.execute(ResourceController.java:97)
       	at hudson.model.Executor.run(Executor.java:429)
       Finished: FAILURE
      

      It would be much friendlier to print some valuable information in that case like "Unable to find yourinvalidfile from git https://github.com/yourorg/yourrepo"

        Attachments

          Issue Links

            Activity

            Hide
            dnusbaum Devin Nusbaum added a comment -

            A fix for this issue was just released in Pipeline: Groovy Plugin version 2.75.

            Show
            dnusbaum Devin Nusbaum added a comment - A fix for this issue was just released in Pipeline: Groovy Plugin version 2.75.

              People

              • Assignee:
                vlatombe Vincent Latombe
                Reporter:
                vlatombe Vincent Latombe
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: