Skip to content
This repository has been archived by the owner on Oct 20, 2018. It is now read-only.

Release and Build Process

hmalphettes edited this page Jun 16, 2011 · 3 revisions

tycho-p2-scripts follow 4 phases process during a release. Each phase can be executed independently from each other. They can be executed all at once in the proper order by invoking:

$P2_RELEASE_HOME/release.sh

Phase 1: compute the environment and build parameters

$P2_RELEASE_HOME/compute-environment.sh   --> generates --> computed-build-environment

Pull and checkout the configured GIT_BRANCH if it is specified. It produces the file computed-build-environment in which each one of the parameters for the build, deployment and release is stored. In particular: the build number, the version, the groupId, the incremented build number, the base folder where the p2 repositories are deployed.

Each of the subsequent phases will load this file. This allow us to debug the build parameters and re-execute each one of the subsequent phases without having to restart the build from the beginning.

Phase 2: invoke the build

$P2_RELEASE_HOME/build.sh

The script loads the build parameters. The script detect the type of build: maven-tycho, composite repository, pure buildr, aggregated build The script invokes the corresponding build tool. For maven tycho:

mvn clean verify #don't deploy or install, there is no point installing p2 repositories zip in maven

All build outputs are staged inside the build’s workspace: nothing is copied to the final location.

Phase 3: deploy

$P2_RELEASE_HOME/build.sh

The script loads the build parameters. The script detects the type of builds. According to the type of build, the script locates the built repositories and copies them in

${HTTPD_ROOT_PATH}/{$groupId_path}${optional_repositorySuffix}/${BRANCH}/${completeVersion}

The script creates the symbolic link ‘current’ inside

${HTTPD_ROOT_PATH}/{$groupId_path}${optional_repositorySuffix}/${BRANCH}/current

So that current -> ${completeVersion}

Phase 4: source control and build number management

$P2_RELEASE_HOME/sourcecontrol-tag

The script loads the build parameters. Update the pom.xml or Buildfile with the incremented build number. Commit that in the branch. Tag with

${GIT_BRANCH}_${completeVersion}

Push to the ‘origin’ repository.