Difference between revisions of "Build Workshop 3: Build Hard With A Purpose/How Build Works"

From Eclipsepedia

Jump to: navigation, search
(How CBI Builds work)
(Entry point: start.sh)
Line 17: Line 17:
 
== Process ==
 
== Process ==
 
=== Entry point:  [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.dash/athena/org.eclipse.dash.commonbuilder/org.eclipse.dash.commonbuilder.releng/tools/scripts/start.sh?root=Technology_Project&view=markup start.sh] ===
 
=== Entry point:  [http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.dash/athena/org.eclipse.dash.commonbuilder/org.eclipse.dash.commonbuilder.releng/tools/scripts/start.sh?root=Technology_Project&view=markup start.sh] ===
<source lang=xml>
+
* build up options from command line input
<!-- my comment -->
+
* small hacks for modeling projects
<xmlroot>
+
* set up commonSriptsDir and configfile variables (cleanup?)
  <myelement myattribute="Hello">World</myelement>
+
<source lang=bash>
</xmlroot >
+
commonScriptsDir=$writableBuildRoot/build/org.eclipse.dash.common.releng/tools/scripts
 +
mkdir -p $commonScriptsDir
 +
cd $commonScriptsDir
 +
configfile=$commonScriptsDir/../../server.properties
 +
</source>
 +
* set environment variables (could use a bit of cleanup)
 +
<source lang=bash>
 +
export HOME=$writableBuildRoot
 +
if [ "x$javaHome" != "x" ]; then
 +
export JAVA_HOME=$javaHome;
 +
else # use default
 +
export JAVA_HOME=$($commonScriptsDir/readProperty.sh $configfile JAVA_HOME)
 +
javaHome="$JAVA_HOME"
 +
fi
 +
export ANT_HOME=$($commonScriptsDir/readProperty.sh $configfile ANT_HOME);
 +
ANT_BIN=$($commonScriptsDir/readProperty.sh $configfile ANT_BIN);
 +
if [ "x$ANT_BIN" != "x" ]; then
 +
export ANT=$ANT_BIN
 +
else
 +
export ANT=$ANT_HOME"/bin/ant";
 +
fi
 +
</source>
 +
 
 +
 
 +
<source lang=bash>
 
</source>
 
</source>

Revision as of 09:32, 29 October 2008

Contents

How CBI Builds work

Input

Required

  1. Project ID (same as portal ex. tools.gef, technology.linuxtools) (-projectid)
  2. Version to use (-version)
  3. CVS Root for project's releng plugin (we will add SVN support soon) <-- could perhaps come from portal in future (-projRelengRoot)
  4. CVS Path for project's releng plugin (we will add SVN support soon) <-- could perhaps come from portal in future (-projRelengPath)
  5. URLs of dependencies (ex. http://download.eclipse.org/eclipse/downloads/drops/R-3.4-200806172000/eclipse-SDK-3.4-linux-gtk.tar.gz) (we will automate this more in the future) (-URL)

Optional

  1. CVS branch of org.eclipse.releng.basebuilder (-basebuilderBranch)
  2. JAVA_HOME (-javaHome)
  3. Path to a local checkout of the source (avoids checking out during build) (-localSourceCheckoutDir)
  4. Nick should probably fill in the rest with all of the options he has

Output

  1. Master zip
  2. SDK zip

Process

Entry point: start.sh

  • build up options from command line input
  • small hacks for modeling projects
  • set up commonSriptsDir and configfile variables (cleanup?)
commonScriptsDir=$writableBuildRoot/build/org.eclipse.dash.common.releng/tools/scripts
mkdir -p $commonScriptsDir
cd $commonScriptsDir
configfile=$commonScriptsDir/../../server.properties
  • set environment variables (could use a bit of cleanup)
export HOME=$writableBuildRoot
if [ "x$javaHome" != "x" ]; then
	export JAVA_HOME=$javaHome;
else # use default
	export JAVA_HOME=$($commonScriptsDir/readProperty.sh $configfile JAVA_HOME)
	javaHome="$JAVA_HOME"
fi
export ANT_HOME=$($commonScriptsDir/readProperty.sh $configfile ANT_HOME);
ANT_BIN=$($commonScriptsDir/readProperty.sh $configfile ANT_BIN);
if [ "x$ANT_BIN" != "x" ]; then
	export ANT=$ANT_BIN
else
	export ANT=$ANT_HOME"/bin/ant";
fi