Changes

Jump to: navigation, search

User:Minooz/RepoSyncProj

2,369 bytes added, 12:45, 17 November 2010
no edit summary
=<big><big>'''Repositories' Syncing Project='''</big></big>==MercurialVersion Control Tool==* Basic Tutorial @ http://hginit.com/* '''comparing popular version control tools''' [http://martinfowler.com/bliki/VersionControlTools.html]# '''[http: //mercurial.selenic.com/ Mercurial]''' My notes on -> [[User:Minooz/RepoSyncProj/Mercurial | Min Mercurial]]#'''CVS'''#'''SVN'''#'''Git'''
==Continuous Integration System==
: *'''Comparing Different CI Systems''' -> [http://confluence.public.thoughtworks.org/display/CC/CI+Feature+Matrix CI Feature Matrix] *#'''[http://hudson-ci.org/ Hudson]''': My notes on -> [[User:Minooz/RepoSyncProj/Hudson | Min Hudson]] *#'''[http://continuumcruisecontrol.apachesourceforge.orgnet/ Apache ContinuumCruise Control]'''My notes on -> [[User:Minooz/RepoSyncProj/CruiseControl | Min Cruise Control]] *#'''[http://cruisecontrol.sourceforgebuildbot.net/ Cruise Controltrac Buildbot]''': My notes on -> [[User:Minooz/RepoSyncProj/CruiseControl Buildbot | Min Cruise ControlBuildbot]]#'''[http://continuum.apache.org/ Apache Continuum]'''*#'''Maven'''#'''[http://www.anthillpro.com/html/products/anthillos/default.html Anthill]'''
==Scripting==*1- '''Anthill[http://ant.apache.org/manual/ Ant]''' My notes on -> [[User:Minooz/RepoSyncProj/Ant | Min Ant]]:A new ant script is created e.g. ''buildHudson.xml'' that triggers the target(assign1.test) of main build file(build.xml) of the project. See below:<source lang=java><project name="assign1" basedir="." default="myTarget"> <target name="assign1.build.call"> <!-- Call the target that does everything --> <ant antfile="build.xml" target="assign1.test"/> </target> <target name="myTarget.check" depends="assign1.build.call"> <echo>The assign1.build was called!</echo> </target></project></source>*2- '''Bash''' My notes on -> [[User:Minooz/RepoSyncProj/Bash | Min Bash]]
==Challenges==*1- I was receiving an error message while trying to do a new build on Hudson. It didn'''Buildbot''':t let to clone the project on Hudson workspace. The [http://buildboterror message is "Access is denied".net/trac Buildbot] is a system So I had to automate delete the compile/test cycle required by most software projects to validate code changesproject and create a new one. By automatically rebuilding and testing Apparently one of the reasons is that Hudson doesn't let you queue the tree each time something has changedjobs. So, if you interrupt a job that is scheduled, you'll get the error message.*2- To run a bash script to build problems are pinpointed quicklythe project, before other developers there are inconvenienced by the failure2 ways: :Execute Windows Batch Command: <source lang=bash>D:\cygwin\bin\bash /home/HudsonPrac/buildHudson.sh</source>:Invoke an Ant Script<source lang=java><project name="assign1" basedir=".[http"> <target name="myTarget" > <exec executable="D:\cygwin\bin\bash" newenvironment="false"> <arg value="/home/buildbotHudsonPrac/buildHudson.netsh"/> </buildbotexec> </docstarget></currentproject></Introduction.html#Introduction]source>*3- Since the bash script is running in Windows platform through Cygwin, there are some conflicts,so the PATH was changed to: PATH=/usr/bin:$PATHRead more about some conflicts [http://buildbotcygwin.com/cygwin-ug-net/buildbot/docs/current/indexusing.html#Top Hereusing-pathnames here] is the documentation for Buildbot*4- If there was an error applying a patch to a repository e.g. <code> hg import patch12. [https:patch <//developercode>, there might be a problem with line numbers merging issue.mozillaSo, there will be an error created with this message: "Hunk #1 Failed".org/presentations/buildbot-2There are some ways to remove the hunks manually or just ignore that patch, if the later versions are fixed.01: By "hunk" I mean a "snippet of change", i.07e.mov This video]also explains different features a part of the "diff". TortoiseHg uses this systemterminology and so does darcs.– Deniz Dogan:The buildmaster is usually fed Changes by some sort of version control systemFor Hunk Failed message, which may cause builds first we need to make sure it's not applied before. Second thing to check is that bases are the same. All the revisions before that new changeset even with failed build should be runapplied before applying the successfully built change-set. As *5- If there is an uncommited message, the builds are performedscript can not work properly, various status messages are producede.g. Rev is 18+. So, which are then sent error should be displayed for the uncommited change-sets.*6- To run JUnit Tests from command line:: add the JUnit installation directory and the junit.jar file and also QTjava to the CLASSPATH. e.g. <code>CLASSPATH=".;D:\cygwin\home\java\junit3.0.1\junit.jar;C:\Program Files\java\jre6\lib\ext\QTjava"</code>: to run a sample AllTests class go to the installation directory and run: <code> java junit.textui.TestRunner junit.samples.AllTests </code>: to run NexJ AllTests do::: build the model: go to ws/core/build/ run <code> ant </code> or <code> ant -f build_JUnitTest.xml</code> :: from command line: go to any registered Status Targetsws/out/core/ run <code> java junit.textui.TestRunner nexj.core.AllTests</code> (getting error IOExcpetion) so we just ran one test file <code> java junit.textui.TestRunner nexj.core.util.[[ImageMathUtilTest</code> (We did some changes to <code> core/test/nexj/core/util</code> to practice with it) Or we can run the ant target for test:Buildbot<code> ant -f build_JUnitTest.png|thumb|none|widthpx|]]xml test </code>*7- Bugs after implementation at NexJ
:-Change Sources, which create a Change object each time something is modified in the VC Working with remote repository. Most ChangeSources listen for messages ; getting tip and log from a hook script of some sort. Some sources actively poll the remote repository on a regular basis. All Changes are fed is not as simple as moving to local repo and get all the Schedulers.:- Schedulers, which decide when builds should be performed. They collect Changes into BuildRequests, which are then queued for delivery to Builders until a buildslave is available.:-Builders, which control exactly how each build is performed (with a series of BuildSteps, configured in a BuildFactory). Each Build is run on a single buildslave.:-Status plugins, which deliver information about the build results through protocols like HTTP, mail, and IRC.*Common Requirements:At a bare minimum, you'll we need the following for both the buildmaster and a buildslave::-Python: http://www.python.org Buildbot requires python-2.4 or later.:-Twisted: http://twistedmatrix.com (Twisted is an event-driven networking engine written in Python and licensed under the MIT license.):Requirements for Buildmaster:-sqlite3: http://pypi.python.org/pypi/pysqlite::The sqlite3 package is required for python-2.5 and earlier (it is already included in python-2.5 and later, but the version in python-2.5 has nasty bugs):-simplejson: http://pypi.python.org/pypi/simplejson::The simplejson package is required for python-2.5 and earlier (it is already included as json in python-2.6 and later):-Jinja2: http://jinja.pocoo.org/2::Jinja2 is a general purpose templating language and is used by Buildbot to generate the HTML output.
==To Learn==: NexJ Internal repo has several branches, and when cloning and pulling, we just needed to mention it as a default branch, to not to confuse revision numbers and latest changesets.: Since the decimal part of the revision number will keep changing from computer to computer, it was preferred to use the global hex chagesetID (GUID).: So, the first big change was adding this command to get the list of latest changesets up to the tip:: [[User:Minooz<code>hg log ${IntDir} -r ${PrevRev}: -b default --template '{node}\n'</RepoSyncProj/Ant | Min Ant]]code>: This number will also be added to the commit summary while importing the patch from Internal repo
1
edit

Navigation menu