-
Bug
-
Resolution: Unresolved
-
Critical
-
None
-
Jenkins 2.104
Jenkins Bitbucket Branch Source Plugin 2.2.9
Bitbucket Server 5.6.0
When building a PR that hasn't had changes to the Jenkinsfile within the PR, we see the following error at the beginning of each build:
Branch event ERROR: Could not do lightweight checkout, falling back to heavyweight java.io.FileNotFoundException: URL: /rest/api/1.0/projects/TCD/repos/deployer-ish/browse/Jenkinsfile?at=PR-216&start=0&limit=500 at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getRequest(BitbucketServerAPIClient.java:628) at com.cloudbees.jenkins.plugins.bitbucket.server.client.BitbucketServerAPIClient.getFileContent(BitbucketServerAPIClient.java:867) at com.cloudbees.jenkins.plugins.bitbucket.filesystem.BitbucketSCMFile.content(BitbucketSCMFile.java:99) at jenkins.scm.api.SCMFile.contentAsString(SCMFile.java:338) at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:104) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:271) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429)
This is because Bitbucket Server does not expose the Jenkinsfile on such a PR, i.e.
// 20180203112420 // https://stash.my.com//rest/api/1.0/projects/TCD/repos/deployer-ish/browse/Jenkinsfile?at=PR-216&start=0&limit=500 { "errors": [ { "context": null, "message": "The path \"Jenkinsfile\" does not exist at revision \"PR-216\"", "exceptionName": "com.atlassian.bitbucket.content.NoSuchPathException" } ] }
This should not be an error, as if there are no changes to the Jenkinsfile, then Bitbucket will not include the file on that request.
- is related to
-
JENKINS-61493 Lightweight checkout fails in Bitbucket Server 7.0; refs/pull-requests/*/merge does not exist
- Open