How to Create New Branches (original) (raw)

This is a short document how to create a new maintenance branch for a released product.

FIXME: a more up to date information has meanwhile appeared in https://github.com/yast/helper\_scripts/blob/master/github/maintenance\_branch/README.md We must merge the info and keep it in one place.

OBS/IBS Setup

First we need to create a new development projects in the internal and external build services.

Then we need to synchronize the OBS and IBS packages. This is done automatically by the yast-obs-sync-* jobs in the internal Jenkins. The jobs are defined in the sync-jobs.yaml file.

The Old Docker Setup

This older Docker setup is used for the older products, from SLE-12-SP2 to SLE-15-SP1 (included). For the newer products see the instructions below.

Define the new Docker Images

Git Repositories

Build the new Docker Images

:information_source: You need access permissions to the yastdevel and libyuiorganizations at the Docker Hub.

Images

The New Docker Setup

Since SLE-15-SP2 we use the new Docker images built directly in the OBS.

You need to create the images and the containers build targets in OBS and configure them to properly build the expected result in the project config:

%if "%_repository" == "images"
Type: kiwi
Repotype: none
Patterntype: none
%endif

%if "%_repository" == "containers"
Type: docker
Repotype: none
Patterntype: none
%endif

The Base Image

We need to create the base image for the new branch. Either reuse the TW image or check the OBS templates for the respective Leap release version:

Note: We should build the base image locally, the official Leap images might be dropped or disabled at some point, SLE has much longer lifetime...

Git Repositories

Create the respective branch also in these repositories containing the Docker images:

Make sure the Rakefile properly defines the submit target.

Jenkins Jobs

The changes in the Git repositories above should be automatically submitted by the Jenkins jobs to OBS. When adding a new branch we need to add a new job for it.

See the yast-ci-* jobs at https://ci.opensuse.org/view/Yast/, defined in the yast-jobs.yamlfile.

Creating the Branches

For creating the branch and adapting the Rakefile and Dockerfile files use thecreate_maintenance_branch script. Run it in the Git checkout of the respective package.

Some packages might need a special adaptation for a new release, check the affected packagesbelow.

To get the list of the packages packages which needs to be branched you might query the IBS like this:

(osc -A https://api.suse.de ls SUSE:SLE-15:GA; osc -A https://api.suse.de ls SUSE:SLE-15-SP1:GA) \
| grep yast | sort -u

Note: you need to list all previous service packs including the original GA release, the SP repositories only contain the updated packages, the unchanged packages are inherited from the previous releases.

Enabling Branch Protection

The newly added branches should be protected by GitHub (to avoid force pushes, accidental branch removal and enforce code reviews). To do this globally use the protect_branches.rbhelper script.

Jenkins Setup

Modifying Specific Packages

Some packages might contain a release specific data. Ideally we should avoid that but here are listed some exceptions which need a special care:

Translations

For new branches where translations are required the SUSE Localization Team has to be informed. Also when branching cause that master is no longer in sync with the last SLE SP, Jenkins job syncing translations needs to be modified at https://gitlab.suse.de/yast/infra/-/merge\_requests/74/diffs#432aa131b22a799c7a568113cf2ce645b0930a75\_29\_31 (internal link only).