bitbucket-push-and-pull-request-plugin
bitbucket-push-and-pull-request-plugin copied to clipboard
Cannot invoke "java.net.URL.getProtocol()" because "baseCommitLink" is null
We are upgrading from Bitbucket Push and Pull Request 2.8.3 to 3.1.2.
In our test development environment, it triggers the job however, it appears to be failing due to "java.net.URL.getProtocol()". It appears that the bitbucket administrators do not allow cloning over https. It is my guess that I may need to use the Propagation URL; however I can not find any documentation on what should be put in there.
Can anyone assist in helping me determine if this is a configuration issue, or an actual issue with the plugin.
2024-10-31 17:47:15.947+0000 [id=108] INFO i.j.p.b.p.BitBucketPPRPayloadProcessorFactory#createProcessor: Create BitBucketPPRPullRequestServerPayloadProcessor
2024-10-31 17:47:17.098+0000 [id=238] INFO i.j.p.b.common.BitBucketPPRUtils#lambda$matches$2: Matched branch:
2024-10-31 17:47:17.099+0000 [id=238] INFO i.j.p.b.common.BitBucketPPRUtils#lambda$matches$2: Matched branch:
2024-10-31 17:47:17.100+0000 [id=238] INFO i.j.p.b.BitBucketPPRTrigger#scheduleJob: Commit passed to git: 859b5b1bd27f8fc4c9c5b99535c80dab4d6c971d
2024-10-31 17:47:23.499+0000 [id=238] INFO i.j.p.b.BitBucketPPRTrigger#scheduleJob: Triggering on_pull_request_event # 2
2024-10-31 17:47:23.507+0000 [id=238] INFO i.j.p.b.o.BitBucketPPRObservable#notifyObservers: Event: BitBucketPPRBuildStarted [context=BitBucketPPREventContext [scmTrigger=hudson.plugins.git.GitSCM@61eb63d5, run=bitbucket_webhooks/<random_repo>/on_pull_request_event #2, action=BitBucketPPRPullRequestServerAction, filter=io.jenkins.plugins.bitbucketpushandpullrequest.filter.pullrequest.server.BitBucketPPRPullRequestServerTriggerFilter@56ac4b3c, userRemoteConfig=null => ssh://git@bitbucket.<random_company>.com:7999/<random_project>/<random_repo>.git (null), url=ssh://git@bitbucket.<random_company>.com:7999/<random_project>/<random_repo>.git, trigger=io.jenkins.plugins.bitbucketpushandpullrequest.BitBucketPPRTrigger@47ccd31b[]], handler=null] for observer io.jenkins.plugins.bitbucketpushandpullrequest.observer.BitBucketPPRPullRequestServerObserver@50d516af
2024-10-31 17:47:23.508+0000 [id=238] INFO i.j.p.b.e.BitBucketPPRBuildStarted#runHandler: Cannot invoke "java.net.URL.getProtocol()" because "baseCommitLink" is null
After reviewing the code base, I added https://bitbucket.<random_company>.com to the Propagation URL in the System Configuration; however I continue to get the baseCommitLink is null.
P.S.
I had to sanitize the output above and inserted <random_company>, <random_project>, and <random_repo> to place of the actual values.
@mumblingMac DId you restart Jenkins after setting the propagation URL?
I have this inside the Configuration as Code under the unclassified: section
bitBucketPPRPluginConfig:
credentialsId: "bitbucket-ci-token"
notifyBitBucket: true
propagationUrl: "https://bitbucket.<random_company>.com"
useJobNameAsBuildKey: false
However, it doesn't seem to be loading the configuration upon start up.