Commit Graph

69 Commits

Author SHA1 Message Date
Harald Welte 3027ead9e9 gerrit-verifications.yml: Manual sync with current jobs
This is the result of one pass through all gerrit jenkins jobs
currently [manually] configured on jenkins.osmocom.org together
with alphabetically sorting the definitions to match the order in
the Jenkins Web UI.

Change-Id: I42051e76234b2695934183188f074ee7e467f58c
2017-10-29 11:56:34 +00:00
Harald Welte b63da48bd7 Add JJB YML for Osmocom_OBS_latest
Change-Id: I59a901727e35a35ba0fe73c09accb0bd1fa6b7ab
2017-10-28 23:44:05 +02:00
Harald Welte 3c1889e198 Add osmocom-latest-packages.sh script for network:osmocom:latest
Change-Id: I8b036e57d8a5f4e08081c9641bbef50fead0c52a
2017-10-28 23:22:43 +02:00
Neels Hofmeyr 6350953170 osmo-deps.sh: make sure to not clean all deps when inside a dep dir
Make sure osmo-deps.sh passes no $deps in to osmo-clean-workspace.sh.

In most builds, $deps is a relative path, and when within a dir that contains
no such subir, calling osmo-clean-workspace.sh has no effect. However, in some,
$deps is passed in as absolute path, so when within a deps/... subdir in
osmo-deps.sh, the script would still find the abspath and clean out all deps
subdirs; for example in osmo-bts.

Change-Id: I431d20aedefc708645a1f1862334cffaef20b928
2017-10-28 04:19:23 +02:00
Neels Hofmeyr f9c1cb2777 scripts: use 'git checkout -f' instead of 'reset --hard'
'checkout -f' more accurately does what is intended. 'reset' changes the
current branch to some hash, 'checkout -f' force-checkouts another branch.

Change-Id: Ic6279ebaf8160bceb3fa2ab40eff0b888ecd5009
2017-10-27 22:37:22 +02:00
Neels Hofmeyr 7c5e34cba0 osmo-build-dep: offload branch checkout to osmo-deps.sh
In osmo-deps.sh, add second arg $branch, and also name the first one (i.e.
$project). Use the passed branch or 'origin/master' by default.

In osmo-build-dep.sh, it's not necessary to do a second 'git rev-parse HEAD',
osmo-deps.sh already does it.

Change-Id: I598c41a12352acea6e49a321ad2f665f6ea07a44
2017-10-27 22:37:22 +02:00
Neels Hofmeyr f42a1cfa50 add osmo-clean-workspace.sh, use in osmo-deps.sh
So far, each jenkins job does its own cleanup, more or less well. Also, jenkins
git config offers the 'Clean before checkout' option, which seems to fail when
there are non-writable leftovers from a failed 'make distcheck'.

Furthermore, our jenkins build slaves have unused compiled binaries piling up
by the gigabytes: each matrix build x each parallel build and each compiled
dependency therein builds .o, .a, .so and executables plus installs them to a
local prefix, and just leaves them sitting around to rot until the job runs
again. Instead, we want to clean them out when building is done.

All of this calls for a unified cleanup script that knows how to clean a
workspace properly, to run once before and once after each jenkins build.
Here it is.

Use that function in osmo-deps.sh instead of duplicating cleanup steps.

Change-Id: I2409b2928b4d7ebbd6c005097d4ad7337307dd93
2017-10-27 22:37:22 +02:00
Harald Welte 26f9d8768b osmocom:nightly OBS: add osmo-bsc package / remove nitb-split
This was the last package that we only built in
osmocom:nitb-split:nightly, so we can remove the latter, too

Change-Id: Ib99e0775e9db30ec3c5263bb3a364d8cab4633c3
2017-10-26 20:53:05 +02:00
Harald Welte ff683afa2d osmocom:nightly OBS: Add osmo-msc + osmo-mgw
Change-Id: Ie417f912f11f3a45c6efb39595d6a4d89cf3a058
2017-10-26 18:01:23 +02:00
Harald Welte 27d8069385 osmocom:nightly OBS: remove old osmo-stp/cellmgr-ng package
this package doesn't exist in the OBS anyway, yet we continue to attempt
to upload it there. Stop that :)

