Commit Graph

483 Commits

Author SHA1 Message Date
Oliver Smith 46ee0741bc docker: drop python2
Re-apply patch Iacace670bdb949e67227e0faa1765e36bba42018, after
providing additional patches to make all Osmocom repositories, that use
external tests, work with python3 (after learning the hard way, that
they were not really python3 compatible yet, although they looked like
it):

https://gerrit.osmocom.org/q/topic:drop-py2

This patch should not be merged, before all other patches from that
topic are merged.

Depends: osmo-python-tests I3ffc3519bf6c22536a49dad7a966188ddad351a7
Related: OS#2819
Change-Id: I7b5385416d5c48a2f4e07449192b3f74223cb094
2019-12-11 12:19:08 +01:00
Oliver Smith 853f1ba318 osmocom_build_deps.yml: add inkscape
osmo-gsm-manuals needs inkscape to handle svgs. Not all osmo-* projects
are building in docker, so make sure it is also installed on the build
slaves directly.

Related: OS#4314
Change-Id: I63460336d2c4a7594ec9c5c9b60a3d43f0d157aa
2019-12-09 09:59:40 +01:00
Oliver Smith bf034999f1 Revert "docker: drop python2"
This reverts commit 9097082be5.

I was under the impression, that all previous scripts in
osmo-python-tests were already working with python 3. But as it turns
out, this isn't true. Reverting, so I can properly post follow-up
patches, that fix the issues before we apply this "drop python2" patch
again.

Related: OS#2819
Change-Id: Iab7768a77a55fd0465244460bd7488858dd69b60
2019-12-06 15:05:55 +00:00
Oliver Smith 9e69cb84d4 Revert "docker: drop python2"
This reverts commit 9097082be5.

I was under the impression, that all previous scripts in
osmo-python-tests were already working with python 3. But as it turns
out, this isn't true. Reverting, so I can properly post follow-up
patches, that fix the issues before we apply this "drop python2" patch
again.

Related: OS#2819
Change-Id: I68e99ed3fb2eba86eaccec7a3cab75658e9543b1
2019-12-06 16:01:01 +01:00
Oliver Smith 9097082be5 docker: drop python2
Depends: osmo-python-tests Iabda95073faa2191fd117e9637e0858c589e9d9e
Depends: osmo-gsm-manuals I57522e57e39682d6d123af4584785d327361e5a3
Related: OS#2819
Change-Id: Iacace670bdb949e67227e0faa1765e36bba42018
2019-12-05 17:53:27 +01:00
Oliver Smith d52cb3cc6b docker: install inkscape
Needed by osmo-gsm-manuals to add svg graphics to the manuals.

Change-Id: I754b133d77743582bd84c33c74ecc9eb9ca4c0ef
2019-12-05 16:51:49 +01:00
Harald Welte 0bc2af048b master-builds: add osmo-{cbc,e1d,e1-recorder}
Change-Id: Idfede8e9e79019b67b9aff4881d5cea97514aeba
2019-12-04 12:32:15 +01:00
Harald Welte 71c642a0a5 add gerrit-verifications for osmo-e1-recorder and osmo-cbc
Change-Id: I1df28b4e7a7cbcf9151cd57a77001d88f1875415
2019-12-04 11:06:05 +00:00
Oliver Smith 02bb4049ba Cosmetic: gerrit/master jobs: link to wiki
Place a link to the wiki page, that now documents all available
environment variables.

Related: OS#4243
Change-Id: I770360b671c64369cf6cdb4fb4222921cc6af58e
2019-12-04 10:52:21 +01:00
Pau Espin 2d8903c363 ansible: gsm-tester: Enable ip forwarding and masquerading on boot
Some nodes in the internal network, such as LimeNetMicro, will need
Internet access to upgrade osmo-trx-lms from OBS repos.
It also makes it easier to update manually other nodes inside the
internal network.

Change-Id: I2c89cf9cfcb55b3153e7be212c68ffa8db0f6927
2019-12-02 11:15:14 +00:00
Oliver Smith 13eaaa3644 jobs/master-builds.yml: fix osmo-fl2k
Don't use the old "osmocom:amd64" image. Remove the entire cmd line, so
it uses the default docker command with the default docker image
"osmocom:deb9_amd64". Also remove concurrent: true, because that default
nowadays too.

