Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Automated ECF Build"

(Replaced content with " OLD INFORMATION REMOVED. SEE HISTORY. <br> <br>")
 
Line 16: Line 16:
  
  
     OLD INFORMATION
+
     OLD INFORMATION REMOVED. SEE HISTORY.
  
  
Line 26: Line 26:
 
<br>
 
<br>
 
<br>
 
<br>
 
 
 
 
 
 
 
 
 
 
 
 
<P><BR><BR>
 
</P>
 
<H1 CLASS="western">Introduction</H1>
 
<P>Here's Part 3 of my notes on setting up our automated build
 
system. There are a number of questions (open for discussion)
 
interspersed throughout this document.</P>
 
<P>The ECF automated build system automates two builds. We called one
 
Auto Build and the other Daily Build. Current docs spec out another
 
automated build called Nightly which is similar but not identical to
 
the Daily Build I'm describing. We'll merge the operation of Daily
 
and Nightly into one type of build and whether we call it Daily or
 
Nightly at this point does not matter.</P>
 
<P>This system will be deployed on <CODE CLASS="western">ecf2</CODE>.
 
The user interface will do more than automated builds. It will also
 
manage user-initiated builds. These user-initiated builds may include
 
Integration, Stable, Release, and Maintenance builds.
 
</P>
 
<H1 CLASS="western">User-Initiated Builds</H1>
 
<P>The downloads page on http://www.eclipse.org/ecf
 
defines these user-initiated (non-automated) build types in detail.
 
Here's a summary.</P>
 
<UL>
 
<LI><P>Integration Builds are builds that have been judged stable
 
enough to be used for integration with other eclipse projects.
 
</P>
 
<LI><P>Stable Builds are like Integration Builds but they have been
 
judged to be stable enough for most people to use ,where most people
 
means a greater user set than those integrating with other Eclipse
 
projects. Do we still need this build type? We should consider
 
merging Integration and Stable builds into the same build.</P>
 
<LI><P>Release Builds are major releases, like R1.0.0. ECF currently
 
now has a Release Candidate 2 (RC2), but not yet an official
 
release.
 
</P>
 
<LI><P>Maintenance Builds are fixes to a Release Build. They are
 
cumulative as bugs are fixed. They are merged into the next release.</P>
 
<LI><P>A release is tagged in the CVS repository as a release. What
 
is the exact string used?</P>
 
</UL>
 
<H1 CLASS="western">CVS Tags</H1>
 
<P>How do these user-initiated builds relate to CVS tags? Here's a
 
screenshot of current CVS tags for ECF. Note that the topmost tag is
 
v20070606-1500, meaning that the files associated with that tag
 
define a build made on 6/6/2007 at 15:00 hours.
 
</P>
 
[[Image:P3CVSTags.png]]
 
 
<P>This latest tag is older than the HEAD, which defines the very
 
latest ECF files available. The HEAD should always successfully
 
build. This latest tag corresponds to the files presented for
 
download. The CVS tag is embedded in the name of the zip. The text on
 
the download page identifies this download as RC2.
 
</P>
 
[[Image:P3DownLoad.png]]
 
 
<P>If you download one of those files
 
(<CODE CLASS="western">org.eclipse.ecf.sdk-20070606-1500.zip</CODE>)
 
and unzip it you see the following. Note that the jars have a version
 
string (for example <CODE CLASS="western">v20070606-1500</CODE>) that
 
indicates when they were made. Also, the feature directories contain
 
a Feature Version Suffix (randomly generated) in their names.</P>
 
[[Image:P3DLSDK.png]]
 
<P>
 
[[Image:P3DLFeatures.png]]
 
</P>
 
 
<P>When should these Feature Version Suffixes be used? You can
 
determine whether to generate them or not by setting the property
 
<CODE CLASS="western">genFVSuffix</CODE> to true or false.</P>
 
<P>The zips provided on the download page are also available through
 
the update within Eclipse. (Help --&gt; Software Updates.) Note that
 
the features have the Feature Version Sufffix.</P>
 
[[Image:P3UPFeatures.png]]
 
<P>
 
</P>
 
<H1 CLASS="western">Files Available for Download</H1>
 
<P>It appears that what we offer for download is the top of the CVS
 
tag list. Should the ECF download page also offer Integration/Stable
 
Builds, Maintenance Builds, and Daily Builds? And if so, how should
 
they be designated?</P>
 
<H1 CLASS="western">The Two Automated Builds</H1>
 
<P>These are the Auto Build and the Daily Build. Both are controlled
 
by CruiseControl. Each is a separate project.</P>
 
<P>Other than scheduling, the differences are that the Daily Build
 
after a successful build ftp's the built files and that it uses
 
different criteria for sending notification email.
 
</P>
 