Change-Id: I0f0726ed412e4a281dcf99047ca22b494216b4ad
2017-10-26 18:01:05 +02:00
Harald Welte a41cee7703 coverity: build with --enable-trx
Change-Id: I0684bc04b82ad57a1513bbd4627144d6c254b965
2017-10-11 08:45:35 +08:00
Harald Welte f30f7ad645 coverity: clone + build osmo-{mgw,bsc,msc,hlr}
Related: OS#2564
Change-Id: I6f046943f045a97c2bae4e99485a474c11d90a90
2017-10-11 08:44:44 +08:00
Harald Welte e314bfe247 coverity: osmo-bts now builds without openbsc
Change-Id: I09565441c0d9eb907edba82b26df38d08a5d868d
2017-10-11 08:44:23 +08:00
Harald Welte 171bfc2dd7 coverity: Add support for $PARALLEL_MAKE environment variable
Change-Id: I95b0e5f104155ac7c5ae993b7f3c0c0721d0157b
2017-10-11 08:44:23 +08:00
Harald Welte 34058b0856 coverity: Reduce codeduplication in build_Osmocom.sh
We don't need a separate build_foo function if it is identical in
its body except for the 'foo' (project name).  Let's clean this up.

Change-Id: I27e9fc94142b42a7b7c2f9eca89056e1f90f1f0e
2017-10-11 08:44:23 +08:00
Harald Welte 6853b7dac1 coverity: Don't start with a new clone, but simply fetch/checkout
If a given git clone already exists, simply do a fetch + checkout -f,
rather than cloning a decade worth of history from scratch.

Change-Id: Icecb2d00a75bc303d84efafee5c1f2d52ba1b6b3
2017-10-11 08:44:18 +08:00
Harald Welte 5b05a88bb3 nightly-pacakges: don't copy over gsm_data_shared.[ch] anymore
This is no longer needed by upstream osmo-bts since Change-Id
I9f004fb5c4c1db29d4792dfd281d388c7063da13

Change-Id: Ie53482a1538d1559e764da86dbbb78031c9c386b
2017-10-10 11:44:56 +08:00
Harald Welte 973dca9917 osmocom:nitb-split:nightly Re-introduce osmo-sgsn + osmo-ggsn
For some strange reason, in commit
8e9fe08080, the osmocom:nitb-split:nightly
package feed was rendered to use old packages for sgsn+ggsn, rather than
current ones by removing the "osc upload" from this script, but still
leaving the packages in OBS at
https://build.opensuse.org/project/show/network:osmocom:nitb-split:nightly

Removing them half (only in osmo-ci but not at OBS) is a bad idea, as
it leaves people with old packages who actually want to use nightly
builds.

Also, removing the packages in general is a very bad idea.  People
are *either* using osmocom:nightly, *or* they are using the
osmocom:nitb-split:nightly feed, but not both. So we cannot remove
any packages from the osmocom:nitb-split:nightly feed until we have
introduced all those packages to osmocom:nightly *and* we have given
people sufficient notice to update!

Change-Id: I5c091127d92a4b4beb7355e16abd9788fa3b9fe5
2017-10-06 10:13:09 +08:00
Harald Welte 418e728fc2 osmocom-nightly-packages.sh: Add libasn1c required by osmo-iuh
Change-Id: Ia455655eaf53faeab6c3049a54c153cb9ddd3d37
2017-10-06 10:03:37 +08:00
Max 707c200607 Add osmo-iuh to nightly .deb builds
It produces libosmo-ranap-dev which is required by osmo-sgsn.

Change-Id: Ief40137cc94e2c54da8c12e2a00953834a578171
2017-10-05 11:23:35 +02:00
Max 1b3bf67bf2 Fix OsmoSGSN nightly build
It depends on libgtp provided by OsmoGGSN so let's build it in that
order.

Change-Id: Icedc259ddc3a3b83ce8fe87f5572596ef29d6814
Related: OS#2527
2017-10-04 12:07:39 +02:00
Max 8e9fe08080 Use new GPRS repositories
* use coverity check on osmo-ggsn instead of openggsn
* move osmo-sgsn and osmo-ggsn from nightly-split into nightly

Change-Id: Ia49969cbfb9ef57b635a3b5759f411f71a54f8e1
2017-10-02 08:37:40 +00:00
André Boddenberg 6c401be095 Gerrit verification jobs as Jenkins Job Builder YAML [1] file.
All jobs are in jobs/ directory and will be automatically verified and
deployed in a follow-up commit.

Note: osmocom-nightly-nitb-split.yml has been moved to jobs/ dir.

[1] https://docs.openstack.org/infra/jenkins-job-builder/

