Skip to content

Liberty Development 101

Adam Yoho edited this page Jun 11, 2021 · 5 revisions

Liberty Development 101

"I know what you're thinking, 'cause right now I'm thinking the same thing. Actually, I've been thinking it ever since I got here: Why, oh why, didn't I take the blue pill?"

Purpose of this page

  • Act as a starting point for developers new to working on Open Liberty

Table of Contents

Prerequisites

  • Open Liberty Development

    • Explains how to install the software needed for development, how to set up the open-liberty repository, and how to build the code. Also contains a link to Open Liberty's contributing guidelines.

Repository structure

The following image depicts the relationship between the Git repositories we use for development:

Upstream/Origin

Repo type: Remote repository. Hosted by GitHub.

Purpose: Official repository of the Open Liberty product. All of the code that makes up the Liberty runtime resides here. Developers that want to use Liberty can clone this repository and then build and run the product on their own. The Open Liberty downloads are built using the code in this repository.

You will not typically push any code to this repository.

Fork

Repo type: Remote repository. Hosted by GitHub.

Purpose: A repository hosted on GitHub for you to push your code changes to. You create this by forking the official Open Liberty repository. Whenever you want to contribute code to Open Liberty, you'll push your code to this fork. From there, you'll be able to open pull requests to merge code into the upstream repo.

Clone/Local

Repo type: Local repository.

Purpose: A repository that exists only on your machine. You create this by cloning the official Open Liberty repository onto your machine. This is where all of your development will take place. You'll create branches, edit code, and commit changes all in this repository. Once your changes are done (or if you just want to save them remotely), you'll push them to your fork.

Development flow

The high level steps for doing pretty much anything are:

  1. Create a new branch in your local repo
  2. Edit code
  3. Commit your code changes
  4. Push your branch to your fork
  5. Open a pull request to merge your code
  6. Submit a personal build
  7. Merge your code

There are nuances to each step that depend on what exactly you're trying to do, but the overall flow is pretty much always the same.

The Delivery Process wiki goes into more detail about these steps.

Writing code

Product code

Unit tests

FAT tests

Clone this wiki locally