<P>I don't know whether either of these builds should set the Feature
 
Version Suffix for the feature directories.
 
</P>
 
<P>Also, I noted that the Nightly Build does not include the Update
 
Site. The Update Site (Help --&gt; Software Updates) is what is used
 
to update from within Eclipse. It makes more sense for this to be the
 
latest release rather than the Daily Build. However, having two
 
Update Sites is a possibility.</P>
 
<H2 CLASS="western">Auto Build</H2>
 
<P>CruiseControl attempts an Auto Build every 30 minutes with a
 
<CODE CLASS="western">quietperiod</CODE> of 5 minutes. I gave it a
 
<CODE CLASS="western">buildType</CODE> of A for Auto. The only place
 
this <CODE CLASS="western">buildType</CODE> is used is to name the
 
directory that contains the built files. I also chose to set
 
<CODE CLASS="western">genFVSuffix</CODE>.</P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080"><FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;modificationset
 
quietperiod=&quot;300&quot;&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">      <FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;cvs
 
localworkingcopy=&quot;/home/ted/workanon/org.eclipse.ecf/plugins&quot;
 
/&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080"> 
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;/modificationset&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><BR>
 
</P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">    <FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;schedule
 
interval=&quot;1800&quot;&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">      <FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;ant
 
buildfile=&quot;cc-build.xml&quot; target=&quot;ecf.build&quot; &gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">       
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;property
 
name=&quot;buildType&quot; value=&quot;A&quot; /&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">       
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;property
 
name=&quot;genFVSuffix&quot; value=&quot;true&quot; /&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">      <FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;/ant&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">    <FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;/schedule&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><BR>
 
</P>
 
<P>Note the directory <CODE CLASS="western">A-20070610-1724</CODE>.</P>
 
[[Image:P3AList.png]]
 
 
<P>The zip contains jars that have HEAD in their names. So does jars
 
under <CODE CLASS="western">updateSite</CODE>.</P>
 
[[Image:P3ACore.png]]
 
 
<P>The Auto Build should sends no mail when it fails; When it
 
succeeds, it should send mail to ecf-build@eclipse.org.
 
Right now it appears to be sending both success and failure mail. I'm
 
not sure why. I think CruiseControl wants to send mail to whoever
 
modified the CVS repository, and I've aliased contributors to
 
<CODE CLASS="western">ecf-build</CODE>.</P>
 
 
<H2 CLASS="western">Daily Build</H2>
 
<P>CruiseControl attempts a Daily build once a day at (for now) 15:00
 
hours. I gave it a <CODE CLASS="western">buildType</CODE> of D for
 
Daily. I chose for the sake of variety not to include a Feature
 
Version Suffix.</P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080"> 
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;modificationset
 
quietperiod=&quot;300&quot;&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">      <FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;cvs
 
localworkingcopy=&quot;/home/ted/workanon/org.eclipse.ecf/plugins&quot;
 
/&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080"> 
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;/modificationset&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><BR>
 
</P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">    <FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;schedule&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">      <FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;ant
 
buildfile=&quot;cc-build.xml&quot;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">         
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">time=&quot;1500&quot;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">         
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">target=&quot;ecf.copy&quot;
 
&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">       
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;property
 
name=&quot;buildType&quot; value=&quot;D&quot; /&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">       
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;property
 
name=&quot;genFVSuffix&quot; value=&quot;false&quot; /&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">      <FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;/ant&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">    <FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;/schedule&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><BR>
 
</P>
 
<P>Note the directory <CODE CLASS="western">D-20070610-1500</CODE>.</P>
 
[[Image:P3DList.png]]
 
 
<P>If the build is successful, the zip files and update site are
 
ftp'ed to a download site. Currently,this is just another directory
 
on <CODE CLASS="western">halibut</CODE> called <CODE CLASS="western">/opt/ecf_deploy</CODE>.
 
</P>
 
<P>Note that the <CODE CLASS="western">&lt;schedule/&gt;</CODE> for
 
the Daily Build calls the ant target <CODE CLASS="western">ecf.copy</CODE>
 
which does the ftp and depends on the target <CODE CLASS="western">ecf</CODE>.
 
The target ecf is the same one called by the Auto Build, except is is
 
given a different <CODE CLASS="western">buildType</CODE> (D) in the
 
<CODE CLASS="western">config.xml</CODE> file. The target <CODE CLASS="western">ecf</CODE>
 
checks for this <CODE CLASS="western">buildType</CODE> and sets
 
<CODE CLASS="western">forceContextQualifier</CODE> accordingly.</P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080"><FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;condition
 
property=&quot;forceContextQualifier&quot; value=&quot;${timestamp}&quot;&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">  <FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;equals
 