Change-Id: I04387367a6e2d737bfb50423c81a8908d3c2a89f
2017-09-19 16:05:38 +00:00
Harald Welte b258f0cfc8 build both openggsn (old) and osmo-ggsn (new) in nightly feeds
Change-Id: I310c6237ce5ec34e4cc008123a5219d5cadaf7a3
2017-09-06 10:55:52 +02:00
Harald Welte f73c1c50f0 change from openggsn to osmo-ggsn in nightly nitb-split packages
Change-Id: Ie0d6d39ad0451733f6577844737f63028d087d8e
2017-09-06 09:36:42 +02:00
André Boddenberg 6cbb843fa3 Change used protocoll for 'git ls-remote' call from https to git.
Otherwise script depends on availability of https://git.osmocom.org, which is currently down.

Change-Id: Icf2a6b425177ef24aef1dba6e270d36fdc05d214
2017-09-04 20:23:30 +02:00
Neels Hofmeyr 7b58ee9985 debian nightly: don't use pre_release branches, use master
Related: OS#2297
Change-Id: I15e114389095af381978201c1bb3aad2a51fbaaa
2017-09-03 00:54:44 +02:00
Alexander Couzens ff6ea23be5 scripts: add requirements.txt to list jenkins-job-builder
Change-Id: If25ce84593bbf6a393928a8f4e1670f320c48ca4
2017-08-26 05:55:32 +00:00
Alexander Couzens 31f7e2a762 osmocom-nightly-nitb-split.yml: schedule the job to be run at midnight
Change-Id: I0d80e7d260f9092f44d4d80471a4dd67b7acc839
2017-08-26 05:55:32 +00:00
Holger Hans Peter Freyther 71737f21ba jenkins: Copy Dockerfile and script from buildhost
We are not using the Docker registry due difficult GPL compliance
but build the image on the build node itself. After prototyping
if containers can be used for building these files remained forked
on the node. These days it seems to be easier to complain than to
say thank you that this new approach has its merits. Copy the files
from the build slave to the directory they should have been in.

Change-Id: Icb0406f96b0c18e77be51ad8317c2668fb23a45e
2017-08-25 18:23:43 +08:00
Max 81bde16fb0 Add value string termination check from libosmocore
The script by Neels Hofmeyr <nhofmeyr@sysmocom.de> has actually nothing
to do with libosmocore itself - it's a generic build-time check used by
jenkins so it should be part of this repo to avoid extra checkout of
libosmocore just for this script.

Change-Id: I079218b61f512975ec5bfc7dc23503ec369cbb5a
2017-08-18 18:08:16 +00:00
Alexander Couzens 315944495c add jenkins job builder files for osmocom-nightly-nitb-split.sh
jenkins job builder is a python library to write jenkins jobs in .yml or
.json including templating and basic substition operation.

To update the job call:
Create your own jenkins_jobs.ini based on the exmaple and call
jenkins-jobs --conf ./jenkins_jobs.ini update osmocom-nightly-nitb-split.yml

Change-Id: Ie7c655c6e0e3761e7970e479cadb5ae14faa2c1c
2017-08-15 18:11:29 +02:00
Alexander Couzens a0d34c1b8d create osmocom-nightly-nitb-split.sh based on osmocom-nightly-packages.sh
Create a snapshot of the nitb split and upload it to OBS.

Change-Id: I8bf9fce1547e98c44b62a693ac4aaa4beed1aef9
2017-08-15 17:13:14 +02:00
blobb efcf6881a2 Introduce artifacts holding dependencies to speed up builds.
Basically, osmo-build.sh holds logic to check whether the necessary
artifact is available. If so it fetches artifact, unpacks it and
triggers the actual build. In case the necessary artifact is not
available osmo-build.sh simply builds all dependencies from source
by using osmo-build-dep.sh and archives deps to the ARTIFACT_STORE
afterwards.

The necessary functions to determine the artifact name from remote and
local repositories as well as the handling of artifact files live in
osmo-artifacts.sh, which is sourced by osmo-build.sh.

osmo-build.sh will be sourced by the contrib/jenkins.sh build script
inside each git repository. This automatically triggers the build,
so one need to source at the end of each jenkins.sh script.

See jenkins-openBsc.sh [1] for more details.

Artifacts will be stored as follows:

	$ARTIFACT_STORE/$JOB_NAME/<dep_1>.<branch_1>.<rev_1>_...
		..._<dep_n>.<tag_n>.tar.gz

Furthermore, ARTIFACT_STORE environment variable has to be set on all
jenkins slaves. The JOB_NAME variables is injected to each jenkins job
by jenkins.

