After upgrading from Bitbucket Server Integration Plugin: 3.5.0 to 4.0.0. What we see is this error randomly occurring for multi-branch pipeline job scans and the looking in the "Scan Multibranch Pipeline Log" it says this :
"ERROR: The BitbucketSCMSource has been incorrectly configured, and cannot perform a retrieve. Check the configuration before running this job again."
After researching the Jenkins Controller Server such jobs's "config.xml" and "state.xml" files shows this : plugin="atlassian-bitbucket-server-integration@3.5.0"
Instead of this : plugin="atlassian-bitbucket-server-integration@4.0.0"
So why does this occur to some jobs only and why does the jobs's config not get updated automatically with the 4.0.0 plugin configurations ?.
When this occurs all the job's history is lost as well , since it thinks its connecting for the first time to the BB SCM the build numbers also starts from 1 for all branches under that job !. This really affects our process drastically.
When we rollback to the Bitbucket Server Integration Plugin: 3.5.0 this random issue does not occur and they work as expected.
This issue appears similar to the issue reported here
Bitbucket-questions/Jenkins-SCM-Configuration-Multi-SCM-Issue/qaq-p/2576511
Bitbucket Version: 7.21.21
Jenkins Version: 2.452.2
Was able to find a work around for this issue as mentioned below :
On the Jenkins Controller Server search for all jobs's "config.xml" for the string "atlassian-bitbucket-server-integration@3.5.0", then for those jobs edit the job configuration in Jenkins UI and save it again. This will update the jobs's "config.xml" and "state.xml" file to "atlassian-bitbucket-server-integration@4.0.0" and resolve the issue.
Since then I have not seen any configuration drift in the jobs's configuration for the multi branch jobs.
I also have monitoring in place so that if this reverts back again I will be notified and will handle the issue per the steps mentioned above.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.