Jenkins Clover Plugin Developer Guide

Preconditions

  • You have GitHub account with SSH keys configured and the local SSH key is not protected by password (otherwise release:prepare will hang)
  • Configure maven.jenkins-ci.org in settings.xml:

    settings.xml
    <!-- user/password of your Jenkins account http://jenkins-ci.org/account -->
    <server>
        <id>maven.jenkins-ci.org</id>
        <username>xxxxxx</username> 
        <password>yyyyyy</password>
    </server>
  • Clone the repository from GitHub using SSH:

    git clone git@github.com:jenkinsci/clover-plugin.git jenkins-clover-plugin
  • You have JDK1.6+ installed
  • You have Maven 3.0.5+ installed

Build and test

  1. If you have already cloned jenkinsci/clover-plugin then ensure you git pull upstream

  2. Create a JIRA on https://issues.jenkins-ci.org/ for the issue you are fixing.
  3. Make changes necessary. Use issue key in commit messages.
  4. Bump the dependency version of Clover Core if necessary (in pom.xml)
  5. Test by running Jenkins with the Clover plugin installed and setting up a "Clovered" project for CI. This can be achieved via:
    mvn clean hpi:run
    1. it will start Jenkins on localhost:8080 by default, open it in web browser
    2. open "Manage Jenkins" > "Manage plugins" > "Installed" and check if new "Jenkins Clover Plugin" is listed
    3. configure new project (you can use MoneyBags as a test case) and a build job (e.g. "freestyle project" with "ant task")
    4. configure "Post-build actions" > "Publish Clover Coverage Report" in the build job
    5. run "Build now" and check if Clover summary report is available
  6. Commit changes and push to GitHub. Include your JIRA issue from above.

Release and publish

Run release:prepare and release:perform in one command:

mvn release:prepare release:perform

Verify that the plugin has been deployed:

Documentation

Update the  http://wiki.jenkins-ci.org/display/JENKINS/Clover+Plugin page.

Troubleshooting

Problem with 'git clone' on Windows

See https://help.github.com/articles/generating-ssh-keys and https://help.github.com/articles/error-permission-denied-publickey how to set it up.

The 'git push' during mvn 'release:prepare' hangs

Probably it hangs on ssh due to id_rsa key protected by a password.

 

Last modified on Oct 24, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.