[1] https://github.com/blobbsen/diy-artifacts/blob/master/jenkins-openBSC.sh

Change-Id: Ifee0a2f837d23b19aa5326f810234d5452e47484
2017-07-28 14:41:51 +00:00
Max 09b2ec93f1 lc15: correct default master branch
Change-Id: I6e86edc34fdb8c7bc57f87c41e05dd2338dd2506
Related: SYS#3683
2017-06-19 13:09:36 +02:00
Max 1f512a6b25 Add script for fetching BTS-specific L1 headers
Several of the supported BTS models require hw-specific L1 headers for
compilation which are stored in separate repository. Instead of
copy-pasting code which obtains those header for each BTS it's better to
create separate script.

Change-Id: I840533d5bf9233822bc0534a25c252f1cab0a7b0
Related: SYS#3682
2017-06-15 11:34:21 +02:00
Max 01bda4369b Add .gitreview
Simplify gerrit usage via .gitreview file.

Change-Id: Ib5e18e675230540c79673eaaf4dc2b75f1353f6d
2017-06-12 18:33:33 +02:00
Neels Hofmeyr e72f35cfa9 coverity: add osmo-hlr to be scanned 2017-03-16 14:04:03 +01:00
Neels Hofmeyr 5977e23db7 osmocom-nightly-packages.sh: add osmo-hlr 2017-03-14 15:28:22 +01:00
Neels Hofmeyr 75ac11a784 osmocom-nightly-packages.sh: chmod a+x 2017-03-14 15:21:10 +01:00
Neels Hofmeyr dccc24b9b3 add script to submit nightly packages
Move the script here from
http://jenkins.osmocom.org/jenkins/job/Osmocom_nightly_packages/
The jenkins job shall call this script instead.

One change: instead of 'rm -rf *', rather check for an empty dir, to not
endanger valuable data a user may have around when invoking this script out of
curiosity.
2017-03-14 15:12:52 +01:00
Neels Hofmeyr 7a83d97807 coverity: build master branches, not iu branches
Rebasing the iu branches onto the master branches is currently not happening
regularly, since I'm focusing on the VLR. Rather scan the master branches so
that the coverity issues are caught without further rebase effort required.

Comment out everything Iu related with '#IU' comment markers:
- don't checkout Iu branches
- don't build osmo-iuh (depends on libosmo-sccp iu branch)
- don't pass --enable-iu to openbsc, don't switch branches for osmo-bts

We might consider adding a separate Iu build, but then we might get the same
coverity warnings twice, so not pursuing that actively now.

Change-Id: I0d6640b893b8d65d321af904b80d89da5bf3ea6a
2016-12-11 03:20:55 +01:00
Neels Hofmeyr a0a2e0ffa7 scripts/osmo-deps.sh: show complete git hash of cloned HEAD revision
Change-Id: I0e1a65d864b075bd1dbfb579d308631f745d6937
2016-12-11 01:02:07 +01:00
Neels Hofmeyr 5044f45935 scripts/osmo-deps.sh: set -ex to log actions and exit on error
Change-Id: Ic61a51bd639e44cbb19ec67a90ab04825e512314
2016-12-11 00:58:00 +01:00
Neels Hofmeyr c4ce20a93e cosmetic: osmo-build-dep.sh: print example on error
I've been asked at least twice what the contents of the expected env
vars should be, so log an example on error.

Change-Id: I635752e6033c57bfce90d8b0732bc402bf3014c8
2016-11-30 02:45:41 +01:00
Neels Hofmeyr 6fbe3aa929 coverity: check out clean sources every time
Change-Id: I76782099e801ab89202c0103f97b7142b2c115fd
2016-10-11 14:06:36 +02:00
Neels Hofmeyr 5b4e64c305 coverity: don't pull --rebase, instead fetch and reset --hard
Change-Id: Ida553a0f38c438a02139396512ff5da038359721
2016-10-11 13:58:06 +02:00
Neels Hofmeyr 315e5929f5 add osmo-build-dep.sh from openbsc/contrib/jenkins.sh
Change-Id: I73669753a0f5030575d21e90378a1285cfe898de
2016-10-06 22:47:52 +02:00
Neels Hofmeyr f215b29441 gitignore
Change-Id: Ic61c17bbabc968c8571b7c0629f3438360563975
2016-10-01 03:35:11 +02:00
Neels Hofmeyr 7c274bc113 coverity: don't leak the tokens in build logs
Change-Id: I560f411beaca31bf2001e92a5baaa0c53dc9ce27
2016-10-01 02:08:36 +02:00