Skip to content
Miguel de Alba edited this page Aug 19, 2019 · 2 revisions

Outdated

This is outdated as all the builds are now made with Eclipse Tycho.


Building releases and deployment

Definitions

  • P2 project as the project de.bund.bfr.knime.fsklab.update.p2
  • Deployment project as the project de.bund.bfr.knime.fsklab.update.p2.deploy

Categories file

The fsk_categories.xml file defines a FSK-Lab category containing the new and deprecated nodes. This file is can be found in the P2 project.

This categories file is replacing the legacy update site file site.xml. This change is due to problems with the builds where the category was not assigned when building throught the site.xml file.

Building

To start the building process the wizard can be accessed through File > Export and Deployable features inside of Plug-in Development. This wizard may appear large and intimidating but the settings provided are stored for future builds making the process fairly straightforward.

First we need to add the features to be included in the build which in our case are:

  • de.bund.bfr.knime.fsklab.feature for new nodes
  • de.bund.bfr.knime.fsklab.legacy.feature for deprecated nodes

The destination folder needs to be the location of the P2 project. Later it will explained why.

Regarding the options we need to check:

  • Package as individual JAR archives.
  • Generate p2 repository
  • Categorize repository: Allow for binary cycles in target platform

In the Categorize repository we need to reference the fsk_categories.xml file. The build starts with the Finish button.

If everything went fine now we should have features, plugins, artifacts.jar and contents.jar in our P2 project.

A longer and more exhaustive tutorial on this wizard is available at http://www.vogella.com/tutorials/EclipsePlugin/article.html#exercise-create-an-update-site-your-plug-in.

Deployment

The builds can deployed to BinTray through the deployment script in the Deployment project. In this script the following flags must be configured.

Flag Type Description
USE_PROXY boolean Whether a proxy is used; e.g. when deploying from the BfR
PROXY String Proxy host
PORT int Proxy port number
SUBJECT String Name of BinTray organization
REPO String Name of BinTray repository
PACKAGE String Name of BinTray package

Once the script is configured it can be executed as Groovy script. The script only prompts for the BinTray username and the access token. The access token can be checked on BinTray under Edit Profile > API Key.

The build is taken from the P2 project as the path is hardcoded in the script. This is the reason why in the building wizard the output of the build was saved to the P2 project, so that we would not need to change further the deployment script.

Cleaning up

After deployment, the build should be removed from the workspace manually or through the CleanBuild script in the Deployment project.