I have a Jenkins build that checks code out of Mercurial. There was a situation where the Mercurial repo was corrupted and updates were failing, however Jenkins build would still continue and report Success. Is it possible to fail the Jenkins build in this case?
I have experienced a similar issue using SVN.
Assuming that Mercurial outputs a warning/error when the update fails, you can use the Text Finder plugin: https://wiki.jenkins-ci.org/display/JENKINS/Text-finder+Plugin to parse for the warning message and fail if found.
Alternatively, if Mercurial outputs a success message on successful update, you could parse for that and fail if the success message is NOT found.
Related
I set up a Jenkins job to run some integration tests. After testing finishes, Jenkins should look for test report in settings. However, it gives following error:
Recording test results
ERROR: Publisher hudson.tasks.junit.JUnitResultArchiver aborted due to exception
java.lang.NoClassDefFoundError: hudson/tasks/junit/JUnitParser$ParseResultCallable
at hudson.tasks.junit.JUnitParser.parseResult(JUnitParser.java:90)
at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:120)
at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:137)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:74)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
at hudson.model.Run.execute(Run.java:1779)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
Finished: FAILURE
Here is my Publish Junit result setting:
I checked the path for those xml files in workspace, they do exist. I'm not sure what could be wrong. My JUnit Plugin version is 1.5.
You have a version mismatch between the JUnit version in your build and the version that is loaded into Jenkins. https://issues.jenkins-ci.org/browse/JENKINS-24946 may provide some insight, but in general, you need to be very careful that the versions are compatible.
I think there is some configuration issue, somewhere in configuration it's not updating with latest version.
At some point of time you have to work with latest version.
Instead of downgrading just create a new branch of your project.
I created new branch of my project then build went smoothly although still it is failing with older branch. So better you work with latest version of JUNIt by creating new branch, jenkin will pick it automatically.
Also Wiping out Current Workspace may help
I am installing Hudson CI in Windows Server 2008. I have some issues when build are failure and these message appear..
Skipping watched dependency update for build
How to solve?
This message appears every time even when the builds are successful. I think the message is debug statement in the code so appears in the log.
I was using Hudson for doing my project builds and now planning to migrate to Jenkins.
The build server time is not in sync with the developer machines, and hence svn update does not work correctly. In Hudson, I was able to set the revision policy to HEAD, whereas its missing in Jenkins.
I searched a bit and saw that a Jira is created for this issue, but did not find a working solution for the problem.
I tried to manually install the Hudson subversion plugin in Jenkins, and the Revision policy option came up, but for some reason it caused an exception while setting the svn authentication info.
If anyone knows a solution to make this change in Jenkins, kindly reply.
Figured out. Append all SVN urls with #HEAD and svn update will happen from HEAD!
The plugin doesn't offer such feature but you might find useful this jira issue. There is a patch in the comments for that purpose. See Issue 1241.
I have installed and configured this plugin:
http://wiki.hudson-ci.org/display/HUDSON/JIRA+Plugin
In Jira I have turned ON option "accept api calls"
in Jira logs i can see that Hudson established connection
but nothing else happens, ive got test builds and they're failing but hudson doesnt report anything to jira
how to name job? how to name tests? do i need jiraID?
how to create issue that works with hudson?
how to actually tie hudson job with jira issue?
I recommend you to use this plugin: Marvelution JIRA Hudson Integration. With it I hope yo could solve your problem.
You have to install 2 different parts of the plugin, one in JIRA and another one in Jenkins (it enables a new API to allow JIRA to connect with Jenkins).
Then, you have to go to JIRA Administration, Hudson, Servers, Add Server, configure there your Jenkins server.
After that, go to Administration, Hudson, Associations, Add a Hudson Association and link your project in JIRA with your Jenkins task (a list of tasks will be shown).
Finally, you only have to go to your JIRA project's page and you'll see a Hudson tab in which you can see the integration that you need.
Jenkins cannot resolve Jira issues. It only can post comments.
Also Jenkins does not post comments in Jira issues named as tests or jobs or anything
in scans comments in commit to svn and if there is a Jira id then after build it posts comment.
This is too poor and basic functionality for me so I gave up.
I recently found this plugin:
https://wiki.jenkins-ci.org/display/JENKINS/Jira+Issue+Updater+Plugin
but I'm in the middle of a project and dont want do test it now
If you want to create issues in Jira from e.g. failed tests in Jenkins, then the JiraTestResultReporter plugin will help you. See this link.
I am currently attempting to integrate Jenkins (version 1.53+) with JIRA (v5.2) to have the i) create jira issue and ii) update jira issue capabilities. My source control is SVN and my user is configured with CROWD
Currently, I am able to only update a JIRA issue from a post-build. The key is to have the latest SVN commit message begin with '-' as the format (i.e. 'PROJECT-3' denotes issue number 3 for jira project key = PROJECT)
See the overall plugin and configuration process at this link: http://blog.dominikschadow.de/?p=313
output of jenkins updates the JIRA issue (referenced in the svn commit message as I indicated) with:i) STATUS ii)jenkins job output link iii) svn commit message and file(s) changes / removed.
I think it's a config error based on similar, but not identical answers to errors I found such as requirement 'fncache' not supported.
No idea where this is coming from, but it started happening AFTER the upgrade.
This is usually a problem with the server setup. It means the server does not return the expected answer.
Are you using static-http? (and please add the command line you are using when you get the error).
It seems that there is an old hg executable in your path. The error message comes when a client tries to acces a local repository which is created by a higher hg version.