Commit Graph

157 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
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 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 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 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
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 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 818d29d9e8 jobs/master: add workspace.tar.xz to artifacts
Upload workspace.tar.xz if it was created by osmo-bsc or osmo-msc, after
the testsuite failed. This should help with figuring out why sometimes
we get a coredump.

Related: OS#5665
Change-Id: I40b738558b83efc9256e5d5c48ffce42ddce9a8a
2023-05-23 16:15:25 +02:00
Oliver Smith 295ed1f7d3 jobs/master-builds: add IS_MASTER_BUILD=1
Related: OS#5665
Change-Id: I6cd5f0383fcceaf77e5fa2f7441f9ae9aa8e8734
2023-05-23 16:14:05 +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 f75d09a79e jobs/osmocom-obs: drop obs.osmocom.org suffix
Having the OBS URL at the end of the jenkins job was useful when we were
uploading to obs.osmocom.org and build.opensuse.org at the same time
during the transitional phase. Remove the URL from the job name as this
isn't the case anymore, and so the jobs look consistent with new
Osmocom_OBS jobs.

Change-Id: I460f9e6a508421773e300eee6c5c5654e5760cdb
2023-04-06 10:59:28 +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 d6eed85d44 jobs/master-builds: use debian-bullseye-jenkins
I've verified that all master-builds jobs still work with this change.

Related: OS#5949
Depends: docker-playground I51925d0ab9e5a779379efab59c381ef12fb60929
Change-Id: I7d5bc7bb4c1457d4e05fd6e0d27668382c39973a
2023-03-21 16:49:22 +01:00
Oliver Smith 22f3e07636 jobs: master-osmo-e1-hardware: fix manuals
Build the manuals with the regular docker image, instead of the
fpga-build one.

Fix for:
  build/shrink-pdfs.sh: 8: build/shrink-pdfs.sh: ps2pdf: not found

Related: SYS#6380
Change-Id: I6e9f832dc449af0ca7def29ef5a9161285b01736
2023-03-20 10:46:30 +01: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 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 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 48614942c6 jobs/master-builds: use osmo-iuh/master for asn1c
As discussed with Pau, let's build the "osmo-iuh/master" branch of our
asn1c.git repository in jenkins. This branch is what we actually use for
osmo-iuh and "master" should track upstream master.

Related: OS#2435
Change-Id: Ic97a23a175b301e6f42f7ca67deb84dcc3ee3f90
2022-12-27 17:02:38 +00: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 fe8bc324d9 jobs/master-builds: more binaries ssh credentials
Make the binaries_ftp.osmocom.org ssh credentials available to more jobs
that need them.

Related: OS#5798
Change-Id: I4f719c6daba06dcfadd252a4030293bdc0e26337
2022-12-01 10:30:13 +01:00
Oliver Smith 96f25bf519 jobs/master-builds: use binaries ssh credentials
Allow overriding the ssh agent credentials per repository, and use
binaries_ftp.osmocom.org where needed. Use docs_ftp.osmocom.org instead
of 97634b9d-a867-4f6d-825d-1da99813e93d so it's clear what the key is
for. I generated a new one with the new ID.

Fixes: OS#5798
Change-Id: I821968e09aaac3f6f6178de33fc909f81cb4abcb
2022-11-30 12:56:47 +01:00
Oliver Smith 935d742837 jobs/master-builds: pysim: don't use deb9 lxc
Don't require the debian 9 lxc anymore for publishing docs, the ssh key
problem that made this necessary has been solved.

Closes: OS#5767
Change-Id: Ia4ee524db059a978bedc1d92804fb59d7513d2cb
2022-11-28 15:10:31 +01:00
Oliver Smith 310859b21a jobs/master-builds: don't only use debian 9 lxcs
Change-Id: I62bf0b968103724ec676900de6cee65fdb00b9e4
2022-11-28 15:09:33 +01:00
Oliver Smith 40ced5a1a0 jobs/master-builds: pass ssh agent sock to docker
Pass the ssh agent to docker for master builds, so we can publish
manuals and other files generated during the builds. This used to work
with the .ssh directory where each lxc had its own key. But we are
changing that to have the keys in jenkins and use the ssh agent, so it
works without additional configuration when adding new nodes/lxcs (such
as the two deb11 lxcs we just added).

Change-Id: I6dc1fd5d7e81ec135f805562608f06cf03a1baeb
2022-11-28 15:09:33 +01:00
Oliver Smith 6b7741400d master-pysim: use specific node for docs upload
Related: OS#5767
Change-Id: I25d799ccd0609732f7f82034f97881f1c75dcdf8
2022-11-14 13:13:34 +01: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 a3e83d6d40 jobs/master-builds: add timeout_cmd
Add the default timeout of 30 minutes to each job, just like in
gerrit-verifications.yml.

Change-Id: I2ed80258d5f2fbcd8cf27db74db125d9a52b9988
2022-11-04 11:17:59 +00:00
Oliver Smith 6b17805553 jobs/master-builds: add ice40-usbtrace
Related: OS#6169
Change-Id: I8872f20eabf2975aea602c9e95f66d144f74742d
2022-10-24 17:09:42 +02:00
Oliver Smith b5d65e6dae jobs/osmocom-obs: add job for master feed
Add one new job for building source packages and sending them to
obs.osmocom.org. Trigger it from all master-* jobs.

