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 "PTP/release engineering"

< PTP
(Changing the build type)
(Changing the build type)
Line 64: Line 64:
  
 
The build type can be modified by changing the <code>default</code> attribute of the <code>project</code> XML element in the <code>build.xml</code> script.
 
The build type can be modified by changing the <code>default</code> attribute of the <code>project</code> XML element in the <code>build.xml</code> script.
 +
 +
=== Changing the version of CDT used to compile RDT ===
 +
 +
# Modify the <code>cdtDist</code> property in <code>build.xml</code> to point to the new version.
 +
# Modify the <code>cdtCoreVersion</code> property in <code>org.eclipse.ptp.rdt.core.remotejars/build.xml</code> to the new value of the <code>org.eclipse.cdt.core</code> plugin. This is generally the same as the CDT distribution I number without the "I", but not always, so it is good to check. e.g. if the CDT distribution is <code>cdt-master-5.0.2.I200902130801.zip</code>, then the <code>cdtCoreVersion</code> will be <code>5.0.2.200902130801</code>.
 +
 +
=== Adding a new feature ===
 +
 +
# Add the new feature to the PTP master feature <code>org.eclipse.ptp.master</code>
 +
# Add entries in <code>org.eclipse.ptp.releng/maps/ptp.map</code> for the feature and all of its plugins
 +
# Add entries to the <code>tag</code> target element in <code>build.xml</code> to tag the feature and its plugins

Revision as of 15:58, 18 March 2009

Overview

Building a PTP release or interim build uses an automated headless build on build.eclipse.org. This document describes how this build is configured, and will enable you to build PTP locally.

Preparation

Check out the releng/org.eclipse.ptp.releng plugin. This plugin contains the main build scripts for PTP.

If you are building locally, you will need to download copies of the following files:

Edit build.xml and change the values of the eclipseDist, cdtDist, mylynDist, rseDist, and tauJars properties to the location of each downloaded file, respectively.

Running a headless build

The ptpbuild script in the org.eclipse.ptp.releng plugin manages the process of building PTP. It requires one argument that is the version of PTP that is being built. This version is only used to specify the location of the resulting build output files.

The following locations are used by default:

STAGING_DIR=/opt/public/download-staging.priv/tools/ptp/releng 
Main directory where the build will take place. This can be overidden by changing the value of the STAGING_DIR variable in the script.
BUILDS_DIR=/home/www/tools/ptp/builds/ptp_version 
Default location for output build files, where ptp_version is the version specified on the command line. This can be overidden by changing the value of the BUILDS_DIR variable in the script.

The ptpbuild script checks out a copy of the org.eclipse.ptp.releng project prior to the build. In order to prevent the version in CVS from being used instead of your modified local version, you will need to comment out the section of the script that does the checkout. Once you've done this, copy the org.eclipse.ptp.releng directory you checked out earlier (and modified) to the STAGING_DIR, then run ptpbuild.

Build results

On completion, a successful build will be located in a subdirectory of the BUILDS_DIR directory called I.IYYYMMDDHHMM, where YYYYMMDDHHMM is the date and time stamp for the build. This directory will contain a signed zipped copy of the master update site along with various other files. Files produced by the build include:

  • ptp-master-M.N.O-IYYYYMMDDHHMM.zip
  • RDT servers for the various operating systems
  • build.log

If the build was not successful, then there will be no corresponding subdirectory. Instead, the build.log and partial build will be located in the STAGING_DIR.

Modifying the build

Changing the build version

In order to build a different version of PTP, you need to make the following changes:

  • Modify the branchVersion attribute in build.xml (e.g. "2.1.1")
  • Modify the ptpTag in master/build.properties (e.g. "ptp_2_1")
  • Supply the new version to the ptpbuild script (e.g. "2.1.1") so that the build output goes to the correct place.

If all three versions don't match, strange things may happen.

Changing the build type

The build.xml script supports four different types of builds:

nightly (default) 
In addition to building, tags the CVS repository with the build version, signs the plugins, runs any tests, then copies the result to the BUILDS_DIR. Note that signing will only work on the Eclipse build server.
build 
Just runs the build.
testbuild 
Runs the build and tests, then copies the result to the BUILDS_DIR.
buildcopy 
Runs the build, and copies the result to the BUILDS_DIR without running any tests.

The build type can be modified by changing the default attribute of the project XML element in the build.xml script.

Changing the version of CDT used to compile RDT

  1. Modify the cdtDist property in build.xml to point to the new version.
  2. Modify the cdtCoreVersion property in org.eclipse.ptp.rdt.core.remotejars/build.xml to the new value of the org.eclipse.cdt.core plugin. This is generally the same as the CDT distribution I number without the "I", but not always, so it is good to check. e.g. if the CDT distribution is cdt-master-5.0.2.I200902130801.zip, then the cdtCoreVersion will be 5.0.2.200902130801.

Adding a new feature

  1. Add the new feature to the PTP master feature org.eclipse.ptp.master
  2. Add entries in org.eclipse.ptp.releng/maps/ptp.map for the feature and all of its plugins
  3. Add entries to the tag target element in build.xml to tag the feature and its plugins

Back to the top