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

Bitbucket client fail to retrieve resource with HTTP 404 for bitbucket server

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None

      Running a pipeline cause a FileNotFoundException to be thrown after updating the Bitbucket Branch Source plugin from version 933.2.1 to >=933.3.0.

      The Jenkins instance is integrated with a Bitbucket Data Center instance and not a Cloud one.

      The file not found exception is thrown because the `pipeline_config.groovy` file is not found on the repository. The file is used by the Jenkins template engine (JTE) plugin (https://plugins.jenkins.io/templating-engine/) but it is not present in the repos because a default one is configured/provided.

      The Bitbucket branch source plugin was working correctly along with the Jenkins template engine (JTE) one for over 3 years till version 933.2.1.

      Having a brief look at the diff between 933.2.1 and version 933.3.0 reveals a lot of changes to the `com.cloudbees.jenkins.plugins.bitbucket.impl.client.AbstractBitbucketApi` class.
      The import for `java.io.FileNotFoundException` can be clearly seen along with the FileNotFound exception thrown on line 240 (the one in the logs I have attached).  Maybe, the previous behaviour was to ignore a 404 on that case.

      Attaching screenshots of the exception and the Bitbucket api endpoint called from the browser.

            nfalco Nikolas Falco
            giovannids Giovanni DS
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: