Commit Graph

166 Commits

Author SHA1 Message Date
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
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 cd0de59831 jobs/gerrit: libosmocore: run on io_uring nodes
We have at least one node where the io_uring backend does not work.
Allow running the osmo_io tests with the io_uring backend in CI by
limiting the jenkins nodes used to the ones where we know that io_uring
works.

Related: libosmocore I82db9a15bc483a5447d86352512afaafa2bcfbb6
Related: OS#6405
Change-Id: I9289e2f84edbff95d81bb4a92863865b9563fc6a
2024-03-20 10:51:04 +01:00
Oliver Smith 65005ed338 jobs/gerrit: build for debian 12: gapk, osmocom-bb
Related: OS#6409
Change-Id: Ib48d90af734e627aa4760af6423481970626d501
2024-03-18 14:38:07 +01:00
Oliver Smith e2f71fdcf3 jobs/gerrit: don't build osmo-epdg for debian:11
After switching to a newer gtplib, a newer OTP is required that isn't in
debian 11. Disable it, as Pau suggested.

Related: https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36052/3#message-d76c9c565d6feea88ef2e596fc5554ddd2e52cc1
Change-Id: I6a9147aef85612f3fb00920edea8c6706954b007
2024-02-23 10:10:11 +01:00
Oliver Smith b997fa98b2 jobs/gerrit-verifications: remove almalinux8
Related: https://osmocom.org/news/246
Related: SYS#6759
Change-Id: Ia180ac87251c39d9715276cf23a2663fb917f50a
2024-02-14 16:27:44 +01:00
Oliver Smith 5db0807a64 jobs/gerrit: osmo-upf: don't for build debian 10
osmo-upf currently can't build against debian 10, as the required
libnftables-dev version there is too low and we don't provide a backport
for it. As discussed, disable it for debian 10.

Adjust CI to build against debian 11 instead (in addition to the usual
almalinux 8, debian 12).

Change-Id: I63798d451b66bf728b58b02414c1a44f6156b356
2023-12-05 16:03:28 +01:00
Oliver Smith c4ee740d57 jobs: fix undefined parameter log warnings
Adjust all jobs in the gerrit verifications pipeline to use the same
parameters from a new include file, to prevent undefined parameter
warnings in the log.

Fixes: OS#6261
Change-Id: Iadc5cd8996eb4ed86634ceb35829a3e9239e598d
2023-12-04 08:55:28 +01:00
Pau Espin 9b9b2a2780 jobs/gerrit-verifications: Add osmo-epdg
Change-Id: I84accfc5065ed2e780c4ecb77885af61bc6fb72f
2023-10-05 16:22:49 +02:00
Oliver Smith e4ac3ae199 jobs/gerrit: osmo-dia2gsup: test debian 11 and 12
Don't try to build the debian package for debian 10. It fails as rebar3
is not in debian 10. Test the build for debian 11 and 12, which is what
we build the package for on obs.osmocom.org.

Change-Id: Id01b466f1bacc9cbb8e835f69da765f5fdccfdc2
2023-08-23 16:59:28 +02:00
Oliver Smith bec3289f8e jobs/gerrit-verifications: use debian-bookworm-titan
Related: OS#6057
Change-Id: Ifd7fc7a2360fc64be78c6a06f42d0f4d46af01a0
2023-08-14 09:28:40 +00:00
Oliver Smith 2f5fa9edf8 jobs: remove endianness check
Related: OS#6122
Related: https://lists.osmocom.org/hyperkitty/list/openbsc@lists.osmocom.org/thread/ORBO2FWVVPCHTAXSPZTQLSSM4YB76ITB/
Change-Id: I2358e6bc8189f9c5bdca10aac28032cb7a4667fa
2023-08-02 12:25:25 +00:00
Oliver Smith 7c15e261a9 jobs/master,gerrit: don't use bullseye for python2
openbsc, osmo-e1-recorder, osmo-smlc have been adjusted to not require
python2 anymore. Let them use debian 12 for building.

Closes: OS#5950
Change-Id: I1d9204b5b59866fa79839221bb47ec4f7206a982
2023-07-31 08:22:09 +00:00
Oliver Smith 7277e4399f jobs/gerrit-verifications: build for debian 10, 12
Build packages in CI for the oldest and newest debian release, for which
we provide binary packages in the Osmocom OBS repositories.

See "jobs: master/gerrit: use debian bookworm (12)" for reasoning:
I079e55a1325083714c8d39f922b2563e843fc0bc

Related: OS#6057
Change-Id: I959b466865bd327cc72cde4a1763ac13c2c2d797
2023-07-31 08:22:09 +00:00
Oliver Smith 6d9f0843a9 jobs/gerrit-verifications: fix binpkgs for libusrp
Don't build libusrp for centos8/almalinux. libusrp does have a .spec.in
file, but it needs SDCC for the build and SDCC is not available there.

In theory we could build the rpm in CI for opensuse tumbleweed, but it
requires adding support for building for opensuse in
scripts/obs/data/build_binpkg.Dockerfile and
scripts/obs/data/build_rpm.sh first, and since it works quite
differently than centos8 and libusrp changes rarely (last code change in
2021) I've decided to not do that now.

Fixes: OS#5898
Change-Id: If61765fe628321cae004307f4845d8927a1c7019
2023-07-31 08:22:09 +00:00
Oliver Smith 1dcb49a811 jobs/gerrit-binpkgs: don't hardcode distros
Make it possible to set a list of distributions to check in
gerrit-verifications.yml instead of only having one boolean for testing
two hardcoded rpm and deb distributions.

Change-Id: I59487e3dc2f55057de1b6a322f088fff0d18654c
2023-07-31 08:22:09 +00:00
Oliver Smith bd763747ad jobs/gerrit: refactor pipeline script
* Deduplicate the code to run a job by moving it to a function.
* Print the status of jobs right after they finished, instead of waiting
  until all jobs are done
* Make the status print messages more readable

Change-Id: I641a5b483721ce2bbf21bd61d8f4e83faf94ac24
2023-07-31 08:22:09 +00:00
Oliver Smith a4d780c6d5 Cosmetic: jobs/gerrit: update pipeline comment
Change-Id: If06af0e955240e1b9d678f1020767bbfb70b1d96
2023-07-31 08:22:09 +00:00
Oliver Smith 36df36fa74 jobs/gerrit-verifications: disable lint for asn1c
The asn1c code does not follow our coding guidelines, and in the
interest of keeping it closer to upstream it does not make sense to
reformat it.

Change-Id: Iae97d8997b576e43c9a73dfcc61a9260f875310f
2023-07-17 11:58:44 +02:00
Oliver Smith f71fceff65 jobs: master/gerrit: use debian bookworm (12)
Upgrade from debian 11 for master and debian 10 for gerrit
verifications to using debian 12 for both.

Previously we intentionally built against the older debian 10 version
to ensure that our programs still build there. However it is easier to
maintain the docker containers if we just use the most recent debian
version for both and it makes the build environment more consistent - if
a patch passes in gerrit verifications, we expect it to pass in master
builds as well. And the other way around, I can just run CI of all
master jobs when developing a change and assume that if they pass,
gerrit verifications will run as well.

As long as we provide binary packages in OBS for debian 11, 10, ... we
will still notice if a build breaks on an older debian release. I think
this is good enough given that it will probably not happen that often,
but if we decide that we really want to ensure it still builds on older
distros at gerrit-verification time then the more suitable place to add
this would be in the deb-build verification test. It is more
maintainable there, because the dependencies just get installed from the
debian/control file, no need to add all of them to a docker container
beforehand.

The new container is debian-bookworm-build, see the docker-playground
commit for reasoning why it is not debian-bookworm-jenkins.

Related: OS#6057
Depends: docker-playground I49aaf62b5b97775f923453611df3b91354a640a0
Change-Id: I079e55a1325083714c8d39f922b2563e843fc0bc
2023-07-13 14:55:23 +02:00
Oliver Smith f1b3c65f8f jobs/gerrit: disable endianness check for osmo-ci
Do not run struct_endianness.py from libosmocore.git on osmo-ci.git, as
it doesn't contain C code.

