Osmocom Continuous Integration
Go to file
Oliver Smith 35030b7618 scripts/obs: rewrite pushing source pkgs to OBS
Harald requested that the OBS scripts should not stop if building one
specific source package fails, instead it should keep going and report
at the end a non-success exit code.

Given that the shell script code has historically grown and became hard
to maintain, I decided to rewrite the scripts for implementing this
feature. This rewrite solves additional problems:

* No full checkout of an OBS project like network:osmocom:latest
  anymore, with lots of packages that won't get updated (e.g. the uhd
  package has a uhd-images_3.14.1.1.tar.xz file that is 108 MB). With
  the old code, developers had to wait minutes during the checkout
  before the script reaches code that is currently being developed. Now
  only single packages get checked out right before they get updated.

* No need to clone git repositories over and over. With the new code,
  git repos only get cloned if needed (for latest it is not needed if
  the remote git tag is the same as the version in OBS). During
  development, the cloned git repositories are cached.

* Output from commands like "git tag -l" is not written to the log
  unless they failed. This makes the log more readable, which is
  especially important when a package fails to build, we keep going and
  need to spot the build error in the middle of the log later on.

* No more duplicated code for nightly and latest scripts that worked
  similar but had slight differences. Also the list of packages is not
  duplicated for nightly and latest anymore; nightly uses all packages
  and latest uses packages that have at least one git tag.

* Building source packages is decoupled from uploading them. A separate
  script build_srcpkg.py can be used to just build the deb + rpm spec
  source packages, without interacting with the OBS server.

* The scripts can optionally run in docker with a command-line switch,
  and this is used by jenkins. This way we don't need to install
  more dependencies on the host such as rebar3 which is now needed for
  erlang/osmo_dia2gsup.

* Add erlang/osmo_dia2gsup and run its generate_build_dep.sh (SYS#6006)

I have done the new implementation in python to make use of argparse
and to be able to use try/except and print a trace when building one
package fails.

Example output:
* https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_nightly_obs.osmocom.org/48/console
* https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_latest_obs.osmocom.org/46/console

Change-Id: I45a555d05a9da808c0fe0145aae665f583cb80d9
2022-08-01 16:29:20 +02:00
ansible ansible: Use downloads.osmocom.org instead of opensuse.org 2022-07-13 07:41:55 +00:00
contrib obs-mirror-include.txt: drop latest/Debian_9.0 2022-08-01 11:50:12 +02:00
coverity Cosmetic: coverity: how to add a new project 2022-07-13 07:47:14 +00:00
jobs scripts/obs: rewrite pushing source pkgs to OBS 2022-08-01 16:29:20 +02:00
lint lint/typedefs_osmo: add A_SEQUENCE_OF, A_SET_OF 2022-07-15 11:30:32 +02:00
qemu-kvm/ggsn-kernel-gtp update OBS Release.key; the old one expired today. 2020-03-30 18:22:59 +02:00
scripts scripts/obs: rewrite pushing source pkgs to OBS 2022-08-01 16:29:20 +02:00
.editorconfig editorconfig: new file 2022-02-11 15:44:16 +01:00
.gitignore scripts/obs: rewrite pushing source pkgs to OBS 2022-08-01 16:29:20 +02:00
.gitreview Add .gitreview 2017-06-12 18:33:33 +02:00
README.adoc OBS: add debian10 specific patch for limesuite 2020-05-25 11:47:11 +02:00

README.adoc

Scripts used for the CI handling and coverity uploads

coverity: scripts used to submit the osmocom sources for coverity scan.
This depends on these, which are not included in osmo-ci:
- a tokens.txt file in coverity/ -- see coverity/get_token.sh
- a cov-analysis-linux64-8.5.0 in coverity/
  (or the like, may need to adjust some scripts to match)

jobs: Jenkins Job Builder YAML files defining jenkins jobs. Read jobs/README.adoc
for more information about deployment.

scripts: used by jenkins jobs. Various osmo*/contrib/jenkins.sh scripts assume
osmo-ci to be checked out in the build slave user's home, i.e. using a PATH of
$HOME/osmo-ci/scripts.

obs-patches: patches to build projects for various debian distributions, e.g.
a patch for limesuite that fixes the libwxgtk3.0-dev => libwxgtk3.0-gtk3-dev
rename in control/debian for debian10. Used by osmo_obs_distro_specific_patch()
in scripts/common-obs.sh.

_docker_playground: Clone of docker-playground.git, so the scripts can build
required docker images. This dir gets created on demand by scripts/common.sh,
and automatically fetched and reset to "origin/master" (override with
$OSMO_BRANCH_DOCKER_PLAYGROUND). The fetch and reset gets skipped if
_docker_playground is a symlink. For development, set it up as follows:

 $ git clone https://git.osmocom.org/docker-playground
 $ git clone https://git.osmocom.org/osmo-ci
 $ cd osmo-ci
 $ ln -s ../docker-playground _docker_playground