[
https://issues.apache.org/jira/browse/BIGTOP-1249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14306173#comment-14306173
]
Konstantin Boudnik commented on BIGTOP-1249:
--------------------------------------------
BTW, there's a sorta working Precommit jobs on builds.apache.org. Here how it
[works|https://builds.apache.org/view/H-L/view/Hadoop/job/PreCommit-Admin/]
The implementation reminds me of a contraption a little bit, but the idea is
good: just use a filter to select project's ticket in "Patch Available" state
and then do what needs to be done. Incidentally, I was playing with this idea
of Ignite CI and this piece of Groovy seems be to be doing just what's needed:
{code}
/**
* Parsing a special filter from an Apache project JIRA and picking up latest
by ID
* attachments to process.
*/
final ATTACHMENT_URL = "https://issues.apache.org/jira/secure/attachment"
def jirasAttached = [:]
def JIRA_FILTER =
"https://issues.apache.org/jira/sr/jira.issueviews:searchrequest-xml/12330308/SearchRequest-12330308.xml?tempMax=100&field=key&field=attachments"
def rss = new XmlSlurper().parse(JIRA_FILTER)
rss.channel.item.each { jira ->
println jira.key
def latestAttr = jira.attachments[0].attachment.list().sort {
[email protected]()
}.reverse()[0]
jirasAttached[jira.key] = "${latestAttr.@id}/${latestAttr.@name}"
}
{code}
given, that you need to provide your own filter.
> Umbrella JIRA: Pre-commit hooks and automated Patch validation
> --------------------------------------------------------------
>
> Key: BIGTOP-1249
> URL: https://issues.apache.org/jira/browse/BIGTOP-1249
> Project: Bigtop
> Issue Type: Improvement
> Components: build
> Affects Versions: 0.7.0
> Reporter: jay vyas
> Labels: hackathon
> Fix For: 0.9.0
>
>
> Lets automate some of the review process.
> - It will be good to add in some pre-commit hooks which check for ASF
> boilerplate on all files and trailing whitespace.
> - It will be also nice if the build server can run "mvn compile" and some
> other basic validation on the code base every time a patch is submitted,
> similar to the way apache hadoop is doing.
> I say lets start small: Maybe on the upcoming hack day in denver we can glue
> the basic JIRA monitoring together with a simple bash script, and iterate
> from there.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)