!!!!DRAFT!!!!!

Introduction

Some projects find it useful to automatically apply new patches to the source tree in order to give feedback to the contributor on things that can be fixed prior to a committer looking at the patch. For example, some projects may not accept a patch if it does not come with unit tests. This page describes how to hook in this functionality to the ASF's build server (Jenkins)

Setup

  1. Create a Jenkins Job called PreCommit-NAME-Build where NAME is a unique identifier (e.g. PreCommit-HADOOP-Build). It is likely easiest to simply copy an existing one.

  2. Hook up the appropriate pieces in your build and then make sure that piece is called from your Jenkins Job. For instance, the Hadoop build calls an ant target named hudson-test-patch
  3. Test out your build by hand
  4. TODO:
  5. Ask on builds@a.o to add your JIRA filter to the PreCommit-Admin job (TODO: validate this)

Troubleshooting

Background

From Nigel Daley who did all the original work to get this setup:

I revamped the precommit testing in the fall so that it doesn't use Jira email anymore to trigger a build.  The process is controlled by
https://builds.apache.org/hudson/job/PreCommit-Admin/
which has some documentation up at the top of the job.  You can look at the config of the job (do you have access?) to see what it's doing.  Any project could use this same admin job -- you just need to ask me to add the project to the Jira filter used by the admin job (https://issues.apache.org/jira/sr/jira.issueviews:searchrequest-xml/12313474/SearchRequest-12313474.xml?tempMax=100 ) once you have the downstream job(s) setup for your specific project.  For Hadoop we have 3 downstream builds configured which also have some documentation:
https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/
https://builds.apache.org/hudson/job/PreCommit-MAPREDUCE-Build/
https://builds.apache.org/hudson/job/PreCommit-HDFS-Build/

Resources

Mailing List: builds@apache.org

Jenkins: http://builds.apache.org

PreCommit-Admin: https://builds.apache.org/hudson/job/PreCommit-Admin/

PreCommitBuilds (last edited 2011-05-18 19:33:56 by GrantIngersoll)