Commit Graph

12 Commits

Author SHA1 Message Date
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
Oliver Smith ee7d5314fb repo-install-test: add KEEP_CACHE env var
Keep downloaded binary packages to make test cycles shorter during
development. While at it, also document all environment variables.

Change-Id: I4d6ebaf460e47f29e023acb0bd78ef52ca80c7cd
2020-05-28 09:53:22 +00:00
Oliver Smith 2774c91438 repo-install-test: integrate
Make the script run from its new location.

Related: OS#4563
Change-Id: Ib6fbc4b9487a84e0c28cd8b0622ddc2d5b1dfe14
2020-05-28 09:53:22 +00:00
Oliver Smith e6aff494a6 common.sh: add docker_images_require
Clone docker-playground.git, source its jenkins-common.sh and run
docker_images_require from there. This will make it possible to run
osmocom-release-tarballs.sh in a docker container, for which the
Dockerfile is stored in docker-playground.git.

Related: OS#3870
Change-Id: Ic4519ccb6978793054869862f8ca0e21d9cf5be4
2019-07-02 13:14:59 +02:00
Oliver Smith 0a389c4083 scripts: add osmocom-release-tarballs.sh
Generate tarball releases for all tags in all repositories.

Related: OS#3870
Change-Id: I0a904c26e1c45aa46ddc59a01b776f2c7c5f947d
2019-07-02 12:59:52 +02:00
Oliver Smith d15390302d gitignore: add nightly-3g_* (nightly OBS script)
Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a
2019-05-23 11:47:33 +00:00
Oliver Smith 15c1f80dcc Add osmocom-build-old-tags-against-master.sh
Build old releases of Osmocom programs and libraries against
"master of the day" to detect breakage.

Redirect each build's output to its own log file, so it is easy to see
what is currently getting build, and what failed. On error, print the
end of the new failing build logs, along with a note to find the full
logs in the jenkins artifacts.

This initial configuration builds the last three release tags of the
Osmocom repositories against master. The configuration can be changed
easily.

Indicate known failures with "err" instead of "ERR" in the output, do
not cause them to fail the build and do not print the beginning of the
error log (it is still in the artifacts). This way, new errors stand out
and don't get overlooked among the known errors.

Related: OS#3765
Change-Id: I7cb45cc40c9930840a3d4e6a86f39e1400478ed3
2019-03-26 15:54:38 +01:00
Oliver Smith 7fab6f5412 gitignore: add __pycache__
The osmo-depcheck script consists of multiple Python files. Python
creates a __pycache__ folder, so let's make sure that does not get
added by accident into the git repository.

Related: OS#2642
Change-Id: Ic8fb08fec1629846fc0712d6bc0b6288fbba7dc9
2018-09-20 08:11:47 +00:00
Neels Hofmeyr 41e8427732 gitignore: also ignore jenkins-jobs.ini with a dash
Some may "accidentally" use a dash when reading the README file.

Change-Id: I34877e2ba874c71b1be0079125f3662a9492a314
2017-10-30 04:43:38 +01:00
Alexander Couzens 315944495c add jenkins job builder files for osmocom-nightly-nitb-split.sh
jenkins job builder is a python library to write jenkins jobs in .yml or
.json including templating and basic substition operation.

To update the job call:
Create your own jenkins_jobs.ini based on the exmaple and call
jenkins-jobs --conf ./jenkins_jobs.ini update osmocom-nightly-nitb-split.yml

Change-Id: Ie7c655c6e0e3761e7970e479cadb5ae14faa2c1c
2017-08-15 18:11:29 +02:00
Neels Hofmeyr f215b29441 gitignore
Change-Id: Ic61c17bbabc968c8571b7c0629f3438360563975
2016-10-01 03:35:11 +02:00
Neels Hofmeyr 9ff27afd79 add gitignore
Change-Id: I5f67eee76ea40716c390e4d85e05af84a6c5f3d9
2016-09-27 02:16:31 +02:00