Commit Graph

27 Commits

Author SHA1 Message Date
Oliver Smith bcde1d0538 Update git URLs
git.osmocom.org has been deprecated, use gerrit or gitea urls instead.

Related: https://osmocom.org/projects/cellular-infrastructure/wiki/Git_infrastructure
Related: OS#6251
Change-Id: I03a06d23e87a75257eb731a97facd7a67c40a2c6
2023-11-29 14:22:08 +01:00
Oliver Smith d087b6ccc3 jenkins-build-common: use 'git submodule update'
Now that we use git submodules in osmo-trx, make sure to initialize and
update them before attempting to build.

Fix for:
  Makefile.am:32: error: required directory ./osmocom-bb/src/host/trxcon does not exist

Change-Id: Ic2b9207b942a8a9edff82737117b2ed9d6d3cfe3
2023-01-16 08:41:20 +00:00
Harald Welte 882b8aee01 update git URLs (git -> https; gitea/gerrit)
Change-Id: I5f51b260445624759e77a70c5065838b29ec8c01
2022-06-18 12:05:50 +02:00
Alejandro Leal Conejos e3f6a3b527 jenkins-build-common: adds support to the new variables for patchelf.
2 variables are added in order to increase the flexibility of the add_rpath function.
patchelf_rpath_extra_args: adds more arguments to the rpath patch. For example "--force-rpath"
patchelf_rpath_dir: path to the libraries. This path is appended to the default '$ORIGIN/../lib/'

This commit add the jenkins-build-srslte-bbu.sh script, that builds the given repository filling the information for the 2 newly added variables.

Change-Id: I9f510112c63e7598add8c00f8573e34cac1b6064
2021-06-11 08:53:33 +02:00
Pau Espin 0696c60812 Initial Open5GS support
Change-Id: Iff8b88dc22d8f156572839abb48b0c1377c55e33
2021-03-30 14:17:47 +02:00
Pau Espin 6231c3c657 contrib: Add build script for open5gs
Change-Id: I0ed43dadbfe08811dd72064ee7332d0872882dfd
2021-03-15 19:06:25 +01:00
Andre Puschmann 8e1ba792c5 jenkins-build-common.sh: also pass additional build flags to CMake
Change-Id: I1c5998d31201505d0a2532f22f905ec155d6c094
2020-04-20 20:36:21 +02:00
Pau Espin 70c01ec92a contrib: Fix default variable value syntax
Change-Id: I23abf33881f64dd89c0bf5ef970972908d337366
2020-02-18 15:31:25 +00:00
Pau Espin addf78ecb6 contrib: Add scripts to build srsLTE software
Change-Id: Id9d63920a44a80af187e649c9be5fd7498fa5f44
2020-02-03 17:22:30 +01:00
Holger Hans Peter Freyther 9cf1c8afde misc: Use RPATH to avoid having tests to set LD_LIBRARY_PATH
Instead of each binary launcher having to check if there is a lib/
directory and then setting a LD_LIBRARY_PATH we can use an RPATH and
know these binaries pick-up the right libraries.

This requires I6e4ad2e3855af7bcefc22d4190cc4e6f58581857.

Change-Id: If771767dd82662e13b6b10ee7a8b8d0c84dcbdb1
2018-11-14 21:00:52 +00:00
Holger Hans Peter Freyther 90b050764a Be able to switch-off ASAN builds of our binaries.
Inroduce a way to not take a 2x performance hit when testing. It
is of importance if we run with hundreds of BTSes and 10k+ subscribers.
In the absence of using getops or shflags use an environment for it.

Change-Id: I540ba1c35e8fb72abcee0d86e0bdc1136b47345c
2018-09-26 07:27:39 +00:00
Holger Hans Peter Freyther 9eafb1372e Optimize and re-use an existing repository
Instead of cloning osmocom-bb three times this will allow us to
re-use the repository. Simply change the directory, set the new
origin and fetch.

Change-Id: I63f103b2f70559e969e8c66477ab9ee7f2886832
2018-09-26 07:27:39 +00:00
Pau Espin cbbe5d8c1a contrib: Use correct var to write repo name in git_hashes.txt
We want to write repo name in there, not $dep which actually doesn't
exist in local context of have_repo function. In most cases it's
actually the same because in almost all cases $dep is passed as $1 to
have_repo and thus is the same as local $repo. But in a few recipes
which don't use build_repo directly but instead use have_repo and build
manually, $dep may not point to $repo. That's the case for osmocom-bb
for instance. As a result, "libosmocore" is printed twice, were second
word should be "osmocom-bb".

Change-Id: I7a7db7cf4cc020295d216c60d6dc688f110916dc
2018-09-25 10:20:59 +00:00
Holger Hans Peter Freyther cb132bd79f build: Add overload to clone repo and build in subdirectory
To build osmo-nitb we need to clone "openbsc" and then enter the
"openbsc" sub-directory. For building "mobile" and "virt_phy" of
OsmocomBB we will need to do something similar. Instead of added
more hardcoded paths, add a variant that allows to specify the
source directory.

Change-Id: I67fbd54296f2c68316bf8e89cfeb37d147193d53
2018-09-18 06:29:17 +00:00
Pau Espin 7a216e54b0 contrib: Disable installing unneeded systemd service files
Otherwise since we install without root perissins to a local directory,
systemd files will fail to be installed to regular systemd location
/lib/systemd/system/).

Change-Id: I20a285e4e92fec7990770568e8d5dc117d6bf477
2018-09-12 14:46:30 +02:00
Pau Espin 1828d352c1 contrib: common: create_bin_tgz supports sbin dir now
This is a preparation for inclusion of osmocom-bb build job, which
installs binaries such as osmocon in sbin.

