Commit Graph

1434 Commits

Author SHA1 Message Date
Oliver Smith afae3d79b5 jobs/coverity: fix clean up permission errors
Don't mount the host's osmo-ci/coverity dir in /build/osmo-ci/coverity.
The current working dir is mounted as /build, and because docker creates
the /build/osmo-ci directory structure as root, we end up with having
subdirectories created by root in our current working dir. These then
cause an error on the next run when jenkins tries to clean them up.

Fixes: 6a2451a0 ("jobs/coverity: adjust mount path to new home dir")
Change-Id: Ie0aa02d3821df6d0505748a7dd70ff67e4cf1405
2024-06-14 09:24:48 +02:00
Oliver Smith 6a2451a0ad jobs/coverity: adjust mount path to new home dir
With the related docker-playground patch, the home dir for the build
user has actually been changed from /home/build to /build. This doesn't
matter for all other jobs it seems, but the coverity job here fails
because it tries to access $HOME/osmo-ci/coverity.

Adjust the mount path, so it works again as expected.

Fix for:
  ./jenkins.sh: line 37: /build/osmo-ci/coverity/get_token.sh: No such file or directory

Related: docker-playground Ief8837bd9f89f51e66857a453f7fc4645620159f
Change-Id: If0286e10d1644464e9408db1bbf18c24f4b8d5a6
2024-06-12 14:53:44 +02:00
Oliver Smith 3b20d2a281 OBS: get_git_version: debian/changelog as fallback
Fix osmocom-bb getting 0.1.0 as version:

  osmocom-bb: has no git tags, using 0.0.0 as version
  osmocom-bb: building source package 0.0.0.3621-d70e
  osmocom-bb: WARNING: version from changelog (0.1.0) is higher than version based on git tag (0.0.0.3621-d70e), using version from changelog (git tag not pushed yet?)

With this patch:

  osmocom-bb: has no git tags
  osmocom-bb: getting version from debian/changelog
  osmocom-bb: building source package 0.1.0.3621-d70e
  osmocom-bb: adding debian/changelog entry (0.1.0 => 0.1.0.3621-d70e)

Change-Id: I3a284b50ca62a2faff16702b7108ca391229caf1
2024-06-10 16:30:31 +02:00
Oliver Smith d67f47e82e jobs/ttcn3-testsuites: add -asan
Related: OS#5301
Change-Id: I08964335efd9276a147d58bf960ffdf535e3b51c
2024-06-10 16:09:41 +02:00
Oliver Smith 67a5fc886a jobs: add osmocom-obs-nightly-asan
Add a new job that builds source packages for osmocom:nightly:asan, and
uploads them there.

It was considered whether we should instead of building a binary
repository with asan packages in OBS, just build all packages and
libraries from source at the jenkins builders. We decided against it,
see the related discussion.

Related: https://gerrit.osmocom.org/c/docker-playground/+/28902/1#message-30650d8450d2d129b6ef3f447f65e4b866d2f801
Related: OS#5301
Change-Id: I8fb6664702f85ee057377cb374394c8f24202474
2024-06-10 16:09:38 +02:00
Oliver Smith a0daea25b0 OBS: fix using --conflict-pkgname
Use --conflict-pkgname as package name, instead of hardcoding
osmocom-$FEED.

Fix for:
  FileNotFoundError: [Errno 2] No such file or directory: '/obs/_cache/osmocom-nightly-asan'

Change-Id: I4ddb2e9adc25e7e8e8c9d17236b76d9f2e9c2a9c
2024-06-10 14:57:57 +02:00
Oliver Smith 2b2dda2ac6 OBS: add --disable-manuals
Allow building binary packages faster by disabling the manuals. We don't
need those for the asan repository.

Related: OS#5301
Change-Id: I3ff84f26ee6aa53cbcbe2275bedc6b724a461adc
2024-06-10 14:57:57 +02:00
Oliver Smith 34c176b2c3 OBS: add --configure-append
Add a parameter for appending arguments to the ./configure line as it
gets called in the debian package. This will be used for asan packages.

Related: OS#5301
Change-Id: I5ae396cc190559eb9c6a1671db374a91f03924e7
2024-06-10 14:57:53 +02:00
Oliver Smith 1b1d19d197 OBS: update_obs_project: add --exclude-package
Prepare for building the asan repository. We don't need to build e.g.
the erlang projects for that.

Related: OS#5301
Change-Id: If02fd38da05113e28ee401d592edfc7528388308
2024-06-10 12:57:11 +02:00
Oliver Smith 566b0a50d2 OBS: improve argparse help output
Prepare to add more arguments, by first categorizing the existing
arguments into groups. Tweak the descriptions while at it.

Change-Id: I09a8caa885b72b9d806fbfb4c8d72fe9667feec5
2024-06-10 10:45:46 +02:00
Oliver Smith b8c6a50246 OBS: fix python 3.12 compat
Fix for:

  File "/home/user/code/osmo-dev/src/osmo-ci/scripts/obs/lib/__init__.py", line 112, in check_required_programs
    if not importlib.find_loader(module):
           ^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'importlib' has no attribute 'find_loader

Change-Id: I6430c2c4f75c8408d00305e1a1f0a64600eb086c
2024-06-10 10:45:46 +02:00
Oliver Smith 4e49cb8aab ansible/hosts: lx2-raspbian11build: update IP
Change-Id: Ic1451c5ddb44df30ecc6be88d7cc4ceb2c2f50de
2024-06-06 16:30:22 +02:00
Oliver Smith 55f55e35af ansible: jenkins: lx2: configure tmpfs
Add ansible rules to put jenkins workspace and ccache dirs into a tmpfs.

Related: OS#5873
Change-Id: I81e03f8d2013dda93395d0017b45f757a15c4ec2
2024-06-06 16:28:49 +02:00
Oliver Smith 0674a258c1 ansible/setup-jenkins: add more utils
* etckeeper: to automatically have /etc changes versioned in git; we
  already use it in various other places
* ncdu: to figure out what consumes space
* tree: list directory trees, useful to quickly check if e.g. ccache
  and jenkins workspace dirs are populated properly

Change-Id: I4b0e5a21f77d0ffb60f1f3aaf91aecd08cb2fe90
2024-06-06 16:27:57 +02:00
Oliver Smith c2047a3bd2 ansible/setup-jenkins: utils: order alphabetically
Change-Id: I41736671d865c9ac6d0b5ba81d0ebf09f5755eab
2024-06-06 15:45:15 +02:00
Oliver Smith 41d9cc18b0 jobs/{gerrit,master}: add osmo-s1gw
Related: SYS#6772
Change-Id: I6d17c920f12a5bb60bd026ca539b6b275bd8848f
2024-06-06 10:39:48 +02:00
Oliver Smith e6d4b42cea jenkins-jobs-osmo: new file
Do not recommend to the user anymore to put the Osmocom jenkins server
in their global jenkins-job-builder config, as this may lead to jobs
from other repositories being deployed to the Osmocom jenkins by
accident.

Instead of that, let the user put the config in this path:
	~/.config/jenkins_jobs/jenkins_jobs_osmo-ci.ini

Add a wrapper script that users this path, and makes sure that no global
config is present.

Related: SYS#6957
Change-Id: I1d7c50b2fef56e343cfe377b51f5f4304219cd22
2024-06-04 13:40:07 +00:00
Oliver Smith 08da5b52c9 jobs/README: convert to markdown
Convert to markdown, so it gets rendered in gitea.

Change-Id: I0b687b651b44c798d5d224b0a3ea734b1bc41dff
2024-06-04 13:40:07 +00:00
Oliver Smith 4306599436 jobs/update-osmo*: add lx2-raspbian11build-ansible
Related: OS#5873
Change-Id: I358d040c82915878762b7586e98c32e0d828d9dd
2024-06-04 13:33:01 +00:00
Oliver Smith 8e7e546807 scripts: osmo_git_clone_url: add osmo-epdg
Fix for currently failing Osmocom-release-manuals job:

  :: (osmo-epdg) Getting git tags
  fatal: unable to access 'https://gerrit.osmocom.org/osmo-epdg/': The requested URL returned error: 403

Change-Id: I419b2d097a1a11975e3f90b3f129d02f63bfcf9d
2024-06-04 09:04:25 +02:00
Oliver Smith ca73679467 scripts: osmo_git_clone_url: prefer using gerrit
Use gerrit as clone URL for libgtpnl, libasn1c, libsmpp34 and libusrp,
as the gitea URL for these is just a (very delayed!) mirror.

