Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Teneo/Teneo Build Setup"
(→Links) |
|||
Line 3: | Line 3: | ||
This page describes the Teneo build setup. Teneo uses [[Buckminster|Buckminster]] and [[Hudson|Hudson]] for its continuous build infrastructure. | This page describes the Teneo build setup. Teneo uses [[Buckminster|Buckminster]] and [[Hudson|Hudson]] for its continuous build infrastructure. | ||
− | The | + | The Teneo Hudson job is available [[https://build.eclipse.org/hudson/job/emf-teneo-nightly here]]. |
− | + | ||
− | + | ||
− | + | ||
== Try it == | == Try it == | ||
− | + | With the current build setup it is quite easy to do a Teneo build. To download Teneo and do a build (building, testing, generating p2 site) you need to do the following steps: | |
<source lang="bash"> | <source lang="bash"> | ||
cvs -d dev.eclipse.org:/cvsroot/modeling co -d org.eclipse.emf.teneo.releng.buckminster \ | cvs -d dev.eclipse.org:/cvsroot/modeling co -d org.eclipse.emf.teneo.releng.buckminster \ | ||
Line 19: | Line 16: | ||
Note the above assumes that ant is installed and that JAVA_HOME is set to Java 5.0 or higher. | Note the above assumes that ant is installed and that JAVA_HOME is set to Java 5.0 or higher. | ||
− | After about 20 minutes you will see a | + | After about 20 minutes you will see a build folder with a number of subfolders: |
− | * build: contains the targetplatform for building the main plugins and the build workspace itself | + | * build: contains the targetplatform (the tp subfolder) for building the main plugins and the build workspace itself (the workspace subfolder) |
− | * test: contains the targetplatform for testing, the workspace contains the workspace used for the test projects. | + | * test: contains the targetplatform for testing (in the tp subfolder), the workspace subfolder contains the workspace used for the test projects. |
+ | * output: contains temporary output from the build steps. | ||
* result: contains the generation result (p2 site) and the test results. | * result: contains the generation result (p2 site) and the test results. | ||
+ | * tools: contains buckminster and the p2 director applications. These are downloaded as part of the build. | ||
The build workspace (build/workspace) and test workspace (test/workspace) can be opened in Eclipse as workspaces. | The build workspace (build/workspace) and test workspace (test/workspace) can be opened in Eclipse as workspaces. | ||
Line 28: | Line 27: | ||
== Main builds steps (build, generate, test) == | == Main builds steps (build, generate, test) == | ||
− | The | + | The build process is driven by an ant script which goes through the following steps: |
− | # build the main deliverables: | + | # download the p2 director and using the director download buckminster. |
+ | # build the main deliverables (using buckminster): | ||
## download the development projects from CVS and use them to create a workspace with a target platform | ## download the development projects from CVS and use them to create a workspace with a target platform | ||
## download/retrieve the dependencies and set them in the targetplatform | ## download/retrieve the dependencies and set them in the targetplatform | ||
Line 35: | Line 35: | ||
## build the update site | ## build the update site | ||
## create downloadable zips | ## create downloadable zips | ||
− | # build the test projects: | + | # build the test projects (using buckminster: |
## download the development test projects from CVS and use them to create a workspace with a target platform | ## download the development test projects from CVS and use them to create a workspace with a target platform | ||
## download/retrieve the dependencies and set them in the targetplatform. This includes the artifacts generated in the previous step. | ## download/retrieve the dependencies and set them in the targetplatform. This includes the artifacts generated in the previous step. | ||
## build/compile the test plugins | ## build/compile the test plugins | ||
− | # run the test cases | + | # run the test cases and convert the test results to a format which can be read by hudson |
The build itself is done by an ant script which calls buckminster to perform the above steps. The ant script also take care of copying the output (p2 site and features/plugins) and creating zip files etc. | The build itself is done by an ant script which calls buckminster to perform the above steps. The ant script also take care of copying the output (p2 site and features/plugins) and creating zip files etc. |
Revision as of 17:02, 26 February 2010
Contents
This page describes the Teneo build setup. Teneo uses Buckminster and Hudson for its continuous build infrastructure.
The Teneo Hudson job is available [here].
Try it
With the current build setup it is quite easy to do a Teneo build. To download Teneo and do a build (building, testing, generating p2 site) you need to do the following steps:
cvs -d dev.eclipse.org:/cvsroot/modeling co -d org.eclipse.emf.teneo.releng.buckminster \ org.eclipse.emf/org.eclipse.emf.teneo/releng/org.eclipse.emf.teneo.releng.buckminster cd org.eclipse.emf.teneo.releng.buckminster ant
Note the above assumes that ant is installed and that JAVA_HOME is set to Java 5.0 or higher.
After about 20 minutes you will see a build folder with a number of subfolders:
- build: contains the targetplatform (the tp subfolder) for building the main plugins and the build workspace itself (the workspace subfolder)
- test: contains the targetplatform for testing (in the tp subfolder), the workspace subfolder contains the workspace used for the test projects.
- output: contains temporary output from the build steps.
- result: contains the generation result (p2 site) and the test results.
- tools: contains buckminster and the p2 director applications. These are downloaded as part of the build.
The build workspace (build/workspace) and test workspace (test/workspace) can be opened in Eclipse as workspaces.
Main builds steps (build, generate, test)
The build process is driven by an ant script which goes through the following steps:
- download the p2 director and using the director download buckminster.
- build the main deliverables (using buckminster):
- download the development projects from CVS and use them to create a workspace with a target platform
- download/retrieve the dependencies and set them in the targetplatform
- build the software (compile etc.)
- build the update site
- create downloadable zips
- build the test projects (using buckminster:
- download the development test projects from CVS and use them to create a workspace with a target platform
- download/retrieve the dependencies and set them in the targetplatform. This includes the artifacts generated in the previous step.
- build/compile the test plugins
- run the test cases and convert the test results to a format which can be read by hudson
The build itself is done by an ant script which calls buckminster to perform the above steps. The ant script also take care of copying the output (p2 site and features/plugins) and creating zip files etc.
Structure of build projects/features
To setup the build a number of (feature) projects have been setup:
- org.eclipse.emf.teneo.releng.buckminster: contains the ant files, and the buckminster files for the build and test step. The content of this project and the buckminster setup is described in more detail below.
- org.eclipse.emf.teneo.site-feature: defines the update site and the main features it contains (Teneo Hibernate runtime and SDK and Teneo EclipseLink runtime and SDK). This project contains a buckminster.spex file to define extra dependencies (this is described in more detail below). The included features:
- org.eclipse.emf.teneo.hibernate-feature: the runtime feature, this is a standard PDE feature project (the plugins are defined in the feature.xml).
- org.eclipse.emf.teneo.hibernate.sdk-feature: the SDK feature includes the runtime feature and source feature (see below for more information on building SDK features).
- org.eclipse.emf.teneo.eclipselink-feature: the EclipseLink runtime feature, this is a standard PDE feature project (the plugins are defined in the feature.xml).
- org.eclipse.emf.teneo.eclipselink.sdk-feature: the SDK feature includes the runtime feature and source feature (see below for more information on building SDK features).
- org.eclipse.emf.teneo.tests-feature: contains the test plugins and their dependencies. The main test plugins contain test launch configurations (see below running test cases).
Buckminster Setup
The Teneo build uses Buckminster Headless.
Download buckminster
director -r http://download.eclipse.org/tools/buckminster/headless-3.6/ -d buckminster3.6M5 -i org.eclipse.buckminster.cmdline.product -i org.eclipse.buckminster.core.headless.feature.feature.group -i org.eclipse.buckminster.pde.headless.feature.feature.group -i org.eclipse.buckminster.cvs.headless.feature.feature.group
Main build project: org.eclipse.emf.teneo.releng.buckminster
buckminster.spex in PDE Feature projects
Testing
- Launch setup
- xslt script execution to process test results
Code Coverage
- change junit to emma in buckminster call
- specify xml parameter
- set hudson configuration, note value is the xml file not a pattern
- code coverage works on all the projects in the workspace, so for the current setup of Teneo it makes less sense because Teneo separates the build and test steps in separate workspaces
Solving some warnings
- [java] WARN: CVS file org.eclipse.emf/org.eclipse.emf.cdo/hibernate/org.eclipse.emf.cdo.tests.hibernate/src/org/eclipse/emf/cdo/tests/hibernate/external_model1_4.persistence.xml either contains invalid line endings on the server (CR/LF instead of just LF) or is a binary file that is not marked as -kb.
- [java] Warning: file /opt/users/hudsonbuild/.hudson/jobs/emf-teneo-nightly/workspace/build/build/workspace/plugins/org.eclipse.emf.teneo.annotations/META-INF/MANIFEST.MF,line 9: The JRE container on the classpath is not a perfect match to the 'J2SE-1.5' execution environment
[append code snippet from build file]
Links
For the Teneo setup some scripts have been re-used from the Buckminster build itself. The Buckminster releng/build project can be found here in svn.
I good tutorial on using Buckminster and Hudson to build RCP can be found here.