I've also considered adding one job per existing master job that would
only update one package at a time (master-libosmocore-obs,
master-osmo-bsc-obs, ...). With some additional development effort it
should be possible, and it would make each individual master OBS job
faster. But given that with the current implementation it only takes
20s to 30s for *all* packages if there are no changes, as it compares
git remote HEAD with the version currently on OBS before starting to
clone repositories and building the source packages (similar to
Osmocom_OBS_latest_obs.osmocom.org), it didn't seem worth optimizing.

Set concurrent to false as the triggers from master-builds will likely
cause it to run multiple times in parallel otherwise.

Related: https://jenkins.osmocom.org/jenkins/view/OBS/job/Osmocom_OBS_master_obs.osmocom.org/
Related: https://obs.osmocom.org/project/show/osmocom:master
Related: OS#2385
Change-Id: I53a494f13f81ae837f2d362c54e1bdf13f121db3
2022-10-06 07:44:31 +00:00
Oliver Smith 317e429f9e jobs/master-builds: use jenkins-notifications ML
I didn't receive mail notifications about failing
master-osmo-opencm3-projects jobs. It seems they are not getting
through on the gerrit-log mailing list, searching for jenkins gives no
results:
https://lists.osmocom.org/hyperkitty/search?mlist=gerrit-log%40lists.osmocom.org&q=jenkins

And it seems to be the wrong ML anyway, so change it to
jenkins-notifications.

Change-Id: I15a747411d928055c71603cd4475289a77c8e749
2022-08-30 14:39:01 +02:00
Oliver Smith a0dd1d923d jobs/master-builds: clone from gerrit.osmocom.org
Work around two issues with cloning from https://git.osmocom.org:
* cloning via https from git.osmocom.org is unreliable, leads to lots of
  mails of failed builds
* the cgit mirror of libosmo-gprs.git is out of sync

Related: https://lists.osmocom.org/hyperkitty/list/openbsc@lists.osmocom.org/message/YVYMAC423OJ3FNP52YAX55RDUQXV6FZ2/
Change-Id: I2f345be55f5c7eb42655dc346776ad8891af126d
2022-08-19 14:08:28 +00:00
Oliver Smith 71bafe74d3 jobs/master-builds: archive core, testsuite.log
In case one of the master-buils is segfaulting or has an error in the
testsuite, collect the relevant files and store them as artifacts.

It was asked in the related issue to do this only on error, however
while there's an option to archive only artifacts when a build is
successful, there is not an option to do it only on failure. So just do
it always, the testsuite.log file is typically just a few kb in size.
core files should only get generated on error.

Closes: OS#5642
Change-Id: I91d4b995b16c8e028a5dff19b0e0f09c01d8c8c6
2022-08-17 08:10:12 +00:00
Harald Welte 5455b42405 update git URLs (git -> https; gitea/gerrit)
Unencrypted git:// protocol offers no integrity or authentication,
making it subject to tampering.  Use https:// instead.

https://github.blog/2021-09-01-improving-git-protocol-security-github/#no-more-unauthenticated-git
https://blog.readthedocs.com/github-git-protocol-deprecation/

Change-Id: Ia44e4127ff87a3d4d747225d3258188a0a891f1b
2022-08-13 04:02:51 +07:00
Harald Welte 942f5ef96c master-opencm3-projects: Build from gitea, not git
git.osmocom.org is a mirror of gitea.osmocom.org, let's build from
the actual master repo, not from the (possibly slightly outdated) mirror

Change-Id: I12d090a9ee7fde09892567ada739826484a4a35b
2022-08-12 12:11:05 +02:00
Vadim Yanitskiy ac0b663951 {jobs,coverity}: add a new project - libosmo-gprs
Change-Id: I83e86084e9f7a7431bf5a70c372da1f9ccd28436
2022-08-10 04:39:36 +07:00
Vadim Yanitskiy 33c09f4344 jobs/master-builds: fix libosmo-pfcp related trigger mess
* master-libosmo-pfcp is triggered directly by libosmocore, not
  by master-libosmo-netif, nor master-libosmo-abis, so
** fix comment explaining the hierarchy.

* master-osmo-upf is triggered by master-libosmo-pfcp, so
** it should not be triggered directly by libosmocore.

Change-Id: Ie4a5cb47464e9abfc9d04e63e9e71619f33ffd42
Fixes: Icb75adec886cf1053b80c968fea59e597ed289a7
2022-08-10 04:08:30 +07:00
Oliver Smith 86c77d3958 jobs/master-builds: enable osmo-opencm3-projects
Use debian-bullseye-jenkins to have picolibc-arm-none-eabi available.

Related: OS#6041
Change-Id: Iefff6e3c3b18f4af99079635a45320faaac54e50
2022-07-12 14:33:30 +00:00
Oliver Smith 8424c5986f jobs: stretch -> buster
Related: OS#5601
Change-Id: Ieb2bfc426563e48b9b8cd3910efbebdf09b41f46
2022-07-06 15:20:22 +00:00
Oliver Smith 3577608180 jobs/master-builds: disable master-osmo-opencm3-projects
As discussed in the team meeting, disable it for now.

Change-Id: I4a79a146042d5cf586f5273960a9a2b92b45b1be
2022-06-21 11:39:32 +02:00
Neels Hofmeyr 38d569d45f add libosmo-pfcp
Change-Id: Icb75adec886cf1053b80c968fea59e597ed289a7
2022-06-17 16:33:10 +02:00