Skip to content

Developer Guide

Ahmed Elbahtemy edited this page Jul 14, 2019 · 28 revisions

Table of Contents

Development Environment Setup

Prerequisites

To develop Brooklin, you need to have the following dependencies installed:

  1. Gradle: https://docs.gradle.org/4.10.3/userguide/installation.html
  2. JDK 8+: https://openjdk.java.net/install/
  3. Git: https://git-scm.com/downloads
  4. Python 2.3+: https://www.python.org/downloads/

IDE

If you do not have a Java IDE set up, you can download and install the latest version of IntelliJ IDEA Community Edition for your platform at https://www.jetbrains.com/idea/download/.

Building and Testing Brooklin

  • To clone the Brooklin repository, run the following command from termina/command line:
    git clone https://github.com/linkedin/brooklin.git

Note: If you are on Windows, please replace gradlew with gradlew.bat

  • To build Brooklin and run all tests:

    ./gradlew clean build
  • To run unit tests:

    ./gradlew test
  • To release the Brooklin binaries into local Maven repository:

    ./gradlew publishToMavenLocal
  • To build the Brooklin tarball:

    ./gradlew releaseTarGz

Publishing a New Version of Brooklin

Decide the Next Version

Brooklin adheres to Semantic Versioning, i.e.

Given a version number MAJOR.MINOR.PATCH, increment the:

MAJOR version when you make incompatible API changes,

MINOR version when you add functionality in a backwards-compatible manner, and

PATCH version when you make backwards-compatible bug fixes.

Create a new release on GitHub

  1. Decide which commit to publish as the new version (in the master branch)

  2. On your local machine, open at terminal window at the root directory of your Brooklin clone. Make sure your HEAD points at the commit you chose in the previous step.

  3. Run the following command to produce the new version's tarball

# replace <new-version> with new version
./gradlew releaseTarGz -DprojectVersion=<new-version>
  1. Go to https://github.com/linkedin/brooklin/releases/ and click "Draft a new release".

  2. Type the new version in both the "Tag version" and "Release title" text boxes.

  3. Set the "Target" select box to the commit you chose in step 1.

  4. Upload the new release tarball located under the ./datastream-tools/build/distributions/ directory, to the new GitHub release.

  5. Publish the new release.

Add a new entry to Change Log

Add a new entry to CHANGELOG.md documenting the new version, release date, and all noteworthy changes.

Publish Artifacts to JFrog Bintray

  1. Sign in to Bintray at at https://bintray.com/linkedin/maven/brooklin, preferably using your GitHub account.

  2. After signing in successfully, retrieve an API key that you can use to publish Brooklin artifacts:

    • Click your account name on the upper right corner
    • Click Edit Profile
    • Click API Key on the left navigation menu
  3. Run the following commands in Brooklin's root directory to specify your publishing credentials:

export BINTRAY_USER=<your-bintray-username>
export BINTRAY_KEY=<your-API-key>
  1. Publish the new version by running:
# replace <new-version> with new version
./gradlew bintrayUpload -DprojectVersion=<new-version>

Contributing to Brooklin

  • Contributions are accepted in the form of Pull Requests.

  • Before submitting a Pull Request, please, make sure your changes are building and passing all tests with the latest code in the master branch of the Brooklin upstream repo. Please, follow the instructions on this page to learn how to sync a fork with an upstream repository.

  • Please, take a moment to read our Contribution Guidelines before submitting patches or opening issues.

Clone this wiki locally