git - Is there any way to get Phabricator to push diffs to a repository? -


our team has started experimenting using phabricator code reviews.

apart phabricator, have test-system automatically builds , tests code pushed specific branch on our main git repo. there way arc diff automatically push diff specific branch? tests take couple of hours, , prefer if possible people review code while being tested. somehow integrated unit test not have complete before diff sent fo review?

the purpose of arc diff allow tests/code review performed without landing code on branch. here through herald rules, harbormaster build plans, , jenkins.

when diff created/updated, herald rule watching repo triggers harbormaster build plan triggers jenkins via http post request. try detail out basics but, recommend looking @ additional materials build process, if choose go route.

please note - harbormaster listed "prototype". meaning, there limited support it. but, aside writing own custom code, there no other way i'm suggesting here.

i hope have enough here started. crafting specific needs require more detail side. do, , works us. hope works you.

setting test job

the test job have parameterized can pass diff , build id in parameter.
inside test, pull code in diff:

#!/bin/bash # clean branch git fetch --all git checkout master git reset --hard origin/master git pull  # delete arcpatch branch (ignoring error if branch doesn't exist) git branch -d arcpatch-d$diff || true  # apply patch arc patch d$diff  # update dependencies git submodule update composer install 

then trigger usual tests. after tests, need code see update phabricator build results:

#!/bin/bash # let phabricator know if build succeeded if [ -n "$phid" ];    export path=$path:~/bin/arcanist/bin    if [ {{{code determine failure}}} ];       jsonresult="{\"buildtargetphid\":\"$phid\",\"type\":\"fail\"}";    else       jsonresult="{\"buildtargetphid\":\"$phid\",\"type\":\"pass\"}";    fi    echo $jsonresult | arc call-conduit harbormaster.sendmessage; fi 

review code

meanwhile, developers can reference diff (http://{phabricator.url}/d####), review code, , can run tests following similar process test job doing above.

herald rule

the herald rule trigger on differential revisions. looking whatever indicates change wanting test (usually in particular repo) , run build plan (please see additional references on how create build plan links jenkins if use).

additional references:

http://www.guywarner.com/2014/05/integrating-jenkins-and-phabricator.html http://www.guywarner.com/2014/06/part-2-integrating-phabricator-and.html


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -