Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Jenkins Jira Interaction Error by SVN

1121 November 20, 2024 edited

Hello everyone,

 I have installed Jenkins plugin in Jira Cloud .Cloud plugin in Jenkins is installed as well and tested connection is ok.

What I didi in Jenkins is make a freestyle  project with SVN.First use SVN to update ,then use batch command to build ,then added Send build information to Jira.

 

Btw,Jenkins is on our local servers.

 

However there is error in below report. Could you pls help to tell me how to fix it?Many thanks

 

 

 

 

ERROR: Build step failed with exception
java.lang.ClassCastException: class hudson.scm.SubversionSCM cannot be cast to class hudson.plugins.git.GitSCM (hudson.scm.SubversionSCM is in unnamed module of loader jenkins.util.URLClassLoader2 @79a7b5d3; hudson.plugins.git.GitSCM is in unnamed module of loader jenkins.util.URLClassLoader2 @26737485)
	at com.atlassian.jira.cloud.jenkins.util.FreestyleBranchNameIssueKeyExtractor.extractIssueKeys(FreestyleBranchNameIssueKeyExtractor.java:29)
	at com.atlassian.jira.cloud.jenkins.buildinfo.service.FreestyleJiraBuildInfoSenderImpl.lambda$getIssueKeys$1(FreestyleJiraBuildInfoSenderImpl.java:56)
	at java.base/java.util.Optional.orElseGet(Optional.java:364)
	at com.atlassian.jira.cloud.jenkins.buildinfo.service.FreestyleJiraBuildInfoSenderImpl.getIssueKeys(FreestyleJiraBuildInfoSenderImpl.java:54)
	at com.atlassian.jira.cloud.jenkins.buildinfo.service.JiraBuildInfoSenderImpl.sendBuildInfoToJiraSite(JiraBuildInfoSenderImpl.java:104)
	at com.atlassian.jira.cloud.jenkins.buildinfo.service.JiraBuildInfoSenderImpl.lambda$sendBuildInfo$1(JiraBuildInfoSenderImpl.java:76)
	at java.base/java.util.Optional.map(Optional.java:260)
	at com.atlassian.jira.cloud.jenkins.buildinfo.service.JiraBuildInfoSenderImpl.sendBuildInfo(JiraBuildInfoSenderImpl.java:74)
	at com.atlassian.jira.cloud.jenkins.buildinfo.freestyle.FreeStylePostBuildStep.perform(FreeStylePostBuildStep.java:81)
	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:47)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:818)
	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:767)
	at hudson.model.Build$BuildExecution.post2(Build.java:179)
	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:711)
	at hudson.model.Run.execute(Run.java:1925)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
	at hudson.model.ResourceController.execute(ResourceController.java:101)
	at hudson.model.Executor.run(Executor.java:442)
Build step 'Send build information to Jira' marked build as failure
[ATLASSIAN CLOUD PLUGIN] [WARN] Not a WorkflowRun, onCompleted() won't be propagated to listeners
Finished: FAILURE

1 answer

1 accepted

2 votes
Answer accepted
Mark Rekveld - Marvelution
Atlassian Partner
November 20, 2024

Hi @1121 

Welcome to the community.

Looking at your error you are dealing with 2 issues of the official Jenkins integration app. First the app only supports Jenkins Pipeline jobs, and it looks like you are using a Freestyle job. Second the app only supports Git for version control.

Maybe someone from the official app team can chime in on if there are any plans to support freestyle jobs and SVN. I have seen the request to support Freestyle jobs before.

If you are keep to integrate Jenkins with Jira Cloud then you can opt to use the Original Jenkins integration app, Jenkins Integration for Jira, disclaimer, I'm the maintainer of the app.

Feel free to give it a spin and reach to me if you have any questions.

Cheers,
Mark

1121 November 20, 2024

Hello Mark

Thanks a lot. Btw, does your app support SVN? Our project is under SVN version control.

Mark Rekveld - Marvelution
Atlassian Partner
November 21, 2024

Hi @1121 

Yes, my app uses the JSON API of Jenkins that provides a system agnostic view of the version control commits and messages.

Cheers,
Mark

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
atlassian, team '25, conference, certifications, bootcamps, training experience, anaheim ca,

Want to make the most of Team ‘25?

Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.

Learn more
AUG Leaders

Upcoming Jira Events