Change-Id: I562721af82e481e926ee65dbcd9dcc5b55057ae8
2018-05-18 12:14:09 +02:00
Pau Espin 7043996847 contrib: common: Record repo curr rev in have_repo instead of build_repo
This way scripts making use only of have_repo (to have build specific
insturctions) can still benefit from that code.

Change-Id: I03149942ac1d279a15c71df3eb880c331c8fc155
2018-05-17 18:18:50 +02:00
Neels Hofmeyr a8647f304c fix build: properly remove artifacts
The jenkins scripts are run by sh, which does not support the {a,b} syntax
shell glob. As a result, old build artifacts pile up in the workspaces.
Use two separate lines to remove .tgz and .md5.

Change-Id: Ib7e5995aa6914e34f8b7bbb8a8ed46ff9230a913
2017-09-13 19:17:54 +02:00
Neels Hofmeyr ebc7426f85 jenkins: properly clean previous artifacts
Drop the second 'rm -f' from the rm shell command (typo).

Remove all artifacts matching *.build-*.{tgz,md5} because if a job changes the
name of its artifact, the previous artifacts would remain.

(I hit this with the new scripts being originally wrong and all producing
'osmo-msc.*' artifacts, and those stuck around in the workspace even after the
name was fixed.)

Change-Id: I00d246226f4c723696bb737ed707cfd0e4c33714
2017-09-07 18:34:07 +02:00
Neels Hofmeyr 713a1201d2 jenkins-common: ensure requested binaries indeed have been built
Recent change Ib1a00b2149453fedf9ece0460dd4d6e83f774d45 drops binaries from a
build artifact by leaving only explicitly requested ones. This adds a check
that the requested ones indeed exist.

Change-Id: Iceddeee6aebb1cdb54d7304495c3e332390261db
2017-09-07 00:59:46 +02:00
Neels Hofmeyr 1921c0f6c9 jenkins: per build, drop programs built "unintentionally"
Each of the jenkins-build-* scripts intends to build a specific set of
programs. While compiling dependencies, other programs may end up in
$prefix/bin. Drop those other binaries to reduce potential confusion.

Add arguments to the create_bin_tgz function: callers need to list exactly the
$prefix/bin/* binaries that should be tar'd. All others are first removed from
the prefix.

Adjust existing scripts to provide such binary names.

Change-Id: Ib1a00b2149453fedf9ece0460dd4d6e83f774d45
2017-09-05 01:21:25 +02:00
Pau Espin e5b0366849 contrib: Disable doxygen doc generation
The --disable-doxygen was recently added to libosmocore and
libosmo-netif. No need to manually remove documentation anymore.

Change-Id: I3ca3dd1c115fc6784e4dc26a5ff5bf35d65b4e22
2017-07-06 17:14:48 +02:00
Pau Espin 3c35df3e28 contrib: Fix removal of doc directories
The docs are actually not removed because the shell takes
{libosmocore,libosmo-sccp} as a string literal if found inside quote
marks, see [1] for more information.

[1] https://unix.stackexchange.com/questions/67757/wildcards-inside-quotes

Change-Id: Ida8941525db2d6a80539ffda29fb4fa74dbb1e16
2017-07-05 10:53:13 +02:00
Neels Hofmeyr b398b52ad5 jenkins: fix: recent change broke jenkins build
Recent commit 851802b927 introduces a build
branch, which works fine, but only on the first run. A second run in the same
repos can't delete the branch git is currently on.

I've had enough of git being impossibly difficult in UI to simply checkout a
hash or a branch now. Completely wipe out the git repository and clone a fresh
one every time.

Unfortunately, 'git clone -b' doesn't allow passing a commit hash, so we still
need to do a clone-then-checkout dance. At least now we know it will work the
same on every run.

Change-Id: I6aca4c53a796312248a189b815dfc1198a173ed9
2017-06-23 04:13:30 +02:00
Neels Hofmeyr 2581b50408 jenkins-build-common.sh: cosmetic: clear repos a bit later
If we rm -rf * and then checkout a branch, the log prints the entire file tree
as deleted. Instead, rm just before the git reset --hard, which avoids the
extra output.

Change-Id: Ib5b28a82f05d941eae8f3a2f468ef1e9d67e6180
2017-06-23 04:07:44 +02:00
Neels Hofmeyr 851802b927 jenkins-build-common.sh: fix being stuck on branch
It's hard to allow both branch names and git hashes. For a branch, we want to
prepend 'origin' to use the upstream branch. For a git hash, we don't.

We so far prepend 'origin/' if the current branch name doesn't resolve, but
that's not enough. If a local 'master' branch exists, we would stay on that
branch instead of origin/master.

Rather, prepend 'origin/' if 'origin/$branch' exists. Git hashes should not
exist as 'origin/123abc...' and used as-is, where branches from origin should
be updated to upstream by prepending 'origin/'.

Also create a local branch to build. Always force-remove the branch and
re-create from the origin/name or git hash. Keep the reset --hard for paranoia.

Change-Id: I2e610b357f8559c6b6ffb544eb0a952f04dd9f70
2017-06-23 03:52:26 +02:00
Neels Hofmeyr 53e758ae4c jenkins: extract common parts of build scripts to separate file
Have all complexity in one common shell script, greatly simplify the individual
scripts.

This allows to provide a specific branch or git hash to build instead of
current master. Some scripts allowed to provide branch names before, this now
also allows using git hashes directly.

Environment variables can be used to override the git hash/branch to use for
specific repositories.

Motivation for this patch: we need this to investigate failure causes more
easily.

Change-Id: I5ac2f90d006a1b2f6c246976346d852a70c89089
2017-06-02 16:58:37 +02:00