How to Create New Branches
This is a short document how to create a new maintenance branch for a released product.
First we need to create a new development projects in the internal and external build services.
- Create a new subproject at https://build.suse.de/project/subprojects/Devel:YaST
- Create a new subproject at https://build.opensuse.org/project/subprojects/YaST
- Add all YaST developers to the new projects, do not forget to add the
yast-teamuser (used by Jenkins for automatic submissions)
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
- Create a new
Dockerfile.*in the respective Git repository (use the previous image as a template).
- Use the new OBS repositories (created above)
- Adapt also the
.travis.ymlfile to build the new image at Travis.
Build the new Docker Images
:information_source: You need access permissions to the
organizations at the Docker Hub.
- Update the Docker Hub configuration to build the new defined 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...
Create the respective branch also in these repositories containing the Docker images:
Make sure the
Rakefile properly defines the submit target.
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.yaml file.
Creating the Branches
For creating the branch and adapting the
Dockerfile files use the
Run it in the Git checkout of the respective package.
Some packages might need a special adaptation for a new release, check the affected packages below.
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.rb helper script.
- The sync job from IBS to OBS has to be added at https://gitlab.suse.de/yast/infra.
- See the Jenkins Job Builder (JJB) documentation
- Make sure you have the JJB packages installed, run
zypper install python3-jenkins-job-builderto install it
- Testing before deploying:
jenkins-jobs --conf jenkins/ci.suse.de.ini test jenkins/ci.suse.de/ '*SP5*'
jenkins-jobs --conf jenkins/ci.suse.de.ini update jenkins/ci.suse.de/ '*SP5*'
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:
skelcd-control-leanospackage contains the SP release version in the
<full_system_media_name>tag in the control.leanos.xml file. Also check whether the
<full_system_download_url>value is correct.
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).