Related: https://osmocom.org/projects/cellular-infrastructure/wiki/Git_infrastructure
Change-Id: I6c643d31e1451d97566691b83a4167d42f3f5e41
2024-06-04 09:04:25 +02:00
Oliver Smith ad9c3eebbe jobs/{gerrit,master}: osmo-epdg: build manuals too
Related: OS#6332
Change-Id: I540c7cff982f6b0242b4b40985a80d0426c903d6
2024-06-03 15:38:31 +02:00
Oliver Smith 3b10b6c6d2 OBS: add update_obs_eclipse_titan.sh
Add a script to easily update the eclipse-titan package from a git
repository. This replaces the previous workflow of downloading the
previous source package, modifying it, and re-uploading it. With the git
repository, it is easier to see which patches are included, and it is
easier to modify the packaging (e.g. add new patches to fix build with
latest gcc), and easier to upgrade the eclipse-titan version.

I've done this change because it failed to build with the most recent
GCC in Debian Unstable. Backporting Vadim's patch from upstream fixes
it.

Related: b5d3d5bf4f
Related: https://osmocom.org/projects/cellular-infrastructure/wiki/Upgrading_eclipse-titan_in_the_Osmocom_OBS
Change-Id: Ieb1945d5cf4abf8ae2201f49ea7dce8eb343167e
2024-05-27 10:46:57 +02:00
Oliver Smith 3bd97cc86a jobs/ttcn3: update ttcn3-ggsn-test-kernel
Remove ttcn3-ggsn-test-kernel-pablo-gtp, as the IPv6 GTP patches have
been merged. Add ttcn3-ggsn-test-kernel-net-next and
ttcn3-ggsn-test-kernel-torvalds instead, which run the master/nightly
version of osmo-ggsn against HEAD of the kernel trees in
netdev/net-next and torvalds/linux.

Change-Id: I3d2f26ca87f79365f4a407376b5c3c0145f729a6
2024-05-21 11:33:02 +02:00
Vadim Yanitskiy 072c4df738 jobs/ttcn3-testsuites.yml: add ttcn3-bts-test-io_uring
osmo-bts in theory can also benefit from io_uring, at least because
it can maintain multiple RTP connections for voice calls.  Let's
execute the respective testsuite with io_uring too.

Change-Id: I3af791103d863290a53c9ce2d1a8d1d9e42e91c7
2024-05-15 20:36:20 +00:00
Oliver Smith d974243ef9 jobs/ttcn3: run ttcn3-msc-test earlier
It seems like various tests are failing from time to time due to the
builder having a too high load. As several ttcn3 testsuites run around 4
am already, move ttcn3-msc-test to 1 hour earlier where we don't have
anything currently.

Change-Id: I8eaf058f13f4175a458e9abe544bfb21ace481b7
2024-05-15 15:01:14 +02:00
Oliver Smith cf3cbf3885 OBS: gerrit_binpkgs: add hint where to find pkgs
Change-Id: If58081b17f96283620cd945f3521cf0edb4f7913
2024-05-14 13:58:50 +02:00
Oliver Smith 902fb23413 OBS: gerrit_binpkgs: use --no-meta
Don't let packages built with gerrit_binpkgs.sh depend on an
osmocom-master meta package. This makes it easier to install and test
the built packages locally.

Change-Id: Ie225ed9d0a3b822752d902eaf1e74f54fb5f5d63
2024-05-14 13:44:19 +02:00
Oliver Smith 91a79bd8aa jobs: gerrit: build osmo-pcap + dep for centos7
We are about to remove the rpm spec files for almost all Osmocom git
repositories. The only two git repositories where we still need them,
because we have a customer using them on centos 7, are libosmocore and
osmo-pcap (SYS#6760). Add CI to ensure that these still build fine, and
that we don't remove these by mistake.

Related: OS#6446
Change-Id: I4d4a67c053ed29811c504158d1ef49430880ad4f
2024-05-08 13:03:41 +00:00
Oliver Smith 0aa60b04a5 ansible/setup-jenkins: install rsync
After recent refactoring of the gerrit-binpkgs job, rsync is now
requried on the jenkins nodes. It was installed on the ones where I
tested, but not on all of them.

Fixes: b2e12851 ("OBS: move gerrit-binpkgs logic to separate script")
Change-Id: Ic8ffd61fc2c89574085e9c3abbceb554f3c5da6a
2024-05-08 12:12:03 +00:00
Oliver Smith 618140a22e OBS: sync_obs_projects: remove AlmaLinux:8
Related: OS#6446
Change-Id: I19fc021a950790eab8b8074ea1c0cdd34232f4f8
2024-05-08 11:35:50 +02:00
Oliver Smith ef2d95d0a2 ttcn3-bsc-test-io_uring: limit jenkins nodes again
Run this job only on jenkins nodes with a linux kernel of 6.1.x or
higher. The io_uring implementation consumes a lot more memory on e.g.
the 5.10.x kernel of host2, which causes osmo-bsc to run out of memory
in other places:

<0002> system_information.c:1641 bts 0: Error while generating SI4: Cannot allocate memory (-12)
<0002> bts_trx.c:505 Cannot generate SI4 for BTS 0: error <Cannot allocate memory>, most likely a problem with neighbor cell list generation

Related: OS#6405
Change-Id: Iddf2d47a641998860fd1ef615de976104667c5ab
2024-05-08 06:46:14 +00:00
Oliver Smith 7224e5b285 jobs/update-osmo-python: remove build3
build3 does not exist anymore, but it was still referenced here, leading
to the job waiting forever until build3 comes online.

Related: OS#6186
Change-Id: Idba77a3b9595c234ee21dfd1d0e267021a17bb03
2024-05-07 11:42:59 +02:00
Oliver Smith b2e128511d OBS: move gerrit-binpkgs logic to separate script
As I'm preparing slides for a OsmoDevCon talk, I'm realizing that it is
quite cumbersome for users to build debian packages from Osmocom git
repositories (the same way gerrit does it, to reproduce errors locally).

Move the logic from the gerrit-binpkgs job to a separate script that can
be run from an Osmocom git repository, will figure out the repository
name from there and only needs the target distribution as argument.

Usage example:
  $ git clone https://gitea.osmocom.org/osmocom/osmo-ci
  $ cd libosmocore
  $ ../osmo-ci/scripts/obs/gerrit_binpkgs.sh debian:12  # or debian:11, debian:10, almalinux:8

Change-Id: I100d8dfc0c58bdafe7efb0fa4108031ce10398a5
2024-04-25 14:13:45 +02:00
Oliver Smith ec9efbf649 repo-install-test: centos8: fix almalinux keys
Run "dnf upgrade almalinux-release" inside centos8/almalinux8 to upgrade
the gpg keys first, in order to prevent gpg key errors while installing
packages. We are not running repo-install-test for centos8 in CI anymore
(SYS#6759), but I'm currently using this configuration to manually test
that fixing permissions during upgrade and running systemd services as
users works as expected on an rpm-based system.

Related: OS#4107
Related: https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/
Change-Id: Ia06d24ce7ce48651f5a41489e78b5b55dc2d3921
2024-04-24 11:57:08 +02:00
Vadim Yanitskiy 0c3634e7f9 jobs/ttcn3: add ttcn3-sgsn-test-sns[-latest]
Change-Id: Iefd81a081fa29af35fc7d575ea23e464c165dbc7
Depends: docker-playground.git I767ec223585002d6420eda27ed338722f764c902
2024-04-24 08:45:30 +00:00
Oliver Smith 0cc68159f6 jobs/ttcn3: io_uring: set memlock to unlimited
io_uring in the kernel memlocks a big amount of space with older
kernels, such as the kernel on host2-deb11build-ansible. It seemed to be
enough to increase it to 1 GiB. However now we see it failing again
with:

  failure during io_uring_queue_init(): Cannot allocate memory
  Aborted (core dumped)

Set it to unlimited to ensure that a low limit is not the reason we see
it failing. If it still happens after this, we probably need to make
sure that we don't run too many SUTs with io_uring in parallel on
jenkins nodes with older kernels.

Related: OS#6405
Change-Id: I39aaa2ed7d0310a12d0c4493a79ff46b2e7e2864
2024-04-23 13:36:31 +02:00
Oliver Smith 2e95fe4f68 jobs/ttcn3: run io_uring testsuites on all nodes
After most recent patches from Pau were merged, the io_uring testsuites
run on all jenkins nodes with the ttcn3 label again!

host2-deb11build-ansible has an older host kernel and needs ulimit
memlock increased to 1 GB. I've tried out e.g. 500 MB and it isn't
enough.

Closes: OS#6405
Change-Id: I59b9a7c3928281a0557c17629029adcbc5ae7410
2024-04-19 11:59:15 +02:00
Oliver Smith 2194146d94 jobs/osmocom-obs-sync: remove Ubuntu 20.04
We build binary packages for the last 2 LTS versions of Ubuntu, so
remove 20.04.

Related: https://osmocom.org/projects/cellular-infrastructure/wiki/Linux_Distributions
Change-Id: Ia93b272447032eb5224d8e14a75801dda8a596a8
2024-04-15 10:19:16 +02:00
Oliver Smith 6a83362344 jobs/osmocom-obs-sync: add Ubuntu 24.04
Change-Id: I79a6fe1fb65a7245ab38674764953468fab91d6b
2024-04-12 10:54:49 +02:00
Oliver Smith a307c7df71 jobs/gerrit,master: osmo-hnbgw: add nftables var
Build with and without nftables.

Related: OS#6425
Change-Id: I9828b70708dbe466c37df6ffb87b04362f14c71c
2024-04-04 11:59:04 +02:00
Oliver Smith afd9d56e05 checkpatch: recognize json_array_foreach etc.
Treat json_array_foreach, json_object_foreach, json_object_foreach_safe
etc. the same as if, while, for, switch, and require exactly one space
after using it:

	json_array_foreach (nftables, i, item) {
		…
	}

Related: osmo-hnbgw Id4e7fa017c31945388a010d8581715d71482116b
Change-Id: I0b58c6d70a961c7d0ba93a2f0d6a5a4afa321fa9
2024-04-03 15:32:46 +00:00
Oliver Smith 29a41d387e ttcn3-ggsn-test-kernel-latest-net-next: update net-next branch
The branch of net-next is now called main. By using the old name, the
jenkins job was checking out a 6.3 kernel, we are now at 6.9 rcs.

Related: https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/
Change-Id: Ieee448c514bc0ff457b9d17c8b12ee00953995d2
2024-04-03 12:20:41 +00:00
Oliver Smith ebf4df3242 jobs/ttcn3: …-pablo-gtp: don't wipe workspace
The ttcn3-ggsn-test-kernel-* jobs should not wipe their workspace, so we
can avoid shallow-cloning the kernel if the commit did not change.

The way the scripts in docker-playground.git are written, this also
caused a permission error.

Change-Id: I4ac1b2c3f5ba63c131dd1d6a4888f32a27264eba
2024-04-03 12:20:41 +00:00
Pau Espin a59c9257b4 jobs: ttcn3-testsuites.yml: Add job ttcn3-asterisk-ims-ue-test
Related: SYS#6782
Change-Id: I06de12224399bbddc27649b7d52a6194faec07c4
2024-04-02 13:32:47 +02:00
Oliver Smith b5a1b009b7 jobs/ttcn3: add ttcn3-ggsn-test-kernel-pablo-gtp
Add a temporary job to run against the IPv6 patches, until they are
upstreamed.

Related: OS#1952
Change-Id: Idf0e3fd5ba81565ce1626dfdf186c88280232550
2024-03-25 12:40:46 +01:00
Vadim Yanitskiy 31fd5cf020 gerrit-verifications: execute 'distcheck' job for pysim
Change-Id: I9d4d9e9de2b16a4b745791f3c9c93507f43bfa6d
Related: pysim.git Ic72d58494e8fd0cab8d66ce60f7b70593b770872
2024-03-22 19:23:02 +00:00
Oliver Smith 36cd8c53a6 jobs/master-builds: libosmocore: io_uring nodes
Like the gerrit-verification jobs for libosmocore, run the master-builds
jobs on nodes with the io_uring label.

Related: OS#6405
Change-Id: Iea6791b3fbb5c445a539c2b4636a643d6c8d517b
2024-03-22 07:26:19 +00:00
Oliver Smith c1fe54aaf8 jobs: add osmocom-obs-ewild
Similar to osmocom-obs-nhofmeyr, add a jenkins job that automatically
picks up changes in Hoernchen/mssdr branches in the Osmocom projects,
and builds binary packages in home:ewild:mssdr.

Related: OS#6409
Change-Id: I9a8aaf00e3fae84a61ff3cab64750926f8a9e2e1
2024-03-21 10:33:42 +01:00
Harald Welte 3cf8a0e792 jenkins: Add io_uring job for osmo-mgw
A change introducing osmo_io for RTP/RTCP of omo-mgw
is currently in review at  https://gerrit.osmocom.org/c/osmo-mgw/+/36363

Let's make sure we have a related io_uring test job.

Change-Id: I672c72c855bebc1f895be51f3fa3cf0e368005ff
Related: OS#6387, SYS#5094
2024-03-20 11:52:41 +01:00