Application packaging branches

Introduction

Application packaging branches are an advanced feature and are not required to work with redpesk.

ATTENTION: the branches and Git concepts mentioned in this chapter are specific to packaging and should not be confused with the branches of the application’s Git repositories.

In redpesk, an application can have several branches to manage packaging. Since all packaging files are stored in a Git repository, advanced users can manage multiple versions of these files.

Each branch can also be associated with specific distributions. This association can be different in different project environments. For example in project MAIN:

  • branch a can be associated with distribution 1 in project’s DEFAULT environment
  • branch a can be associated with distribution 2 in project’s DEV environment

Presentation

When an application is created in the factory, a default branch is automatically created associated with all project distributions and all packaging files are stored in a Git repository.

Typical files stored in the packaging Git include:

  • spec file
  • source archive
  • patches
  • signature
  • …

These files appear in the FILE MANAGER tab.

In most cases, modifying these files directly is enough to work with redpesk. However, if a different version of these files is needed, additional branches can be created.

Manage branches

Branch management is available in the ACTIONS tab.

branches1

The table lists branches along with their associated distributions:

  • name: branch name
  • status:
    • default — the default Git branch, new distributions will be associated to it
    • active — the branch currently displayed in FILE MANAGER and SETTINGS
  • distributions: distributions that will be built from this branch
  • actions:
    • settings — edits the distributions associated with this branch
    • delete — removes the branch

The New branch button allows you to create a branch from an existing one and assign distributions to it.

Clicking on a branch makes it the active branch.

Build

When launching a build, the packaging files used depend on the branch associated with the selected distribution.

For example:

  • dev-v1.2.10 branch files for redpesk-lts-batz-2.1-update
  • main branch files for redpesk-lts-batz-2.2-update and redpesk-lts-batz-2.0-update

This mechanism allows you to maintain different versions of the same application across distributions.

branches2

Settings by branch

Some application settings can differ between branches, such as:

  • source settings
  • build mode
  • application services

Selecting a branch switches the active branch and displays the associated configuration.

In the example below:

  • the dev-v1.2.10 branch set mustach version to 1.2.10
  • the main branch set mustach version to 1.2.9

Therefore:

  • the build for redpesk-lts-batz-2.1-update will use 1.2.10 source
  • the builds for redpesk-lts-batz-2.2-update and redpesk-lts-batz-2.0-update will use 1.2.9 source

branches3