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

Orion/Releng Builds

< Orion
Revision as of 15:49, 11 January 2012 by John arthorne.ca.ibm.com (Talk | contribs) (masterBuild.sh)

The Orion builds follow many of the same practices used by the Eclipse Platform Project. The builds are based on PDE/Build and run automatically on build.eclipse.org via cron job.

There is only one kind of build. Integration builds run daily from tagged repository versions. Map files are used to specify where a project is located in the repository and what version of that project to use in the build. The map files are located in the org.eclipse.orion.releng project. The builder itself performs the tagging so all the latest changes in "master" stream are picked up by every build. No manual tagging by committers is required.

Contributing changes to the build

Contributing to a build is easy, just commit your code to the master stream of the Orion repository and it will be included in the next integration build.

Setting up your workspace

  1. See Orion/Getting the source for instructions on how to set up your workspace to work with Orion source code.
  2. Import 'org.eclipse.orion.releng' into your workspace. It is located in the org.eclipse.orion.server.git repository under the releng folder.

Contributing your changes

Once you have made code changes, you can contribute them to the Integration build as follows:

  • Commit your changes to the local repository and push them to the master
git commit -a -m "fix lots of bugs"                   #commits all changes
git push                                              #push local commits to the master

How the build works

Bootstrap

The build is kicked off by a "bootstrap" script that is not under version control. The only purpose of this script is to fetch the real build script and invoke the build. The script is located at:

/opt/buildhomes/e4Build/bootstrap.orion.sh 

The build type is passed as an argument. -I means integration build (with tagging). -N is equivalent but does not perform any tagging (in both cases the contents of master are used to perform the build).

You can also pass an -email argument to cause the build notifications to only be sent to an individual. This is useful for test builds:

bootstrap.orion.sh -I -email bob_mackenzie@example.com

The bootstrap script is typically invoked by a cron entry in the e4Build user account. For example here is a cron entry to start a build every Wednesday at 8:55am:

55 08 * * Wed /opt/buildhomes/e4Build/bootstrap.orion.sh -I

Invoke "crontab -e" to edit the cron entries (using vi), or "crontab -l" to simply list them.

masterBuild.sh

The bootstrap fetches and invokes the main build script, called masterBuild.sh. This script is under version control, so you need to push any changes to this script into the master branch for them to take effect. If you scroll to the very bottom of this script you can see the steps it performs:

tagRepositories # perform auto-tagging of the Orion git repositories
updateRelengProject # fetch latest from Orion releng project (our scripts and maps)
updateBaseBuilder # fetch the PDE builder to use in the build
setProperties # various initialization steps
runBuild # invoke the PDE build
runTests # invoke client and server tests
publish # send results email

build log

The results of the build, including any failures from any step, can found found in the build log at:

/shared/eclipse/e4/orion/logs/current.log

This is the first place to check when the build fails. It is typically very long so it is often helpful to use tail to start near the end. This exact same log gets copied into the download directory so it is available for reference for any build we produce. For example:

/home/data/httpd/download.eclipse.org/orion/drops/I201201110855/buildLog-I20120111-0855.txt

Deploying builds to orion.eclipse.org or orionhub.org

Builds are deployed using the script deploy.sh. This script should be copied to your home directory and run from there. Your home directory will contain a symlink to the downloads directory, so you can perform a deploy directly from the downloads area. The script takes a single argument which is the location of the zip containing the download. For our servers we want the Linux 64-bit build. It is useful to log the output of this script so it can be reviewed later. Example:

./deploy.sh -archive downloads/orion/drops/I20120110-2230/eclipse-orion-I20120110-2230-linux.gtk.x86_64.zip >> deploy.log

This script simply copies the build onto the deployment server, and invokes an upgrade script on that server - upgrade.sh. The upgrade script shuts down the old server, moves it, unzips and configures the new build, and finally starts it.

The entire deploy/upgrade process takes about 5 seconds when it runs smoothly. Occasionally there will be a communication error copying the new build onto the target machine. In this case simply re-running the script usually succeeds.

FAQ

Back to the top