Skip to content

OBS Major Release HOWTO

Björn Geuken edited this page Jan 30, 2018 · 55 revisions

How do we release?

Prepare the github repository

  1. Create a new branch for the release, eg. '2.9'
  2. Protect the git version branch
    • Go to the 'Settings' tab
    • Select 'Branches' from the list menu
    • Choose the newly created branch
    • Enable the 'Protect this branch' checkbox and save
  3. Commit the changes to the git version branch
  4. Add a new ReleaseNotes-$VERSION file in the root of the git version branch

Configure hakiri

  1. Go to the hakiri configuration page.
  2. Click on 'Follow Branch' button for the newly, created branch.

Create the stable project

  1. Get our stable project meta example.

    wget https://raw.githubusercontent.com/openSUSE/open-build-service/master/dist/stable_project_meta.xml.example
    
  2. Adapt the example file. Basically replace $VERSION with the major version and check that the openSUSE/SLE versions it builds against are the latest ones.

  3. Create the project using the meta file

    osc meta prj -e OBS:Server:$VERSION:Staging -F stable_project_meta.xml.example
    

Create the staging project

  1. Get our staging project meta example.

    wget https://raw.githubusercontent.com/openSUSE/open-build-service/master/dist/staging_project_meta.xml.example
    
  2. Adapt the example file:

    • Replace $VERSION with the major version and check that the openSUSE/SLE versions it builds against are the latest ones.
    • Change the project description to reflect that this is a development project (or an alpha/beta release):
    This is the development version 2.9 of OBS.
    
  3. Create the project using the meta file

    osc meta prj -e OBS:Server:$VERSION:Staging -F staging_project_meta.xml.example
    
  4. Copy the prjconf file from OBS:Server:Unstable and apply the needed modification

    osc meta prjconf OBS:Server:Unstable > prjconf_$VERSION
    
  5. Apply the current prjconf

    osc meta prjconf OBS:Server:$VERSION:Staging -F prjconf_$VERSION
    
  6. Adjust the project conf, eg. remove checks for repositories and architectures we don't support in our stable release.

Create the obs-server package and dependencies

  1. At least we will need the following packages to build obs-server correctly

    deltarpm libarchive libmemcached memcached perl-BSSolv perl-Devel-Cover perl-common-sense perl-Diff-LibXDiff perl-File-Sync perl-GD perl-JSON-XS perl-Socket-MsgHdr phantomjs containment-rpm-docker obs-signd createrepo build ruby-common ruby2.4 rubygem-bundler rubygem-gem2rpm rubygem-hoe rubygem-rake-compiler yum sphinx travis-deps nodejs obs-server
  2. Copy those packages from Unstable

    osc copypac OBS:Server:Unstable $PACKAGE OBS:Server:$VERSION:Staging
    

Adopt the obs-server package and get it building

  1. Checkout obs-server package to have it locally

    osc co OBS:Server:$VERSION:Staging obs-server
    
  2. Change the versionformat and revision inside the _service file to $VERSION

    <service name="obs_scm" mode="disabled">
      <param name="versionformat">$VERSION~pre.git%cd.%h</param>
      <param name="revision">$VERSION</param>
      ...
    </service>
  3. Copy the changelog file from the previous version. So for example, for 2.9 we use 2.8:

    osc cat OBS:Server:2.8 obs-server obs-server.changes > obs-server.changes
    osc addremove
    
  4. Create a changelog entry from the ReleaseNotes-$VERSION file:

    osc vc obs-server.changes
    
  5. Check in the changes and make it build

    osc ci
    osc r -v OBS:Server:$VERSION:Staging obs-server
    

Add rubygem package dependencies

  1. Get an list of rubygem package dependencies:

    docker-compose run --rm --no-deps frontend script/rubygem_package_names.rb > rubygem_dependencies.txt
    
  2. Use that list to copy those dependencies from the Unstable project:

    for PACKAGE in `cat rubygem_dependencies.txt`; do osc copypac OBS:Server:Unstable $PACKAGE OBS:Server:$VERSION:Staging; done
    

Create the OBS-Appliance package

  1. At least we will need the following packages, and its dependencies, to build obs-server correctly:

    OBS-Appliance OBS-Appliance-docker OBS-Appliance-qcow2 OBS-Appliance-vdi OBS-Appliance-vmdk apache2-mod_xforward changelog-generator-data rubygem-passenger rubygem-changelog-generator
    
  2. Copy the appliance packages from Unstable:

    osc copypac OBS:Server:Unstable $PACKAGE OBS:Server:$VERSION:Staging  
    

Adopt the appliance and get it building

  1. Checkout the OBS-Appliance package:

    osc co OBS:Server:$VERSION:Staging OBS-Appliance
    
  2. Set the version tag inside the OBS-Appliance.kiwi file to $VERSION:

    <version>$VERSION</version>
    
  3. Set the version in the repository section inside the config.sh file with the correct $VERSION:

    #======================================
    # Add Default Repositories
    #--------------------------------------
    zypper ar http://download.opensuse.org/distribution/leap/42.3/repo/oss/                  openSUSE:Leap:42.3
    ...
    zypper ar http://download.opensuse.org/repositories/OBS:/Server:/$VERSION/openSUSE_42.3/ OBS:Server:$VERSION
  4. Check in the changes and make it build:

    osc ci
    osc r -v OBS:Server:$VERSION:Staging OBS-Appliance
    

Enable openQA for the appliance

  1. Add a new "Medium type" in openqa.opensuse.org with the name of the new version. You need admin rigths in openQA. For example, for version 2.9:

    Distri	Version	Flavor	  Arch	Settings	Actions
    obs	2.9	Appliance  	x86_64	
    
  2. Add a new line to (or adjust) the dist/schedule-obs.sh script with the new version to be tested. Have a look at openQA-Setup for locating the script.

  3. In our openQA setup we currently install some packages from OBS:Server:$VERSION. To make sure that these packages are available run osc release OBS:Server:$VERSION:Staging.

Integration tests

Release the staging project

  1. Release the staging project with osc release OBS:Server:$VERSION:Staging

    • Wait until the staging project gets released.
  2. Write a mail like this to our public mailing list.

  3. Consider writing a blog post on our blog.

  4. Tag the released code. Add a -beta suffix for beta releases.

    git fetch upstream
    git checkout upstream/$VERSION
    git tag -a $NEW_VERSION
    git push upstream $VERSION --tags
  5. Update description of OBS:Server:$VERSION.

Clone this wiki locally