Commit Graph

559 Commits

Author SHA1 Message Date
Oliver Smith 7c987a83b3 docker: only one apt/pip cmd for installing deps
Make the retry logic in rebuild_osmocom_jenkins_image.sh obsolete by
merging all apt commands for installing dependencies into one. This
makes development easier, because the docker image will not get rebuilt
again when any error happens (whether that error was related to the apt
cache or not, during development it is mostly not related to the apt
cache).

This also makes it easier to read through the list of dependencies, and
removes duplicate (or even conflicting, pkg-config vs pkgconf) entries.
While at it, also merge the pip commands into one.

Change-Id: I190e62dd39533b284c93107607dac24ece6d7be6
2019-10-18 10:44:11 +02:00
Oliver Smith f58d2231a9 gerrit, master builds: default to concurrent: true
Now that almost everything runs in docker, we don't need to worry about
problems with running VTY/CTRL tests in parallel for these projects.

Related: OS#3726
Change-Id: I5fdf759faf47ec7e4f9cb2657bd004585a667add
2019-10-18 10:44:10 +02:00
Oliver Smith b082c969cb gerrit, master builds: build almost all in docker
Instead of building some projects in docker, and some directly on the
build slave, build almost all of them in docker with few exceptions, and
make building in docker the default.

This has several advantages:
* build environment of master builds and gerrit verifications is the
  same, therefore the same build won't pass in gerrit and then fail in
  master
* all build environments are volatile
* no more conflicts while running VTY/CTRL tests
* fix osmo-python-tests gerrit review versions being installed to
  /usr/local of build slave (see previous commit message)

Projects that still do not get built in docker:
* openggsn: depends on libgtpnl, but does not build it in jenkins.sh
* osmo-bts: l1headers, various SDKs not installed in the docker image
* osmo-trx: LimeSuite is not in the docker image (and just installing the
            debian package does not work)
* osmo-ttcn3-hacks: TTCN-3 not installed in docker image
* pysim: needs to access real sim cards attached to the host
* sysmo-usim-tool: needs to access real sim cards attached to the host

Related: OS#3726, OS#3598
Change-Id: If4b7d2f9ffbc7e92699732d97a8f5829a88c5b35
2019-10-18 08:38:58 +00:00
Oliver Smith 88b26a372d docker: chown -R build:build /usr/local
Prepare to run osmo-python-tests in docker. I've noticed that its
contrib/jenkins.sh tries to write to /usr/local, which makes sense for
the "update-osmo-python-on-slaves" job to actually deploy new versions.
However, the same script gets called in gerrit-verifications too, and
there we should definitively not install a version that is still in
review to whichever random buildslave that is executing the
gerrit-verification job! The follow-up patch for building most Osmocom
projects in docker will fix this bug.

Related: OS#3726
Change-Id: Ie1de8a6d436de0b286ed3372166eceb408bab084
2019-10-17 08:05:16 +00:00
Pau Espin 4743f82b4c jobs/master-builds.yml: Set node for master axis job
Otherwise the master job managing the axis can be run on any node,
something which is not desirable. For instance, right now job
master-osmo-ggsn is run on osmo-gsm-tester-rnd which is currently unable
to fetch some git repositories.
Let's avoid running master tests on unintended nodes.

Change-Id: I62abb3c490588adc4c0e13c761de44d442f8cefe
2019-10-15 12:37:14 +02:00
Oliver Smith a7fcf3218d build-old-tags: remove LD_LIBRARY_PATH
Do not set LD_LIBRARY_PATH during builds, as this causes testsuites to
use the wrong libraries.

This bug appeared with libosmocore, it gets built for master first, and
then an old version like 1.2.0. When using LD_LIBRARY_PATH, the tests
during the 1.2.0 build are executed against the libosmo*.so from
master, which causes a few tests to fail.

Change-Id: I0bfb57e418b91c298337b9426448fbcfd7bf32e6
2019-10-11 11:03:39 +00:00
Oliver Smith a94d67f02e docker: add more dependencies
Prepare for building almost all Osmocom repositories in docker, by
installing new required dependencies:

* libaio-dev: needed for osmo-ccid-firmware
* libasound2-dev: needed for gapk
* libboost-all-dev: needed for libusrp
* libcsv-dev: needed for osmo-remsim
* libmnl-dev: needed for libgtpnl
* libnewlib-arm-none-eabi: needed to cross compile libosmocore to arm
* liboping-dev: needed for osmo-sysmon
* libulfius: needed for osmo-remsim (libulfius is not packaged in debian
  stretch, download the project's official .deb release instead)
* libzmq3-dev: needed for osmo-pcap
* sdcc: needed for libusrp
* systemd: needed for osmo-remsim (provides systemd.pc, indirect
  dependency through libulfius)

Related: OS#3726
Change-Id: I5caebd26090169cc3c9fdd1f14984ea2a75347e8
2019-10-11 10:09:04 +02:00
Oliver Smith a8153577fe gerrit, master builds: use stretch, not jessie
Debian jessie (8) is EOL already, so switch to stretch (9). This is
required to build all Osmocom projects in docker, because at least
libosmocore fails to build with the old image (tests won't build with
GCC-4.9.x from jessie unless -Werror is disabled).

Do not build the jessie image anymore, and update the shared dockerfile.
Remove everything jessie specific, and make it work with stretch by
installing asciidoc-dblatex. Otherwise we get this error when building
manuals:

a2x: ERROR: missing configuration file: /etc/asciidoc/dblatex/asciidoc-dblatex.xsl

Add '--cap-add SYS_PTRACE' argument to the docker run command, because
otherwise the address sanitizer isn't working anymore with stretch
(which makes the OsmoPCU tests fail).

I've tried to split this patch up into multiple ones, but since there is
no asciidoc-dblatex package in jessie, we must add the dependency and
switch the image at the same time.

Related: OS#3726
Change-Id: I61fe93863d5367e3b9c01ab4726bb95bd16d891d
2019-09-24 08:04:53 +02:00
Oliver Smith a5fb5484ae gerrit, master builds: add docker_{run,img} vars
Move the common "docker run" invocation and image name into one place,
so it is not duplicated over and over. This prepares for changing the
image and building all Osmocom projects in docker (follow up patches).

Related: OS#3726
Change-Id: If529e6a93bb2227230981ee22f2c75bd0f1f4518
2019-09-23 14:08:59 +02:00
Pau Espin 70f8ca71d0 ansible: gsm-tester-rnd: Add nano3g device to static IP DHCP leases
Change-Id: Iaad3e9f5b6b1966322abb89f54611a2368400dcb
2019-09-20 15:02:46 +00:00
Oliver Smith 5ca12a8359 gerrit, master builds: concurrent OsmoPCU builds
Re-enable concurrent builds for OsmoPCU, and run all builds in
docker. This should prevent previous problems with VTY/CTRL test
collisions, which lead to the concurrent builds being disabled
in I23d5b75825a667e4f043d16a12b841cd8f01af5e.

Related: OS#4204
Change-Id: I4f90a601e41dca18a6fcbab56bdf5663167d2353
2019-09-19 10:48:18 +02:00
Harald Welte d3a5d51e47 jenkins-jobs: Add ttcn3-remsim-test for {master,latest]
Change-Id: Ib4e3f3f0153c38765868cfd2014cd56cd47c2c79
2019-09-13 14:02:17 +02:00
Oliver Smith 3d510e87a4 gerrit-verifications: fix osmo-bts cmd
Fixes: 932b003750 ("gerrit, master builds: use ASCIIDOC_WARNINGS_CHECK")
Change-Id: Ia17d6a14ede93bae715fb67826b074ab91f87749
2019-08-23 12:27:39 +02:00
Oliver Smith 932b003750 gerrit, master builds: use ASCIIDOC_WARNINGS_CHECK
The asciidoc warnings check fails the build if asciidoc prints a warning
while building the documentation. We had this enabled by default, but
since OBS uses various asciidoc versions, we could get unexpected build
failures (different asciidoc versions print different warnings).

Now that it is disabled by default, explicitly enable it for jenkins
again.

Related: OS#4140
Depends: Iac993a0d1b17205397a1f1ef1a7bd3f9df739e36 (osmo-gsm-manuals)
Change-Id: I8775d45b4dc1a5a46e2ba042fc7ee7d9f10f18cc
2019-08-21 11:46:24 +00:00
Daniel Willmann 84e2ce3d6e master-builds: Publish osmo-hnbgw documentation
Requires: Ic7437daeab0b07d16fd71ca3881cb31bab7b1925 (osmo-iuh)
Change-Id: Ia1be4ef79a1089d7af582acb63eb3afa5a60f4f3
2019-07-30 16:14:23 +02:00
Oliver Smith ef81fd660a jobs: upload to OBS before debian-install test
Make sure that we don't test yesterday's packages. Adjust timers to run
the OBS job around 1 o'clock, and the debian-install test around 4
o'clock. Use the H (hash) symbol for minute to spread the load.

Change-Id: I503058018172d50e9585d4804dfec1b4ece7644a
2019-07-26 08:55:21 +02:00
Oliver Smith b86cf865c1 osmocom-debian-install.yml: add BRANCH variable
Allow changing the branch in the jenkins UI when starting the build.
We already have this in other jobs, and it is very useful to test
changes.

Change-Id: Ice4662551625b3c96ca105629a934a0a081db2e4
2019-07-23 12:14:26 +00:00
Oliver Smith 6550682ee0 osmocom-debian-install.yml: update description
Replace "Generated by job-builder" with a proper description. The job
builder automatically adds "<!-- Managed by Jenkins Job Builder -->" to
the description (which is visible when editing the job), so we don't
need to mention it in the description at all.

Related: OS#3369
Change-Id: I17d2e9e0ac7fe77fb0306724a1f1e15641d76854
2019-07-23 12:14:26 +00:00
Oliver Smith df967f76f6 OBS: print date/time before git clone and on error
The OBS job clones a lot of repositories from git.osmocom.org every
night, so it is a good candidate to reproduce the "garbage at end of
loose object" error we are getting sporadically.

Print exact timestamps, so we can check if there is anything related in
the server logs, when this error happens again.

Related: OS#4083
Change-Id: Ic9a6d3f0c2b8dad2661ede793c21307f1680a52e
2019-07-22 13:22:33 +02:00
Harald Welte dcb9edafd4 latest-packages: Enable osmo-remsim as new libosmo-abis is tagged
Change-Id: Id1902f8b79357ac280767edba3698450f67b7c37
2019-07-21 21:35:00 +02:00
Oliver Smith 4e2b2bc8a5 gerrit-verifications: add libtelnet
Related: OS#3047
Change-Id: Iafffd9d938ee310bb729b3e2a0a4d80870d4b3b5
2019-07-11 11:06:05 +02:00
Oliver Smith cbc11dc112 jobs: add osmocom-release-tarballs.yml
Related: OS#3870
Depends: I991fe41a1f55ccd6a66815ec3d7f239850397d9a (docker-playground)
Change-Id: I994da5c27f9198e5bcf2d567dd473f9ed078d9c0
2019-07-02 13:27:44 +02:00
Oliver Smith e6aff494a6 common.sh: add docker_images_require
Clone docker-playground.git, source its jenkins-common.sh and run
docker_images_require from there. This will make it possible to run
osmocom-release-tarballs.sh in a docker container, for which the
Dockerfile is stored in docker-playground.git.

Related: OS#3870
Change-Id: Ic4519ccb6978793054869862f8ca0e21d9cf5be4
2019-07-02 13:14:59 +02:00
Oliver Smith 0a389c4083 scripts: add osmocom-release-tarballs.sh
Generate tarball releases for all tags in all repositories.

Related: OS#3870
Change-Id: I0a904c26e1c45aa46ddc59a01b776f2c7c5f947d
2019-07-02 12:59:52 +02:00
Oliver Smith 0aa0ba0c55 osmocom-list-commits: move repo list to common.sh
Prepare for new script, which will use the same list of repositories.

Related: OS#3870
Change-Id: I954b1d5229c44ebcec7e7228f2565a5c6755d16c
2019-07-02 10:24:57 +02:00
Oliver Smith a5d5bedd55 common.sh: osmo_git_last_commits_tags: add "all"
Allow printing all tags instead of only the N most recent ones.

Related: OS#3870
Change-Id: I684c6881915831b33b679e8ae873213beb034ab7
2019-07-01 13:41:40 +02:00
Oliver Smith e26866af0d OBS: make nightly packages conflict with latest
Add conflicting dummy packages osmocom-nightly and osmocom-latest, and
make all packages from each repository depend on the right one.

As usually, the latest packages will only get changed when a new release
appears. So the dependency will get introduced after tagging a new
release. I have tested in an own OBS namespace, that everything works as
expected.

Related: OS#2640
Change-Id: I79c45e798c10a65443b9fb9ecb54393d1918608a
2019-06-17 12:21:32 +02:00
Oliver Smith 83f4f25d7c OBS: build osmo-gsm-manuals-dev in latest
Enable in osmocom-latest-packages.sh. Check it out and create the source
package for the latest release as usually, but also create a second
version for debian 8 with adjusted dependencies (like in nightly [1]).

[1] Change-Id: I3570599ede51b974d350064f44f77e360fafd8b0

Related: OS#3899
Change-Id: Ib7251cca9116151e473798879375cd5eb48ff3ad
2019-05-29 12:41:11 +02:00
Oliver Smith 9dc7e2ad4b OBS: latest: remove redundant checkout in build()
Don't checkout a specific version in build(), this is already done in
checkout().

Change-Id: I74290968fe25a6311da0de26ff675bbd687ba156
2019-05-29 12:37:39 +02:00
Pau Espin 777a2f8060 nightly-packages: Update LimeSuite to latest tag (v19.0.4)
Change-Id: Id6c27a924e3005ffadc7720190b261f089beada1
2019-05-24 09:35:12 +02:00
Oliver Smith d15390302d gitignore: add nightly-3g_* (nightly OBS script)
Change-Id: I943eebc8787b78fef266df5654831e99122a4e6a
2019-05-23 11:47:33 +00:00
Oliver Smith 85163cd7f4 jobs/osmocom-obs.yml: set default git branch
I was quite surprised, that the job used "osmith/pdfs-in-doc-subpackage"
instead of "master" today [1]. Fix this randomness by adding a branch
parameter that defaults to "master".

Interestingly, we have to set the default branch to
"refs/remotes/origin/master". When using "*/master" (like we do in other
jobs), Jenkins would still chose my branch over "origin/master", even
though mine does not have "master" in the name. I have also tried
"chosing-strategy: 'default'", in case it was using the gerrit strategy
for some reason (like in [2]), and setting 'refspec:', but both did not
have any effect.

[1] https://jenkins.osmocom.org/jenkins/job/Osmocom_OBS_nightly/98/
[2] https://issues.jenkins-ci.org/browse/JENKINS-26981

Change-Id: I6d1f0e70d5c82ffd551d00ffdf2712cbfaec16cf
2019-05-23 13:08:19 +02:00
Harald Welte 02ebc242b8 Fix oc2g poky SDK installation
It's poky_installer_file, not poky_install_file.

Also, don't mandate a version from april that's no longer on
downloads.sysmocom.de.

This was broken since Change-Id I35f34a089311808cb21a064dd50e41cd1887b320

Change-Id: If3adf078fd89b9d0c5151cdbf745123df34bbaba
2019-05-15 14:46:02 +02:00
Harald Welte a72c87cba2 Add osmo-e1d to gerrit-verifications.yml
Change-Id: I78cfd6052aebbe8cfa215928906f18f8afe3c06a
2019-05-11 21:08:47 +02:00
Harald Welte acb2fb6078 osmocom-latest-packages: Enable osmo-sysmon
Since libosmocore 1.1.0 and libosmo-netif 0.5.0 are released, we can
address the TODO and build osmo-sysmon also in our latest feed.

Change-Id: I48bd5aff2ae315b6f462facea70222eb2cdd2d58
2019-05-11 06:15:24 +00:00
Vasil Velichkov a388a9bf8e jenkins docker: Install lcov and lcov-cobertura
They are used for generating code coverage reports

Change-Id: I26896a9807e756b1f935cd3ed524d25ee22efaed
2019-05-10 10:47:27 +00:00
Vadim Yanitskiy f137b5b1a4 coverity: add OsmocomBB (without firmware)
Change-Id: I2a4bcca411361484e872361dfd16d46189f52f35
2019-05-10 10:42:59 +00:00
Oliver Smith 72a84b551e nightly-packages: add osmo-gsm-manuals-debian8-jessie
Create a compatible package for debian 8 with adjusted dependencies.
While at it, refactor create_osmo_trx_debian8_jessie() into a generic
checkout_copy_debian8_jessie() function.

Related: OS#3899
Depends: I5b9575ceb1141961e570643a5755a2bd6b6a4254 (osmo-gsm-manuals)
Change-Id: I3570599ede51b974d350064f44f77e360fafd8b0
2019-05-08 11:52:22 +00:00
Oliver Smith 3f9776c9eb OBS: add links to job description
Add the links that the obsolete Osmocom_nightly_packages job has, before
we remove it. Also link to the binary packages wiki page.

Change-Id: Idbc7ccd0156d9c3eb6d30059384686849a36f49f
2019-04-30 08:19:01 +00:00
Pau Espin 363015700f ansible: Document how to use ProxyJump to access ipv6 nodes
Change-Id: I31b8f8ea5ed84a676c97ad2f6802be19f0e394d9
2019-04-26 15:59:01 +02:00
Alexander Couzens 0d33d9204a generalize the install-poky-sdk role to support multiple sdks
Change-Id: I35f34a089311808cb21a064dd50e41cd1887b320
2019-04-26 15:38:12 +02:00
Alexander Couzens d745bee443 osmocom-jenkins-slave: fix jessie-backports as it got deprecated
Change-Id: Idae47a6529f6a870e29ab688c3479b7ef4ba200a
2019-04-26 15:38:02 +02:00
Harald Welte bea2c9c70d ttcn3-slave: Add libfftranscode0 + libffstranscode-dev packages
Those proprietary libraries are required for testing APER based
protocols such as those spoken on IuCS, IuPS and Iuh.

Change-Id: I07489575d0b71c36b35096ecf1e2aab9577cb43e
2019-04-21 12:31:04 +02:00
Pau Espin fb69674156 nightly-packages: Update limesuite hash to support LimeNet-Micro
Newer LimeSuite (at least 7557e291209fc66a78ffa74dd8314e75841f7c96) is
required to have LimeNet-Micro working properly with osmo-trx.
We update to current newest master since other fixes related to sample
rate are applied after the commit mentioned above.

Related: OS#3861
Change-Id: I62779f3bdbc4a459363a1d660d96d5f02f7763c1
2019-04-18 13:01:00 +02:00
Oliver Smith 61b9e76cb1 jobs: use "cmd: |", not "# keep first line ..."
Adjust README.adoc to mention "cmd: |" instead of the workaround and
replace this:
  cmd: >
   # keep first line with less indent to preserve newlines
    docker run ...

With that:
  cmd: |
    docker run ...

Change-Id: I65a06acb76e5d693aa187f9ac38970b73e7fead6
2019-04-17 15:35:27 +00:00
Oliver Smith dc5fc51c1f OBS: build osmo-gsm-manuals-dev in nightly
Enable in osmo-nightly-packages.sh, and add as coment in
osmocom-nightly-packages.sh for now (needs a tagged release first).

Related: OS#3899
Depends: I7edb5093e5b58eb3b0f7af2376476db4026db735 (osmo-gsm-manuals.git)
Change-Id: Ideeae4f7846fa5626fe2c1f5a77e07a3c6e626fe
2019-04-15 08:53:47 +02:00
Pau Espin 53f2e1585f nightly-packages: Build latest tag of limesuite
Like we actually do already on latest-packages.

Change-Id: I5a9e97a7a93c1d2a9983926cd0f5d7255e9666bd
2019-04-12 17:53:15 +02:00
Pau Espin bfea6499a3 nightly-packages: Move some code and rename some vars to look similar to latest-packages
Change-Id: I177bb7fb75e293ef665e95363a38c6b4f8e49c13
2019-04-12 17:53:15 +02:00
Pau Espin a5a4c5a867 nightly-packages: Remove unused variable
Change-Id: Ic120dbc134cba9bd77098ab14a5dba3d5c4d71b9
2019-04-11 15:32:59 +02:00
Pau Espin 5f9f7ca8b4 nightly-packages: Remove duplicated check
Change-Id: I9659e71d87b03971673da3bfb2101de9d5fe3c6a
2019-04-11 15:32:50 +02:00