Change-Id: Ib9a2ed2ce02a171f0bdca56728f8cdabf8f4cd1f
2023-04-27 14:41:11 +02:00
Oliver Smith 684a8f2f9c jobs/master,gerrit: build manuals with IU
Build the manuals with --enable-iu for osmo-msc and osmo-sgsn, so we
don't miss IU-related VTY commands in the manuals.

As of writing, osmo-sgsn includes cs7-instance-iu only if building with
--enable-iu. osmo-msc includes it regardless of the build flag (and
returns an error if trying to use the command if built without IU
support). Build the manuals with --enable-iu for both for consistency,
and just in case we decide to change this behavior / add more commands.

Related: OS#6013
Change-Id: Ib9c47796b582add90ef72376b4c0368a29d89b15
2023-04-26 10:13:10 +02:00
Oliver Smith ddb8f3b05d jobs/master,gerrit: use PFCP var for osmo-hnbgw
Build osmo-hnbgw with and without PFCP. Build the manuals with PFCP, so
it includes the additional VTY commands.

Related: OS#6013
Change-Id: I4a4e25e0c179c0d408c3728a28eb75bbfa086f48
2023-04-26 10:13:07 +02:00
Oliver Smith d9f32325e2 jobs/gerrit: increase num-to-keep to 1000
Increase the logs to keep for gerrit related builds, as they may exceed
the previous limit of 120 within a day. All these jobs don't save build
artifacts, so they should not cause a noticable size increase.

This is a much more careful version of 719ff976 ("jobs: tweak
build-discarder values"), which had been reverted in a052c13c. The
big problem with the previous patch was that it increased the number of
jobs to keep even for jobs that had build artifacts, and so the
required storage exploded.

Related: OS#5980
Change-Id: I1a4604d7a5093349aee0122e74914b06045c78b8
2023-04-03 11:11:34 +02:00
Oliver Smith b126b77e81 jobs: remove artifacts-days/num-to-keep: -1
Remove the "artifact-days-to-keep: -1" and "artifact-num-to-keep: -1"
lines, as they don't have an effect. -1 is the default value, which
means "infinite" and causes the value from "days-to-keep" /
"num-to-keep" to get used instead.

This patch re-applies part of 719ff976 ("jobs: tweak build-discarder
values"), which had been reverted in a052c13c.

Related: https://jenkins-job-builder.readthedocs.io/en/latest/properties.html#properties.build-discarder
Related: OS#5980
Change-Id: Ic073643634e1814147d765dd7e8f3f02e81effc3
2023-04-03 10:47:54 +02:00
Harald Welte a052c13c12 Revert "jobs: tweak build-discarder values"
This reverts commit 719ff97608.

The disk consumption of jenkins has grown by almost 500GB
since we merged this patch.  Clearly this is not expected, and we'd
have ran out of disk space in a few weeks.

I personally think the current allocation of 1.5TB of disk space to
jenkins should be more than sufficient; we just need to manage it
better.

Closes: OS#5980
Change-Id: I6b744a8b84a3e1255a8d51f73d1721ccfd028ac1
2023-03-28 13:35:33 +02:00
Oliver Smith 719ff97608 jobs: tweak build-discarder values
Remove num-to-keep from most jobs, as this leads to keeping the build
logs for a much shorter timeline than desired. For example the
gerrit-binpkgs-deb job that runs for most projects when pushing patches
to jenkins reaches the 120 limit in less than 24h - and so when clicking
the link on a failed build from yesterday it is already deleted.

Instead just keep the logs for the last 30 days, no matter how many were
submitted on one day. Storing logs doesn't take up much space.

Remove the artifact-days-to-keep and artifact-num-to-keep lines, as they
don't have an effect. For jobs that do have artifacts, the actual value
is min(days-to-keep,artifact-days-to-keep) and same with num-to-keep.

While at it, increase the ttcn3-testsuites build-discarder to 120 days
as this means more data will show up in the test result analyzer at
which we look frequently.

Change-Id: Iec5c22c7fcf6c1fd2db71611045f15dc6580ed86
2023-03-07 12:05:29 +01:00
Oliver Smith 4170c2b71e jobs/gerrit: start endianness job in pipeline
Related: OS#5884
Change-Id: Ib84a51aa8465cf513cb2e4b31121a04760f688e9
2023-02-20 17:27:03 +01:00
Oliver Smith 4773f26d2d jobs/master,gerrit: fix pysim, sysmo-usim-tool
Don't attempt to create the CCACHE_DIR and chown it to osmocom-build for
the simtester jenkins node, and more generally all that were not
created with the ansible provisioning scripts. In case of simtester,
there is no osmocom-build user and we don't have the space there to use
ccache.

Fix for:
  chown: invalid user: ‘osmocom-build:osmocom-build’

Related: OS#5848
Change-Id: I339d9ba4ad0c959d7325820eb53bfa1f0e04c164
2023-01-25 12:59:30 +00:00
Oliver Smith a788a8b14f jobs/master,gerrit: add docker_run_ccache
Put arguments for ccache into a new docker_run_ccache variable, and use
it with all projects where it makes sense to use ccache.

Other projects use docker_run without the ccache parameters again:
* osmo_ss7, osmo_dia2gsup, pysim:
  Erlang/Python projects
* osmo-e1-hardware, ice40-usbtrace, no2bootloader, osmo-opencm3-projects:
  Don't use the default docker image
* osmo-gsm-tester:
  Only builds manuals (jenkins-build-manuals.sh)

Jenkins job builder's variable substitution doesn't replace {docker_run}
inside docker_run_ccache when used in cmd, so just duplicate the lines.

Related: OS#5848
Change-Id: Ib6d7f309b972979d3a3bc87f8fcf71f9e930c0da
2023-01-25 12:59:18 +00:00
Oliver Smith d909ad2997 jobs/gerrit: openbsc: set pipeline_binpkgs: false
Don't attempt to build deb packages for openbsc in gerrit-verifications.

Fix for:
  ERROR: unknown package: openbsc
  See packages_osmocom and packages_other in obs/lib/config.py

Change-Id: I3cd810366a6d711c1fdbf3d5ff03d507441307bd
2023-01-25 09:17:23 +00:00
Oliver Smith 945687b030 jobs/master,gerrit: use ccache to speed up builds
Related: OS#5848
Change-Id: I81f244ca09e660698df617549d70476fc96255e2
2023-01-24 10:56:03 +00:00
Oliver Smith c914967c53 jobs/master,gerrit: use minimal image for arm
Building debian-buster-jenkins on the raspberry pis may take > 1h,
depending on what changed. It has a lot of things we don't use, so build
and use a minimal image with the rpis instead.

Closes: OS#5863
Depends: docker-playground I4fb4b48b233acaef815c4c27ec6f17f12cfe836b
Change-Id: I73e62fbbf93824c0d37963039de4e00f26a43cbe
2023-01-24 08:04:54 +00:00
Oliver Smith 989c47bc91 scripts/osmo-build.sh / ARTIFACT_STORE: remove
This script was supposed to cache already built Osmocom libraries. But
it was only used with openbsc, didn't work as expected anymore (looking
at openbsc-master, it just builds all deps from source without caching)
and will be replaced with logic that allows using ccache in a future
patch.

Using ccache has the big advantage that we can cache all build objects
where the source files did not change, and not just do it on a
dependency level. Oftentimes only few source files change in our
patches, so we can really cache everything else that is not affected
within any git repository and not just a dependency that didn't change.

ccache also does automatic cache size management to ensure a cache stays
within a given size limit.

Related: OS#5848
Depends: openbsc Ib3272feec76b30412ca60dec204255b64e33831b
Change-Id: Id94d6126b476077d57839e4a884621b8c034f0c6
2023-01-23 13:31:08 +00:00
Oliver Smith 9f1889a494 jobs/gerrit-verifications: post comment on start
Post a link to gerrit when starting the build that contains the link to
the pipeline, without sending mail notifications.

This is useful when a gerrit verification build takes rather long, and
it's not clear if a build for gerrit verification was actually started
or not. Also I find this useful when debugging the CI scripts.

Change-Id: I75c5b8874f606739ff557ff0711bb9449a2b4259
2023-01-18 12:35:34 +00:00
Oliver Smith ed604a0bb3 jobs/gerrit-verifications-comment: rename
Rename the jenkins job from gerrit-pipeline-result to
gerrit-verifications-comment, as the next patch will not only use this
job to post a comment at the end of the gerrit verification, but also at
the beginning when the pipeline starts.

Give the pipeline_summary* scripts more generic names as well.

Change-Id: I1b947522aa5f2bb21f5e438db9df3420c998f1bc
2023-01-18 12:35:34 +00:00
Oliver Smith b44f768b7b jobs/gerrit-verifications: osmo-trx: fix matrix
Add the missing comma between "--without-sse, --without-neon", so the
matrix works as expected. Without this patch, the two builds with these
flags didn't run.

Change-Id: I51e58765dd33b15df2e9f2eb09c1260724e4ec9c
2023-01-16 12:55:21 +01:00
Oliver Smith 4f1201ff06 jobs/master-builds,gerrit-verifications: fix node
Do not set a node for master-builds and gerrit-verifications to run on,
as this leads to needlessly blocking slots on the jenkins nodes.

Each of these jobs is a matrix job with a slave_axis. The matrix job
itself can run on the "builtin" node, as it practically doesn't cause
load - all it does is start other jobs in the matrix (even if there is
only one other job, which is the default). Jobs started in the matrix
job do run on a configured node already, as the slave_axis parameter is
set.

I've just noticed this problem because currently the raspberry pi nodes
are offline, and so the master-osmo-trx, master-osmo-pcu and other jobs
take up lots of build slots just to wait until the raspberry pi nodes
come online and an actual build can start.

Change-Id: I447dd152fcc942ec48d0bcfbadd496e879c882da
2022-12-12 12:23:47 +01:00
Oliver Smith ffd4e39873 jobs/gerrit: don't only use debian 9 lxcs
Change-Id: I2d14bffb09439e031dec3ab3633a36710434a229
2022-11-28 14:38:52 +01:00
Oliver Smith f560ce08ab jenkins-gerrit: fix ambiguous use of review api
Fix an error when the same Change-Id is used on multiple branches or in
theory projects. This is actually allowed by gerrit, and we use this
e.g. when backporting patches from master.

Use the project, change number (e.g. 30147) and patchset number (e.g. 2)
instead of the Change-Id.

Fix for:
  + ssh -p 29418 -l jenkins gerrit.osmocom.org gerrit review 4835a62cd88f0d69db76fb3bfd2df02176a91a6d --json
  fatal: "4835a62cd88f0d69db76fb3bfd2df02176a91a6d" matches multiple patch sets

Related: https://gerrit-review.googlesource.com/Documentation/cmd-review.html
Change-Id: I2d627f8f3b400fa57a50a228d47df2194f60fd08
2022-11-15 11:38:08 +00:00
Oliver Smith ac5bae1efa jobs: pysim: split into job types
Split the test, pylint and docs job types in the matrix to run them in
parallel.

Depends: pysim I5245c529db729e209d78a02ab9c917a90d0e0206
Related: OS#5497
Change-Id: Iea4f15fd9c9f8f36cb8d638c48da000eafe746a4
2022-11-07 08:16:23 +00:00
Oliver Smith ae69a1aa67 jobs: osmo-e1-hardware: split into job types
Split the job, so building the software can be done with the regular
docker image instead of the fpga-build one (that doesn't have the needed
dependencies).

Related: osmo-e1-hardware I26e839de419c6eb86bf2a6250a1adf06b761d1fa
Change-Id: I90fbe72c722e491f41b9607d1a6389964d7e43b4
2022-11-04 11:17:59 +00:00
Oliver Smith c4df55dcfd jenkins-gerrit: send mail for V+1 for some users
Add a list of users that do not only get a notification mail when the
gerrit verification failed, but also on success.

Change-Id: I603b8a911c8f17aa726d9e3d5d644ad3262b42dd
2022-10-27 16:43:14 +02:00
Oliver Smith 933804b5be jobs/gerrit-verifications: pipeline: agent none
Don't allocate a slot on one of the jenkins nodes for running the
pipeline. The pipeline job is lightweight, it just starts other jobs
and waits for their completion.

Without this patch we got into a situation where a lot of patches were
submitted to gerrit at the same time, pipelines were started for all of
them, taking up slots, and then all of the pipelines waiting until free
slots become available before starting the actual build jobs. Thus
blocking each other until I manually stopped them.

Related: OS#2385
Change-Id: I289fcf1431a91a38fc37270e6a2f43d744c79e4f
2022-10-14 09:48:13 +00:00
Oliver Smith 1449f02cf6 jobs/gerrit-verifications: set pipeline concurrent
Allow running multiple gerrit-verification pipelines of the same project
at the same time to use the jenkins nodes more efficiently.

Note that the concurrent setting of the build jobs are not changed. Some
projects have this set to false, and for those, there will be no more
than one build job running at the same time. The build job gets started
from the pipeline, along with other jobs like lint and deb/rpm package
building.

Related: OS#2385
Change-Id: Ie2a19013e73d96a937e8f83c815c6a82cfe0768d
2022-10-13 10:51:55 +02:00
Oliver Smith d602a298d4 jobs/gerrit-verifications: link to new wiki page
Related: OS#2385
Change-Id: Ia4eac0c39fd156db1fc30e86ef55c48c6105912f
2022-10-13 10:51:55 +02:00
Oliver Smith 05e836e722 jobs/gerrit-verifications: add osmo-ci
Run the linter again on osmo-ci. It used to run on osmo-ci.git with
gerrit-lint.yml before recent refactoring in
I5f1340248cd116c5fa5134eee3fae50baf7ef851. Adding it to
gerrit-verifications like this makes it run again, pipeline_lint: true
is the default.

Related: OS#2385
Change-Id: Ie6d8a99647846fb4008953b444bba642cbcf3b1e
2022-10-13 10:51:55 +02:00
Oliver Smith 191ecd07cf jobs/gerrit-verifications*: drop unsupported args
Fix warnings when updating the job with Jenkins Job Builder:
  WARNING:jenkins_jobs.modules.triggers:Gerrit Trigger property 'no-name-and-email' is deprecated
  WARNING:jenkins_jobs.modules.triggers:Gerrit Trigger property 'trigger-for-unreviewed-patches' is not supported in this plugin version

Related: OS#2385
Change-Id: I6a0057738955bc2507cb5d8c4d48edf652c3529f
2022-10-13 10:51:55 +02:00
Oliver Smith b4dca82f83 jobs/gerrit-verifications: add approvals comment
Related: OS#2385
Change-Id: I4dfc0f84ffe584523bbff4c41295968a07ba097d
2022-10-13 10:51:52 +02:00
Oliver Smith 4e679c8f2e jobs/gerrit-verifications: write summary comment
Instead of having multiple mails from jenkins per submitted gerrit
patch, only have one at the end of the pipeline that writes a summary
with all relevant links and votes +1/-1 for verified.

This also resolves the problem we had for a long time, that the link for
the build job didn't directly point to the relevant console output.
Instead it pointed to a matrix job that didn't have a direct link to the
relevant job.

The summary looks like this:

1 failed:
  [build] https://jenkins.osmocom.org/jenkins/job/gerrit-osmo-bsc-nat-build/a1=default,a2=default,a3=default,a4=default,label=osmocom-gerrit-debian9/11/consoleFull

3 passed:
  [rpm] https://jenkins.osmocom.org/jenkins/job/gerrit-binpkgs-rpm/5/consoleFull
  [deb] https://jenkins.osmocom.org/jenkins/job/gerrit-binpkgs-deb/5/consoleFull
  [lint] https://jenkins.osmocom.org/jenkins/job/gerrit-lint/11/consoleFull

Build Failed

Related: OS#2385
Change-Id: Idcab969e1b5ca4e0f1383bee8f36f2d1aac4f624
2022-10-11 12:07:40 +02:00