Commit Graph

138 Commits

Author SHA1 Message Date
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
Oliver Smith 9e1f9ae039 jobs/gerrit-binpkgs: new job for deb, rpm packages
Build deb and rpm packages for each patch submitted to gerrit for the
projects in the list.

Example:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/29492

Related: OS#2385
Change-Id: I7ca8869c2e9f2e7c74a360933be12b5c2b47c2fc
2022-10-11 12:07:40 +02:00
Oliver Smith 58ecce985b jobs/gerrit-lint: run as part of pipeline
Reduce mails by running gerrit-lint as part of the gerrit-verifications
pipeline.

Related: OS#2385
Change-Id: I5f1340248cd116c5fa5134eee3fae50baf7ef851
2022-10-07 15:39:53 +02:00
Oliver Smith 4d214f4f9a jobs/gerrit-verifications: add param to skip build
Prepare to unify the list of projects in jobs/gerrit-verifications.yml
and jobs/gerrit-lint.yml by allowing to skip the build for some
repositories (e.g. docker-playground is linted but we don't run a
contrib/jenkins.sh there).

Change-Id: Ie6264d44120798c0ecbcaf9c63d9b95f74ae9e37
2022-10-07 10:18:21 +02:00
Oliver Smith c3bab9ab41 jobs/gerrit-verifications: wrap in pipeline job
Prepare to reduce the amount of comments sent to gerrit from jenkins and
resulting mails. Instead of triggering the jobs directly from gerrit,
trigger a pipeline job that calls the original job (now called
gerrit-{repos}-build) and will in future patches call all other gerrit
verification jobs too (linter, building deb/rpm packages).

Change-Id: Ica208a5177739655cdd493d461da146d440cd542
2022-10-07 10:18:17 +02:00
Vadim Yanitskiy ac0b663951 {jobs,coverity}: add a new project - libosmo-gprs
Change-Id: I83e86084e9f7a7431bf5a70c372da1f9ccd28436
2022-08-10 04:39:36 +07:00
Oliver Smith 2bb0a98756 jobs/gerrit-verifications: add osmo-opencm3-projects
Related: SYS#6041
Change-Id: Ic514e96ff515c5703f39f5a31f419ff344179368
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
Neels Hofmeyr 38d569d45f add libosmo-pfcp
Change-Id: Icb75adec886cf1053b80c968fea59e597ed289a7
2022-06-17 16:33:10 +02:00
Oliver Smith 382aebd040 treewide: rename rpi4-raspbian10 to rpi4-raspbian11
The raspberries have been upgraded to the debian 11 based raspberry pi
OS. Adjust the name to avoid confusion.

Related: OS#5453
Change-Id: I0b2e08b11d83243e81b2bb4412ffcc9bc59821ff
2022-05-02 13:29:50 +00:00
Harald Welte 8349494c9e jenkins-jobs: Add master + gerrit for dahdi-tools
Change-Id: I9c007e070e168bfe6509f50dbc3b4e0846c31356
2022-02-21 21:23:58 +01:00
Oliver Smith b712491a56 jobs/gerrit-verifications: build ttcn3 in docker
Build the testsuites in the same docker container during gerrit
verification, as it will be the case when building and running the
testsuites in the various ttcn3-* jenkins jobs.

This avoids the need to install eclipse-titan and libfftranscode on the
jenkins nodes.

Related: OS#5452
Change-Id: I6a667255bb55a945b4c6279d711142aa252c6996
2022-02-21 08:08:00 +00:00
Pau Espin ef9b2c4062 Use docker image debian-bullseye-erlang instead of debian-buster-erlang
Let's use newer debian to avoid problems with older erlang. Furthermore,
the new image builds rebar3 to avoid issues with unmatching erlang
versions.

Change-Id: I7b1956c515daccf6ab1ff87031c6fec649cadb4b
2022-02-15 20:36:10 +01:00
Oliver Smith c04fb387ea jobs/{master-builds,gerrit-*}: add osmo-bsc-nat
Related: SYS#5560
Change-Id: I240cb614bf3905d04bccc6a00c72567a2ad722d8
2022-01-31 14:05:34 +01:00
Pau Espin 702fd8ff94 Add new repo osmo-hnbgw (nightly) to build jobs and scripts
Change-Id: I2fdbd651e4b50191e1a67e183590de99d6366ca5
2022-01-05 11:39:41 +01:00
Neels Hofmeyr 0c5869f359 jobs: add osmo-upf (gerrit, master builds, ttcn3 tests)
Change-Id: I43cd55c9395f2c706369afe1a9a7f475be47339f
2021-12-28 15:57:54 +01:00
Pau Espin 2146640769 Add osmo-hnodeb to ansible/jenkins/coverity setup
Change-Id: Ie4b03aefeda13d216706bd648145689cf2ef93bb
2021-10-25 11:06:48 +02:00
Oliver Smith 1658ff58aa jobs/gerrit-lint.yml: add lint jobs
Related: OS#5087
Change-Id: Ic473a5c535dfbdda55751e53fc751ede1adde7e2
2021-09-06 10:56:26 +00:00
Oliver Smith 463a6cc012 jobs/master,gerrit: run osmo-{bts,trx} in docker
Build both of them in docker, like most other projects.

Depends: docker-playground Ieec31fd6a2034c4430be81afd1d370816cd577d5
Related: OS#5055
Change-Id: Ifc11730192b852d3760a31a561efc61a1a853674
2021-03-09 09:30:27 +01:00
Oliver Smith 8c48d2020a jobs/*: update references to rpi4 nodes
Use the new label that matches all three rpi4 nodes in master-builds and
gerrit-verifications (so the builds can run on any of them). Use the
names of the three nodes in update-osmo-*-on-slaves, so all of them get
updated.

Related: https://jenkins.osmocom.org/jenkins/label/rpi4-raspbian10/
Related: OS#5055
Change-Id: I5b2af801baeb510e7784d6bcd7cabfda4962af0c
2021-03-08 15:44:11 +01:00
Harald Welte 2933da3810 master + gerrit jenkins jobs: Add osmo-gbproxy
osmo-gbproxy is moving to its own reporitory

Change-Id: Id29c83bdcd9b626bb7920738c8b1f945ef7f3671
2021-02-03 08:38:06 +00:00
Oliver Smith 9dadec3209 jobs: remove duplicate docker_run
docker_run was duplicated for osmo-e1-hardware and no2bootloader, so the
'-e PATH' line could be removed from the global docker_run. It was
overriding the PATH, which then did not contain the path to the compiler
toolchain anymore.

This workaround is not needed anymore since de5aa17d6 ('jobs: don't
overwrite PATH in "docker run"').

Related: OS#4911
Change-Id: I97a4add17d9fa1bd28ab0ceb054b9a8d948b6f86
2021-01-13 12:40:18 +01:00
Oliver Smith 212e43fa1c jobs: update OSMO_GSM_MANUALS_DIR
Use new location inside / outside docker, where the repository was
cloned already. So it does not need to be cloned during the job.

Roll out: make sure that the docker images are already built! (or let me
merge it)

Related: OS#4912
Depends: docker-playground Id402e0ea372b5ca8a6c8f6f5beb190544c888207
Change-Id: Ibe91a613162687589e006cba99193606fb8a3eb9
2021-01-13 12:40:18 +01:00
Oliver Smith 24a5609f30 jobs: add missing OSMO_GSM_MANUALS_DIR
Add the variable to projects that don't use docker at all or overwrite
docker_run instead of using the global variable that has
OSMO_GSM_MANUALS_DIR defined.

Related: OS#4912
Change-Id: I65102655b4b3e907a0b0de8026f8f9af76281f90
2021-01-12 13:54:55 +01:00
Oliver Smith de5aa17d6d jobs: don't overwrite PATH in "docker run"
Don't mount $HOME/bin to /build_bin, and don't overwrite PATH to include
/build_bin anymore. This isn't needed because the scripts are installed
to /usr/local/bin inside the docker images now.

Depends: docker-playground I0820f13cd740f7d4a8999d279cef6ae293a67d81
Related: OS#4911
Change-Id: I45bd7ea56849dab839a98cfd52806f7cd288094e
2021-01-12 09:15:45 +01:00
Oliver Smith 4cbc445616 osmo-build-dep.sh: don't build osmo-gsm-manuals
Save time by only cloning the repository, and not running autoreconf
-fi, ./configure, make and make install. Especially the tests during
make took up significant time, that slowed every project depending on
osmo-gsm-manuals down while being built through master-builds or
gerrit-verifications jobs. Set OSMO_GSM_MANUALS_DIR to the clone
location.

This is an interim measure, I'll submit more patches soon that remove
the 'osmo-build-dep.sh osmo-gsm-manuals' calls from all projects.

Change-Id: I5238cf3f93ded97ed2b44d27868123a646e122dc
Related: OS#4912
2021-01-12 09:14:38 +01:00
Daniel Willmann e7b1594497 Add timeout to gerrit verifications
Gerrit verification jobs sometimes hang (usually during the VTY tests).
At some point we should just time out, default is 30 minutes

Change-Id: I6fc6ee976f2d88efdab1582a418d1adcd384c850
2021-01-04 18:40:18 +01:00
Harald Welte cbce526b0f Add master + gerrit job for osmo-e1-hardware
Change-Id: I02295e157f909bca985c1919a7828da0554ee1ef
2020-12-17 18:48:28 +01:00
Harald Welte f8b9737728 jobs: master + gerrit: Mark them as running on debian9. not debian8
We actually do the verification inside a (debian 9) docker container anyway,
so there's no need to run those on the old debian8 slaves.

Change-Id: I2168bd2f0e6221518ece111e29dc604c33eaca6a
2020-11-14 23:24:36 +01:00