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
Split the OBS related jenkins jobs into two, one that uploads to the
new obs.osmocom.org and one that uploads to build.opensuse.org.
Set an alias for "osc" that sets the right server, and set the
expand_aliases shopt so the bash scripts that source common-obs.sh will
not ignore the alias.
Related: OS#5557
Change-Id: Ib271e16e93ebc58ed1ecb0ea881e1f1370e40928
Uploading to network:osmocom:* should only be done when these scripts
are running in the Osmocom jenkins. Remove the default and require users
of the script to explicitly set PROJ.
Related: SYS#5370
Change-Id: If49ce217e77716b63dfde9139e869672a54b66a2
Make sure that we don't test yesterday's packages. Adjust timers to run
the OBS job around 1 o'clock, and the debian-install test around 4
o'clock. Use the H (hash) symbol for minute to spread the load.
Change-Id: I503058018172d50e9585d4804dfec1b4ece7644a
I was quite surprised, that the job used "osmith/pdfs-in-doc-subpackage"
instead of "master" today [1]. Fix this randomness by adding a branch
parameter that defaults to "master".
Interestingly, we have to set the default branch to
"refs/remotes/origin/master". When using "*/master" (like we do in other
jobs), Jenkins would still chose my branch over "origin/master", even
though mine does not have "master" in the name. I have also tried
"chosing-strategy: 'default'", in case it was using the gerrit strategy
for some reason (like in [2]), and setting 'refspec:', but both did not
have any effect.
[1] https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_nightly/98/
[2] https://issues.jenkins-ci.org/browse/JENKINS-26981
Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf
Add the links that the obsolete Osmocom_nightly_packages job has, before
we remove it. Also link to the binary packages wiki page.
Change-Id: Idbc7ccd0156d9c3eb6d30059384686849a36f49f