Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-74848] Issue in config.xml CannotResolveClassException: com.cloudbees.jenkins.plugins.bitbucket.MergeWithGitSCMExtension #911

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

nfalco79
Copy link
Member

@nfalco79 nfalco79 commented Nov 14, 2024

Add an alias to fix XStream serialisation

Need to add unit test with an old config.xml with
<com.cloudbees.jenkins.plugins.bitbucket.MergeWithGitSCMExtension plugin="[email protected]">

@nfalco79 nfalco79 added the bug label Nov 14, 2024
@nfalco79 nfalco79 force-pushed the feature/fix_xstream_serialization branch 4 times, most recently from 2963be9 to 9840e8c Compare November 14, 2024 12:12
…cloudbees.jenkins.plugins.bitbucket.MergeWithGitSCMExtension

Add an alias to fix XStream serialisation
@nfalco79
Copy link
Member Author

I can not able to create unit test annotated @LocalData because the config.xml provided start with flow-definition. If I put the config.xml that define the <org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject plugin="[email protected]_1f45ca_9a_"> and create the filesystem structure

  • src/main/resources/package/ClassName/testName/config.xml
  • src/main/resources/package/ClassName/testName/branches/PR-744/config.xml

The jenkins rule j.jenkins.getAllItem() an returns empty list.

I proceed with manually test

@nfalco79
Copy link
Member Author

Procedure used for the test:

  • Checkout to a commit before remove the deprecated code
git reset --hard 2e79bb32
  • Create a multi branch job test with trait "Discover pull requests from origin" configured with "Merging ... target branch" strategy.
  • Run a build of PR-744 (the pr I had active)
  • Stop jenkins
  • Checkout to the commit before this patch
git reset --hard 5b9b36e0
  • Run Jenkins
  • Check the job configuration -> seems to be, no configuration losts
  • In the "Manage Old Data" menù I found
    immagine
  • Checkout to this commit
git reset --hard d3cdb5d0
  • Run Jenkins again
  • Go to the "Manage Old Data" menù
    immagine
    Only repositoryType (expected) was available
  • Double check the config.xml of the branch job
<com.cloudbees.jenkins.plugins.bitbucket.MergeWithGitSCMExtension plugin="cloudbees-bitbucket-branch-source@999999-SNAPSHOT">
    <baseName>remotes/origin/master</baseName>
</com.cloudbees.jenkins.plugins.bitbucket.MergeWithGitSCMExtension>

@nfalco79 nfalco79 assigned nfalco79 and unassigned nfalco79 Nov 16, 2024
@nfalco79 nfalco79 merged commit 3bf7402 into master Nov 18, 2024
19 checks passed
@nfalco79 nfalco79 deleted the feature/fix_xstream_serialization branch November 18, 2024 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant