Commit Graph

1333 Commits

Author SHA1 Message Date
Oliver Smith a779121725 scripts/repo-install-test: fix sftp compat
When running scp, Debian 12 uses the SFTP protocol by default instead of
the legacy SCP protocol. For some reason, this means it doesn't create
the /repo-install-test directory inside QEMU:

  + … scp … -r scripts/repo-install-test root@127.0.0.1:/repo-install-test
  Warning: Permanently added '[127.0.0.1]:22793' (ED25519) to the list of known hosts.
  scp: realpath /repo-install-test: No such file
  scp: upload "/repo-install-test": path canonicalization failed
  scp: failed to upload directory scripts/repo-install-test to /repo-install-test

Changing to the legacy protocol with "scp -O" would make it work again,
but instead of doing that add the mkdir so it works with the new
protocol too.

Related: OS#6186
Change-Id: I740affad2ea794094c8faa89a89bcad094e0075d
2023-10-20 12:19:30 +02:00
Oliver Smith 48b3edb0cc scripts/tarballs: create release dir if missing
Fix for:
rsync: [Receiver] change_dir#3 "/downloads/home/releases/web-files/gapk" failed: No such file or directory (2)

Change-Id: I46310d633302028d486dd356147c9c4f35b24940
2023-10-19 11:37:53 +02:00
Oliver Smith 7fbb49f87d scripts/tarballs: add osmo-fl2k, rtl-sdr
Closes: OS#6226, OS#6225
Change-Id: Idff299c65902b6818e409a409a3d303e8fccc4f9
2023-10-19 11:09:43 +02:00
Oliver Smith 5597e82d55 scripts/tarballs: add gapk
Closes: OS#6227
Change-Id: I6f26b6f5953701b383acb3b93058b66a286f7989
2023-10-19 11:07:06 +02:00
Oliver Smith 4e0a34b26e scripts/common: osmo_git_last_commit…: add vars
Add variable names for $1, $2, $3 so the logic is easier to follow.

Related: OS#6227
Change-Id: I7abbcefc8d5bd4c5b84c30a7e38ca3dcb855dd56
2023-10-19 11:07:06 +02:00
Oliver Smith a498ca6f2a scripts/tarballs: add osmo-e1-recorder
Closes: OS#6228
Change-Id: I6bd8387f99c258226125b33705645c43aadd875f
2023-10-19 11:02:18 +02:00
Oliver Smith 4e3b7babda ansible: qemu: netcat -> netcat-openbsd
Make the ansible rule compatible with debian 12. The same package is
already in debian 11 and debian 10.

Fix for:
  E: Package 'netcat' has no installation candidate

Change-Id: Idcc90ad7a2a104a9b4f5a76c6c89d74604651530
2023-10-19 07:30:20 +00:00
Oliver Smith 367f550da9 ansible: jenkins: debian: add more packages
Add python3-setuptools, as it is needed to run the
update-osmo-python-on-slaves jenkins job.

Add bc, as it is needed in docker-playground.git's network_create() in
jenkins-common.sh.

Related: OS#6186
Change-Id: I1ff0711b7b29ba4dc78f51f257b986d7a0994a96
2023-10-19 07:30:20 +00:00
Oliver Smith 7edd780403 ansible: jenkins: debian: sort packages
Related: OS#6186
Change-Id: If4ce784821cc40a2e795afafa452c99bf0588253
2023-10-19 07:30:20 +00:00
Oliver Smith 6d4b0effa6 jobs/update-osmo-*: add build4-deb12build-ansible
Related: OS#6186
Change-Id: I1f732718df87ed3b850332dbf1a7f6b2f854f280
2023-10-19 07:30:20 +00:00
Oliver Smith 119bc1f44a ansible: jenkins: use default-jre-headless
Use default-jre-headless instead of giving the openjdk version, so we
don't need to adjust it to whatever the current version in debian is.

The default-jre-headless package is at least available since debian 10:
https://packages.debian.org/search?suite=buster&arch=any&searchon=names&keywords=default-jre-headless

Related: OS#6186
Change-Id: I6c5c74ff3d75dca2f89765d95c4b4c6d67ace703
2023-10-19 07:30:20 +00:00
Oliver Smith 7d90d5b17f ansible: jenkins: debian: remove qemu package
This is a dummy package that isn't available anymore in debian 12.

https://packages.debian.org/buster/qemu says:
> This package can safely be removed.

We install qemu-user-static and qemu-system-arm, which contain qemu
binaries.

Related: OS#6186
Change-Id: I4d5bd376b1e370d9636b9a2e9e710f5f20b9ae98
2023-10-19 07:30:20 +00:00
Oliver Smith 89c0b50a08 ansible: hosts: add build4-deb12build-ansible
Related: OS#6186
Change-Id: Ia4ce2ab074941dda6b7c820673108d19d4136664
2023-10-19 07:30:20 +00:00
Pau Espin 7be78df106 jobs/ttcn3-testsuites.yml: Add ttcn3-epdg-test
Related: OS#6204
Change-Id: I4b566c1e767c7a6d6cb474a257b0a2632a2afe92
2023-10-18 12:29:16 +02:00
Oliver Smith 45de5a99d9 ansible: known_hosts: update
After deploying with ansible to the jenkins nodes, these entries were
added.

Change-Id: I3e3841d9f1f5581067b7dd90cdfcaf8337700e6f
2023-10-16 11:25:12 +02:00
Oliver Smith 81b714b636 ansible: hosts: remove gtp0-deb(10,11)build
Remove nodes that don't exist anymore according to:
https://jenkins.osmocom.org/jenkins/computer/

Change-Id: I8e8ae59d4e4c8be85bba527ac89cce04b15fcaea
2023-10-16 11:21:56 +02:00
Oliver Smith 975edb5099 ansible: ttcn3: install netcat-openbsd
Make nc available on jenkins nodes running ttcn3 tests, as it is now
used by ttcn3-hss-test-ogs.

Related: docker-playground Iebeefd9689ae2efa54678b99ff929ca255ec64d1
Change-Id: I397d4fe33813b083b61cdabb1d00ab4ea63a456b
2023-10-16 11:17:34 +02:00
Pau Espin 35a1155a42 jobs/ttcn3-testsuites.yml: Add ttcn3-hss-test-ogs
Related: SYS#6588
Change-Id: Ic98a5a22b2c10b32052e613d0a46fbc7640c60d9
2023-10-10 19:26:08 +02:00
Oliver Smith 15777116dd obs: build_binpkg: no network during build
Simulate that we don't have network during package builds in gerrit
verifications, like it is the case when the packages will be built by
OBS.

I've also considered using network namespaces via "unshare -n" or
bubblewrap, but it wouldn't be possible to create a loopback device
inside the network namespace inside docker (maybe with --privileged, but
not worth it) and e.g. the osmo-mgw tests rely on lo.

Depends: osmo-epdg I2bb0b5f608cd5d9a24c2a367425c524447bd002c
Change-Id: I00282552e9988d66fdc269c6230f0e1432ace360
2023-10-06 14:05:51 +02:00
Oliver Smith 2e809f4637 jobs/master-builds: add erlang projects
Add the erlang projects found in gerrit-verifications to master-builds
too, as we have it with most other Osmocom projects.

Change-Id: I6cf5a3c1e52ee73ad63eb2d7d5b1af19a9809026
2023-10-06 08:21:48 +00:00
Oliver Smith 193e2a4ce6 jobs/master: use same url scheme as gerrit jobs
Make it easier to copy entries from gerrit-verifications.yml to
master-builds.yml by using the same url schema in both.

Change-Id: Ibe992dd8027a8b8df8623abc57a590972443449f
2023-10-06 08:21:48 +00:00
Oliver Smith f8e2ee24ed obs: srcpkg: support having no git tags
Instead of failing when a project has no git-version-gen script, and no
git tags, use 0.0.0 as version. This is needed for the new osmo-epdg
project, which doesn't have tags yet.

Change-Id: I2f0f409feb96611095dfa511a33ea730e5bbf3e4
2023-10-05 18:05:41 +02:00
Pau Espin 76a67bc8d7 obs: Fix typo in log line informing variable to be modified
Change-Id: I381f30ad2443bbd86a23d2808a5f8e3c650953b7
2023-10-05 17:36:42 +02:00
Pau Espin 325162a1fe obs: add erlang/osmo-epdg to projects_osmocom
Change-Id: I5c5537e2d96752cb68fb251552bd444a9abf8cd1
2023-10-05 17:36:42 +02:00
Oliver Smith 3f037f4a73 obs: srcpkg.py: Run generate_build_dep.sh for all projects
Adjust srcpkg.py to run a generate_build_dep.sh not only for
osmo_dia2gsup, but for any Osmocom project that has such a script. This
is in preparation for osmo-epdg, which will also have one.

Change-Id: Icd9dc734ec938398668640f77ec83aae4a1ee0f4
2023-10-05 17:35:02 +02:00
Pau Espin 9b9b2a2780 jobs/gerrit-verifications: Add osmo-epdg
Change-Id: I84accfc5065ed2e780c4ecb77885af61bc6fb72f
2023-10-05 16:22:49 +02:00
Oliver Smith b206b2f1d2 scripts/docker-cleanup: remove containers > 24h
Remove containers starting with jenkins- or having ttcn3 in the name, if
they have been running for more than 24 hours. This can happen with the
ttcn3 testsuites, as they typically start multiple docker containers in
the background (one per Osmocom program) before they start the testsuite
docker container in the foreground. Usually the clean up trap makes sure
that all containers get killed, but we have seen that a few containers
have been running for a few months. One reason for this could be
temporary loss of connection between the jenkins server and the node
running the job.

Extend the clean script to remove the containers that were not properly
removed by the clean up trap.

Historically we used to kill docker containers of the same name before
starting a testsuite, but this had the downside that we could not start
the same testsuite multiple times in parallel. This was refactored in
docker-playground Ifcd384272c56d585e220e2588f2186dc110902ed.

Change-Id: I58c17b57c998eaba411658e83b7295d7cfcf9a23
2023-10-04 17:53:51 +02:00
Oliver Smith 25db4a639e ansible/util/known_hosts: new file
Add the known hosts file that ansible creates.

Change-Id: Ibef171ac2de5193c2335d4d28ef9347cc88b4c49
2023-09-20 11:09:14 +02:00
Oliver Smith 9aab3f54ad ansible: increase docker_max_image_space
The purpose of the limit is to remove images that are not being used in
a long time. With the current limit of 40 GB it leads to images being
removed just a few hours after they were last used, resulting in lots
of needless rebuilds. Also unexpected errors with images that we just
assume to be there (debian-bookworm-build).

Increases the limit for the nodes that run most of the jobs to 80 GB.

I have verified that the nodes have enough free space.

Related: OS#6183
Change-Id: I8cfb21a86510e43b8347c7f17159575b695ce9ba
2023-09-20 11:06:49 +02:00
Oliver Smith 1e748b38a4 OBS: add git tag pattern for wireshark
Since previous patch 62693be1 ("OBS: fix generating wrong limesuite
version"), the scripts rely on having the correct pattern for the tag
in the config. Add the pattern for wireshark.

Fix for:
  fatal: No tags can describe '6d412b991d8c2f50b7854611b1a9ef567bab9962'.

Change-Id: Ic8e83b4d5d897cb6b94b04b1232486288f3a1f9b
2023-09-18 10:41:41 +02:00
Oliver Smith 9df253bb34 repo-install-test: skip soapysdr-module-lms7
Fix for:
  dpkg: error processing archive /tmp/apt-dpkg-install-4OjX3P/0924-soapysdr0.8-module-lms7_22.09.1+dfsg-1+b2_amd64.deb (--unpack):
   trying to overwrite '/usr/lib/x86_64-linux-gnu/SoapySDR/modules0.8/libLMS7Support.so', which is also in package soapysdr0.7-module-lms7:amd64 22.09.1.17.4828.202309142026

Change-Id: I51f3541c62edc78842d4c461362dd8e5ea2f5d94
2023-09-15 10:46:51 +02:00
Oliver Smith 62693be148 OBS: fix generating wrong limesuite version
Instead of using git-version-gen in all git repositories, only use it
where it is part of the repository. Use git directly to build the
version string otherwise. To fix generating the wrong version string for
limesuite, use "git describe --tags" instead of "git describe" as in
git-version-gen. This is needed because limesuite releases > 20.01 only
have lightweight (non-annotated) tags.

Fix for:
  limesuite: WARNING: version from changelog (22.09.1-1) is higher than
  version based on git tag (20.01.0.182-4828.202309140026), using
  version from changelog (git tag not pushed yet?)

Change-Id: I00d97d5cd12b2938a002d3e5c8ada6503f976e36
2023-09-14 15:40:53 +02:00
Oliver Smith 774347c25b jobs/master-builds: add osmo-python-tests
Run contrib/jenkins.sh of osmo-python-tests once a day from master too,
not only from gerrit verifications.

Change-Id: I164553d0948549d60c45b8840716c608463dc486
2023-09-13 16:11:29 +00:00
Oliver Smith 03cb833746 jobs: update trigger timers
Ensure we trigger building new OBS packages first, then wait plenty of
time until the binary packages are available (and run jobs in the
meantime that don't need them), and only after that we run the jobs
that need the binary packages.

Otherwise TTCN3 jobs may test the packages from the previous day, and
some jobs may fail completely due to packages not being completely built
yet. For example, yesterday the new Osmocom CNI releases were tagged,
which means the :latest packages also need to be rebuilt (-> building
all OBS packages takes longer). The osmocom-release-manuals and
-tarballs jobs failed, because the new binary packages were not
available yet when they ran.

Change all timers to the format "H 20 * * *" to have a deterministic
hour and semi-random minute based on the job name.

Change-Id: Ib68f9a78bae27a63706a8c95715bf6a244b7bf1d
2023-09-13 16:11:29 +00:00
Oliver Smith 757d58710b OBS: keep going if version can't be parsed
Don't crash in Osmocom_OBS_wireshark because the version can't be
parsed.

Fix for:
  packaging.version.InvalidVersion: Invalid version: '4.1.1rc0.238'

Change-Id: I0cf6c7c2d5939dccc14107f0a8c15593ea8bc4c2
2023-09-13 15:00:38 +02:00
Oliver Smith f453e35022 scripts: wireshark: remove laforge/doc-fixes
The two patches from this branch have been upstreamed:
15ed53005b

And with recent changes to docs/README.dissector, git fails to detect
that these are already applied.

Fix for:
  CONFLICT (content): Merge conflict in doc/README.dissector

Change-Id: I17017ba396996e781250d30406193c4f5ec44f82
2023-09-13 14:38:04 +02:00
Oliver Smith 3970487882 OBS: don't downgrade version in debian/changelog
Fix the bug that the version in debian/changelog could get lowered if a
release was made and the release git tag was not pushed yet.

Fixes: OS#6173
Change-Id: I550ed10a60c863626d870e35034028f0bd066211
2023-09-12 17:31:45 +02:00
Oliver Smith d27ba27a55 OBS: exit() -> sys.exit()
As pointed out in code review, sys.exit() should be used instead of
exit() from site.

https://docs.python.org/3/library/constants.html#exit says:
> The site module (which is imported automatically during startup,
> except if the -S command-line option is given) adds several
> constants to the built-in namespace. They are useful for the
> interactive interpreter shell and should not be used in programs.

Change-Id: Ia9d355e660afd1ad3c60064900d8be66e8e1d385
2023-09-08 11:09:39 +02:00
Oliver Smith 10d7aedfeb OBS: build_binpkg: support debian:testing
Change-Id: I71de94ef34c3ccc3610643bd8861b78cccd266a5
2023-09-08 11:09:39 +02:00
Oliver Smith 1b66903ddb jobs/osmocom-obs-sync: new job
Related: OS#6165
Change-Id: Ibcf02eb5feee2b314ff28861835040c21aea4294
2023-09-08 09:06:57 +00:00
Oliver Smith 4cfe5d42b5 OBS: add sync_obs_projects.py
Add a new script that syncronizes base distributions from openSUSE's
OBS, like Debian:12. This is done by getting  "meta" and "prjconf" from
the source OBS, adjusting it and writing it to our OBS instance.

The motivation for this is making our OBS more resilient, by using these
synchronized projects we can build packages even if the openSUSE OBS API
is not reachable.

Related: OS#6165
Change-Id: I00122f7819ba682cb791c370d781377cfb302629
2023-09-08 09:06:57 +00:00
Oliver Smith aa2e3cc5c0 OBS: lib/osc: add private proj variable
Adjust lib/osc.py to take the OBS project from a global variable that
can be set with lib.osc.set_apiurl(), instead of using
lib.args.obs_project. Move the sanity check to set_apiurl().

This is in preparation for adding a new sync script, which will operate
on multiple OBS instances.

Related: OS#6165
Change-Id: Iabb871bcb432f2fbdaec9cbcab3d663ccf969901
2023-09-08 09:06:57 +00:00
Oliver Smith 18c730fc10 OBS: build_srcpkg.Dockerfile: use bookworm
rebar3 is in debian bookworm's repositories, hence it is not needed
anymore to use osmocom:latest here.

Change-Id: Iddd0295ee928fc9a47d4d206e414b78a2561d13d
2023-09-08 09:06:57 +00:00
Pau Espin 4f538b554a lint: Add osmo_ss7_asp_rx_unknown_cb to typedefs_osmo.txt
Change-Id: Ifeb2ed66f32b2c3802ea1aab4857f334c3748da3
2023-09-07 13:20:57 +02:00
Oliver Smith eac517c1af jobs/master-builds: xgoldmon: remove osmo-ci dir
Fix running the job multiple times in a row. As the master jobs don't
wipe the git repositories, we need to remove the osmo-ci dir first
before attempting another shallow clone.

Fixes: 451cbe7d ("jobs/master-builds: add xgoldmon")
Change-Id: I877944dbca9d1c3ca57b05e947ba9b3506971bdc
2023-08-30 12:25:52 +02:00
Oliver Smith 9ba26aa8fb jobs/master-builds: add osmo-ir77
Replace the legacy osmo-ir77 job (not done with jenkins-job-builder)
with a new master-osmo-ir77 job that works just like the other master
jobs:
- build in docker
- have build commands in contrib/jenkins.sh

Depends: satellite/osmo-ir77#1
Change-Id: I45034e4ed9ed8ad5683ac2de24521649f138b41c
2023-08-29 13:02:33 +02:00
Oliver Smith 1b6970edac jobs/master-builds: add simtrace
Replace the legacy SIMtrace job (not done with jenkins-job-builder) with
a new master-simtrace job that works just like the other master jobs:
- build in docker
- have build commands in contrib/jenkins.sh

Set the same notification mails as for simtrace2.

Depends: sim-card/simtrace#1
Change-Id: I0980ceafa4d1187630b75b45b01b538c750021bb
2023-08-29 13:00:33 +02:00
Oliver Smith 451cbe7d86 jobs/master-builds: add xgoldmon
Replace the legacy xgoldmon job (not done with jenkins-job-builder) with
a new master-xgoldmon job that works more similar to other master jobs:
- build in docker
- have build commands in a jenkins.sh script

Put the jenkins.sh script into osmo-ci, as the upstream repository is
outside of Osmocom infrastructure.

The motivation for this change is, that the current xgoldmon job is
failing since libosmocore depends on liburing by default. This uncovered
that the job is still running outside of docker, where the dependency
has already been added. The following patches will modernize other jobs
which have the same problem.

Change-Id: Ice5704eb12f3c3a777961bc18a55fac63df80fd6
2023-08-29 12:56:34 +02:00
Pau Espin 896bb61d1b jobs: Add nightly job for ttcn3-dia2gsup-test
Related: OS#5757
Change-Id: Icb1a18da0daea1b481b4633eed2de817bfd5a15a
2023-08-28 12:34:07 +00:00
Oliver Smith baa1c11915 jobs/coverity: fix path to home dir
Fix for:
./jenkins.sh: line 35: /home/build/osmo-ci/coverity/get_token.sh: No such file or directory

Fixes: 56bc906e ("coverity: run inside docker")
Change-Id: I87fadd2dffcfaa04eaa942dfb8a496334cb722d5
2023-08-28 12:39:20 +02:00