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
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.