Skip to content

Our Testing Server

Henne Vogelsang edited this page Oct 27, 2022 · 7 revisions

We have a test instance at our disposal to test the master branch of the open-build-service git repository: https://build-test.opensuse.org

Automatic upgrade of the OBS packages

Every time code is merged on master in the open-build-service git repository, rpm packages are built locally, in the test instance.

There is a publisher hook which triggers the script /usr/local/sbin/run_update.sh every time the packages are (first built, and then) published. This is defined in /usr/lib/obs/server/BSConfig.pm with the following code:

our $publishedhook = {
  'OBS:Server:Unstable/15.4' => '/usr/local/sbin/run_update.sh',
};

The script /usr/local/sbin/run_update.sh installs the new packages.

Deploy a PR instead

Wait until our workflow has created packages.

  1. Add exit 0 as first command in /usr/local/sbin/run_update.sh to disable the script
  2. export PR_TO_DEPLOY=12345
  3. zypper ar -f -p 98 -n PR-$PR_TO_DEPLOY https://download.opensuse.org/repositories/home:/bs-team:/openSUSE:/open-build-service:/PR-$PR_TO_DEPLOY/15.4/home:bs-team:openSUSE:open-build-service:PR-$PR_TO_DEPLOY.repo
  4. zypper up --allow-vendor-change -r PR-$PR_TO_DEPLOY obs-api
  5. Run run_in_api bin/rake db:migrate:with_data or anything else you need to
  6. test...

Once you are done testing

  1. zypper rr PR-$PR_TO_DEPLOY
  2. remove exit 0 as first command in /usr/local/sbin/run_update.sh to enable the script
  3. run the script /usr/local/sbin/run_update.sh
Clone this wiki locally