Commit Graph

128 Commits

Author SHA1 Message Date
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
Pau Espin cf17475839 jobs: Enable --without-sse build variant for osmo-trx
Change-Id: I47a2067dc25335557dfa93f291f6ca9cd4959735
2020-09-18 21:15:10 +02:00
Harald Welte 53e344d574 jenkins: add master + gerrit for osmo-smlc
Change-Id: Iaeb064ed8e7d08db305f1928dc26d16dc6c889dd
2020-08-21 20:17:49 +02:00
Harald Welte 512e6bc46d jenkins: Add master+gerrit job for osmo-el2tpd
Change-Id: I220741236c85ab7e25593b7dfadafaeb786ee503
2020-05-03 21:32:09 +02:00
Harald Welte 933f866eff jenkins: add osmo-uecups to gerrit+master
Change-Id: I3ca141edcd61ae4126fa28f6560c99a1f568dec7
2020-04-17 15:18:40 +02:00
Pau Espin 94a0a917be job: Update master and gerrit osmo-pcu jobs to also build on ARM platform
Related: OS#4301
Change-Id: I8109cc9a71e6c14304ed6463f9b073ef3f4f3c2a
2020-03-16 10:30:26 +00:00
Pau Espin cf36253aea job: Update master and gerrit osmo-bts jobs to also build on ARM platform
Related: OS#4301
Change-Id: I72e228ff1a126f6c41c5fd6a530de85e177a0d21
2020-02-26 08:39:27 +00:00
Pau Espin 4f98ae06a3 job: Update master and gerrit osmo-trx jobs to also build on ARM platform
Related: OS#4301
Change-Id: I0049ab35b5106d5af8474903e203f66b044ff5ca
2020-02-26 08:39:27 +00:00
Oliver Smith fb3dc0b775 gerrit-verifications: fix erlang/osmo_ss7 name
Fixes: aadc60f403 ("jobs/gerrit-verifications.yml: add erlang repos")
Related: OS#4345
Change-Id: Id78f7e62e12c7595329ef8a265e522f27a087604
2020-01-17 16:21:44 +01:00
Oliver Smith 2c13d633ec gerrit-verification: fix erlang cmd
Jenkins job builder only does one pass of variable substitution. Replace
the cmd_erlang variable with its contents, so the jobs don't fail with:

[osmocom-gerrit-debian9] $ /bin/sh -xe /tmp/jenkins7189809471369692535.sh
+ {docker_run} {docker_img_erlang} /build/contrib/jenkins.sh
/tmp/jenkins7189809471369692535.sh: 2: /tmp/jenkins7189809471369692535.sh: {docker_run}: not found

Fixes: aadc60f403 ("jobs/gerrit-verifications.yml: add erlang repos")
Related: OS#4345
Change-Id: I6e121c79ecf872a7058de3a6dc0a940fa8091f68
2020-01-17 15:03:08 +00:00
Oliver Smith aadc60f403 jobs/gerrit-verifications.yml: add erlang repos
Run contrib/jenkins.sh in erlang repositories, that were recently
updated (osmo_gsup, osmo_dia2gsup, osmo_ss7).

Depends: docker-playground Ia3eaec6090c9652549b2850de74ee21730374bbd
Related: OS#4345
Change-Id: I05d152de6b7a04dee935d79b9987c511351eca95
2020-01-15 10:26:23 +01:00