arg1=&quot;${buildType}&quot; arg2=&quot;D&quot; /&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080"><FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;/condition&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080"><FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;java
 
classname=&quot;org.eclipse.core.launcher.Main&quot;
 
classpath=&quot;${eclipse.home}/startup.jar&quot;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><BR>
 
</P>
 
<P>In <CODE CLASS="western">config.xml</CODE>, here is how the ftp is
 
done.</P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">    <FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;onsuccess&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">     
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;antpublisher</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">         
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">antscript=&quot;/opt/apache-ant-1.7.0/bin/ant&quot;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">         
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">antWorkingDir=&quot;/opt/build.ecf&quot;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">         
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">buildfile=&quot;uploadZIP.xml&quot;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">         
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">target=&quot;deploy&quot;
 
/&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">       
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;antpublisher</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">         
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">antscript=&quot;/opt/apache-ant-1.7.0/bin/ant&quot;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">         
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">antWorkingDir=&quot;/opt/build.ecf&quot;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">         
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">buildfile=&quot;uploadUPDATE.xml&quot;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">         
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">target=&quot;deploy&quot;
 
/&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080">   
 
<FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">&lt;/onsuccess&gt;</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><BR>
 
</P>
 
<P>The ftp is just calling ant twice with to different ant files that
 
do the ftp. &lt;ftp/&gt; is an optional ant task, and for it to work,
 
you have to download and install two libraries: <CODE CLASS="western">commons-net-1.4.1.jar</CODE>
 
and <CODE CLASS="western">jakarta-oro-2.0.8.jar</CODE>. Put them in
 
<CODE CLASS="western">/opt/apache-ant-1.7.0/lib</CODE>. Get them from
 
the Apache Jakarta project.</P>
 
[[Image:P3UpdateZip.png]]
 
<P></P>
 
[[Image:P3UpdateFTP.png]]
 
 
<P>The resulting files in <CODE CLASS="western">/opt/ecf_deploy</CODE>
 
do not show HEAD but rather the datetime.
 
</P>
 
[[Image:P3ECFdeploy.png]]
 
 
<P>The <CODE CLASS="western">updateSite</CODE> is there, but should
 
be named <CODE CLASS="western">update</CODE>, not <CODE CLASS="western">updateSite</CODE>.
 
Here is a screenshot of files on <CODE CLASS="western">dev.eclipse.org</CODE>.</P>
 
[[Image:P3DevEclipse.png]]
 
 
<P>The Daily Build sends both success and failure mail to
 
ecf-build@eclipse.org. It
 
also sends mail to ecf-dev@eclipse.org.
 
During this test period, I'm only sending mail to <CODE CLASS="western">ecf-build</CODE>.</P>
 
<H1 CLASS="western">The User Interface
 
</H1>
 
<P>Remember we have two builds going on: Auto Build (the project is
 
called called <CODE CLASS="western">ecf</CODE>) and the Daily Build
 
(the project is called called <CODE CLASS="western">ecfDaily</CODE>).
 
Here's how it looks using CruiseControl's web reporting tool. I've
 
used this tool to force either of the builds.</P>
 
<P>To use the web reporting tool, you have to create a <CODE CLASS="western">war</CODE>
 
file and install it in the <CODE CLASS="western">webapps</CODE>
 
folder for TomCat and run TomCat. If you click on the project name
 
you go into a tabbed window that also displays the JMX console. To
 
run the JMX console, you must have started CruiseControl with <CODE CLASS="western">-port
 
8000.</CODE></P>
 
[[Image:P3WebReport.png]]
 
<P><BR><BR>
 
</P>
 
<P>I've also used the CruiseControl GUI. To use this GUI you must
 
start CruiseControl with <CODE CLASS="western">-rmiport 1099</CODE>.
 
</P>
 
<P STYLE="margin-bottom: 0in"><FONT COLOR="#000080"><FONT FACE="Courier 10 Pitch"><FONT SIZE=1 STYLE="font-size: 8pt">/opt/cruisecontrol-2.6.2/main/bin/cruisecontrol.sh
 
-configfile config.xml -port 8000 -rmiport 1099</FONT></FONT></FONT></P>
 
<P STYLE="margin-bottom: 0in"><BR>
 
</P>
 
<P>Then, download <CODE CLASS="western">cruisecontrol-gui-2.jnlp</CODE>
 
and open it up with FireFox. Configure a server to monitor.</P>
 
[[Image:Part3SM.png]]
 
 
<P>You can force a build by selecting a project, dropping down the
 
Projects list and choosing ForceBuild.</P>
 
[[Image:Part3SP.png]]
 
<P><BR><BR>
 
</P>
 

Latest revision as of 10:49, 6 May 2015









   OLD INFORMATION REMOVED. SEE HISTORY.






Back to the top