Related: OS#3203
Change-Id: I93db12d3652f26db059e0ede52d2b2fdd3e89d34
2019-12-02 09:54:56 +01:00
Oliver Smith f8d85c9f18 jobs/master-builds.yml: add osmo-fl2k
Related: OS#3203
Depends: https://lists.osmocom.org/pipermail/osmocom-sdr/2019-July/001951.html
Change-Id: Iac411a5d5e312b8db0b5388f58571141fb2f32df
2019-12-01 10:40:16 +00:00
Harald Welte 45ce0417d4 add '--publish' to osmo-asf4-dfu and osmo-ccid-firmware builds
Change-Id: Ie45b9fcabc35f6fd9aff33af0f0587c8ccd88ebd
2019-12-01 10:38:16 +00:00
Pau Espin d8e2f0a682 ansible: Fix several file permission mask format
From ansible documentation [1]:
"""
For those used to /usr/bin/chmod remember that modes are actually octal
numbers. You must either add a leading zero so that Ansible's YAML
parser knows it is an octal number (like 0644 or 01777) or quote it
(like '644' or '1777') so Ansible receives a string and can do its own
conversion from string into number.
Giving Ansible a number without following one of these rules will end up
with a decimal number which will have unexpected results.
"""

[1] https://docs.ansible.com/ansible/latest/modules/template_module.html?highlight=template

Change-Id: I91008927c50016a837420c4249b5f69b9153572e
2019-11-27 09:30:28 +01:00
Pau Espin 55c6811513 ansible: gsm-tester-prod: Set DNS server to a working service
10.42.42.2 is simply one of the IP addresses assigned to osmo-gsm-tester
main unit on its own internal network (the one used between itself and
the connected BTS or helper hosts). There's no DNS server running there.
The main unit already runs lots of services, and there's really no need
for a DNS server running there, so simply point it to a working DNS
server.

Change-Id: I443cc560553c07635763a13bc73ead4835e6a009
2019-11-26 13:30:44 +01:00
Harald Welte 15e2204a9f osmocom_build_deps.yml: Move from python-nwdiag to python3-nwdiag
Change-Id: I9e3c65342d1bb62d7baa9d589930aa042fb5f7a9
Closes: OS#4279
Related: OS#4246
Depends: osmo-gsm-manuals Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94
2019-11-23 09:20:22 +01:00
Harald Welte 3038c19155 WIP: coverity: Make sure curl is installed, as our coverity upload job needs it
This is untested. I'm on the train and have very limited understanding
of Ansible

Change-Id: I9918b89971bf6c2e200f1d96d993d5fbd6741b71
2019-11-23 09:19:10 +01:00
Harald Welte 803216f1fd dockerfile: Add 'dahdi-source' for libosmo-abis
Change-Id: Icfd244268958be71f538d27307cdf0fabeecd956
2019-11-23 09:19:10 +01:00
Pau Espin dffe2e859f ansible: gsm-tester-prod: Set dhcp ip addr for LimeNet-micro board
Change-Id: Ibcdf14ba09ab46240cd6bccac82f7b21f99123ef
2019-11-22 14:55:12 +00:00
Oliver Smith 0777e3b292 docker: remove python-nwdiag (using nwdiag3 now)
Related: OS#4246
Depends: osmo-gsm-manuals Ia2c0c833329f8ecab1c427e0d2c002f17ab49a94
Change-Id: Ib53e1fee56e27bd88fc1a7b9593bacf53328a097
2019-11-22 11:26:34 +01:00
Oliver Smith 1cb0aa92c9 docker: install python3-nwdiag
Related: OS#4246
Change-Id: I0ebee6ac11df779ab954bd6648a0bebefc3350a2
2019-11-22 11:22:50 +01:00
Harald Welte bee13a5f53 osmocom_build_deps.yml: Add dahdi-source for libosmo-abis
Change-Id: Ic314c992f83d9fe1ea6035d67070d7c6004cc9e3
2019-11-11 17:13:00 +01:00
Harald Welte 5d627e65ea osmocom_build_deps: Add libaio-dev for osmo-ccid-client
Change-Id: I6c3b536bee3d1bbd6f526bc3765fc4ad9aa4a0dd
2019-11-11 17:13:00 +01:00
Pau Espin 95d4544544 jobs: Introduce ttcn3-stp-test(-latest) jenkins job
Change-Id: I7a82e1fa82cd28433cdb7a9128c7ab3da6cabf47
2019-10-24 16:52:04 +02:00
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