Commit Graph

769 Commits

Author SHA1 Message Date
Oliver Smith ac4bd80ba4 DEBUG: contrib/jenkins.sh: use osmith/gerrit-lint
Change-Id: Ifd0a2f1280256297d292a65781f7932f186362c0
2021-07-07 12:49:58 +02:00
Oliver Smith 79202a0ec6 DEBUG: jobs/gerrit-lint.yml: remove all but osmo-mgw
Change-Id: I19775b973280427e5c5a16057183665707eb6e2a
2021-07-07 12:25:43 +02:00
Oliver Smith 38c6855442 jobs/gerrit-lint.yml: add lint jobs
Related: OS#5087
Change-Id: Ic473a5c535dfbdda55751e53fc751ede1adde7e2
2021-07-07 12:25:43 +02:00
Oliver Smith 444ca841e6 lint: checkpatch.pl: fix && complaints
Don't complain with:
	ERROR:SPACING: space prohibited after that '&&' (ctx:ExW)
in code similar to:
	if (conn->conn->mode != MGCP_CONN_LOOPBACK
	    && conn->conn->mode != MGCP_CONN_RECV_ONLY
	    && !mgcp_rtp_end_remote_addr_available(&conn->end)) {

The check was supposed to complain about spaces if the && is used as
unary operator (to get the address of a goto label). But it's clearly
producing false positives in the Osmocom context with use as non-unary
operator, so remove this check.

Related: OS#5087
Related: 0d413866c7
Change-Id: I7ce79e6b291b3a3dab6587a589eeef0a0bc53de9
2021-07-07 11:28:38 +02:00
Oliver Smith 5409188d55 lint: ignore LINE_CONTINUATIONS
Causes false positives, e.g. in tests/mgcp/mgcp_test.c in osmo-mgw:

  #define MDCX4_PT2 \
	"MDCX 18983218 1@mgw MGCP 1.0\r\n" \
	"M: sendrecv\r" \
	"C: 2\r\n" \
	"I: %s\r\n" \
	"L: p:20-20, a:AMR, nt:IN\r\n" \
	...

tests/mgcp/mgcp_test.c:189: WARNING:LINE_CONTINUATIONS: Avoid unnecessary line continuations

Related: OS#5087
Change-Id: I8d8004f2a8ef926588487187af7cdef8254c7248
2021-07-07 11:28:38 +02:00
Oliver Smith 2cceff4535 lint: ignore COMPLEX_MACRO
Complains about, for example:
  #define MDCX4 \
	"MDCX 18983217 1@mgw MGCP 1.0\r\n" \
	"M: sendrecv\r" \
	"C: 2\r\n" \
	"I: %s\r\n" \
	"L: p:20, a:AMR, nt:IN\r\n" \
	"\n" \
	"v=0\r\n" \
	"o=- %s 23 IN IP4 5.6.7.8\r\n" \
	"c=IN IP4 5.6.7.8\r\n" \
	"t=0 0\r\n" \
	"m=audio 4441 RTP/AVP 99\r\n" \
	"a=rtpmap:99 AMR/8000\r\n" \
	"a=ptime:40\r\n"

Related: OS#5087
Change-Id: Ic9d752ca841161a62e3631c84b4237a0d8594363
2021-07-07 11:28:38 +02:00
Oliver Smith 497ce6743a lint: exclude *.ok, *.err
Complains about e.g. \r\n in *.ok files.

Related: OS#5087
Change-Id: I79004cec3e2eb753951a7f886318ac0db4ea2c06
2021-07-07 11:28:37 +02:00
Oliver Smith 57804faacc lint: checkpatch.pl: exclude pattern, not dir
Allow to exclude files in a follow-up commit, not just directories.

Related: OS#5087
Change-Id: Ic3990fba60060c331c479174183924b9cdbdb4c8
2021-07-07 11:28:16 +02:00
Oliver Smith d58b999e0f lint: add helper scripts
Add lint_diff.sh, which runs checkpatch on git diff to either HEAD~1 (if
the tree is clean) or HEAD. This can be used as pre-commit hook, and
it's what jenkins will run.

Add lint_all.sh, which runs checkpatch on a whole repository to test if
the rules we are checking for make sense in Osmocom context.

Related: OS#5087
Change-Id: I1d02c169b05fb05b87209a444a5ddb86efc99d04
2021-06-16 16:49:47 +02:00
Oliver Smith 1e750ed6dc lint/checkpatch: add Osmocom specific wrapper
Related: OS#5087
Change-Id: I0ec6a3bc57a4d31c821fa83370f05c6d4ac2a5b0
2021-06-16 16:42:18 +02:00
Oliver Smith 6c497c076b lint/checkpatch: add --exclude argument
Apply patch from https://review.coreboot.org/c/coreboot/+/18568/, so we
can exclude specific directories.

Related: OS#5087
Change-Id: Ia980814895249f839873c5002f0d21c0e59ee01d
2021-06-16 16:42:18 +02:00
Oliver Smith 47ba23b820 lint/checkpatch: import from Linux kernel
Prepare to run checkpatch on patches submitted to gerrit to point out
various linting errors automatically, such as { after functions not
placed on a new line, or common spelling errors.

Import version from 7e6cdd7f ("checkpatch: improve ALLOC_ARRAY_ARGS test")
of linux.git.

Related: OS#5087
Related: https://osmocom.org/projects/cellular-infrastructure/wiki/Linting
Change-Id: I58571a0409e79d88d37e8328f41a540a58cfb198
2021-06-16 16:41:56 +02:00
Oliver Smith 1bc1947974 osmo-ci-docker-rebuild: don't build ogt for arm
Don't attempt to build the osmo-gsm-tester docker container on arm. It's
currently causing the update-osmo-ci-on-slaves job to fail on
rpi4-raspbian10build-ansible-*.

Related: https://jenkins.osmocom.org/jenkins/job/update-osmo-ci-on-slaves/label=rpi4-raspbian10build-ansible-1/876/console
Change-Id: Ic30de69d318927d5c142f8212eefa3a53037ef25
2021-06-16 15:37:13 +02:00
Oliver Smith f404962d61 jobs: don't run any on admin2-deb9build
This node was disabled permanently, so don't try to run anything on it.

Change-Id: I0ea91658c74ea24fae551b917628fab5f7952c97
2021-06-04 14:11:05 +02:00
Neels Hofmeyr 499faad7a3 ttcn3: add ttcn3-bsc-test-vamos
Change-Id: I9c4918c4f1da28b97db6386485e115f7e091a842
2021-05-26 00:09:22 +02:00
Oliver Smith 60cef18539 OBS: use nightly script to build 2021q1 feed
Use the nightly script instead of latest, so all packages get
upgraded when upgrading osmocom-2021q1.

Related: SYS#5370
Change-Id: If8de585652997aae1edb586c948c181f564f6994
2021-05-19 06:35:56 +00:00
Oliver Smith 33be93bcc9 OBS: refactor osmo_obs_prepare_conflict
Determine the package name of the conflict package itself and all
conflicting packages automatically, so we don't need to have it
duplicated in the OBS latest and OBS nightly scripts.

This is in preparation to move osmocom-2021q1 from latest to nightly.
With the current logic in nightly for the conflict package, it would not
be possible.

Related: SYS#5370
Change-Id: I183b9040250e66e0d7d17ef4b95af9e7d4a26f04
2021-05-19 06:35:56 +00:00
Oliver Smith 58d02c5483 OBS: move verify_feed to common
Prepare to move the 2021q1 feed from latest to nightly.

Related: SYS#5370
Change-Id: I91e4c36d4a04d465fc9ccb933e8060511b7cd145
2021-05-19 06:35:56 +00:00
Harald Welte 16f324618f master-builds: turn git_base_url actually in a URL, not just hostname.
Let's include the 'protocol' part itno the git_base_url variable, so it
actually becomes an URL, not just a hostname-with-path-prefix.

This way we can keep using git:// for osmocom and use https:// for
github and sysmocom.

Change-Id: I7befd1dd1445e0aa4d42434dbc8e001f904ae196
2021-05-18 11:55:53 +02:00
Harald Welte 51e5b234f4 master-builds: Use https when linking to git repos from description
Change-Id: I3a0a3d779ce456ce359e33bc1305f63271deb87e
2021-05-18 11:53:35 +02:00
Oliver Smith 00188531c2 OBS: conflict: allow overriding pkgver
Allow overriding OSMO_OBS_CONFLICT_PKGVER, so we can increase the
version of the osmocom-2021q1 package whenever something changes on one
of the 2021q1 branches.

Related: SYS#5370
Change-Id: Iae45d7462aab8227ed3756e6cccfa3e64cb04211
2021-05-17 08:27:17 +00:00
Harald Welte d793650519 some more git.sysmocom.de https (+path) changes due to gitea migration
Change-Id: Ie1599b356932ffa83d70e08b96179b7ca4909b14
2021-05-17 08:16:34 +02:00
Harald Welte e82f47ccfc ansible/hosts: new IPs for GTP0 slaves
the old ones were DHCP-allocated and after a power outage, they changed.

I've now moved to static allocated addresses.

Change-Id: I0d77cc8ae72d854312b742c6c64b10a731a9f5ba
2021-05-17 08:10:12 +02:00
Harald Welte 1a8bdf4674 layer1-headers: change git.sysmocom.de to https
after migrating to gitea, we don't offer classic git:// anymore

Change-Id: I61b3b5508031b5b1f1dd521833096a84ab7c9c0f
2021-05-17 08:09:29 +02:00
Oliver Smith 849495ff9b jobs/ttcn3: add TTCN3-centos-*-2021q1
Depends: docker-playground Icf1e3f1928658ff3d82190c4176252cf3590a1f5
Related: SYS#5370
Change-Id: I2ec731d7d6d31c06b8feccbc7620128ebb034299
2021-05-04 09:38:38 +02:00
Oliver Smith f8099e5504 OBS: add osmocom-packages-docker.sh
Add a simple helper script to run osmocom-*-packages.sh in docker to
avoid installing dependencies on the host system.

Related: SYS#5370
Depends: docker-playground Ibb55ad18d2ccf4313f52fa3e3c10d4420c84dced
Change-Id: Icc89e20950c2aaa67b209340d1d797b76fce32d2
2021-04-29 16:05:14 +02:00
Oliver Smith 730d011de5 OBS: common: don't require wget anymore
Not needed anymore since Iaf2527043e9acdb6acff3e481d4516ac4b75b7e7.

Change-Id: I2e03487058e4c2c9426872975953fa1814b24ccd
2021-04-29 16:05:14 +02:00
Oliver Smith a323d1a41c OBS: latest: add commit to version for 2021q1 feed
Move get_commit_version to common-obs.sh and call it in
osmocom-latest-packages.sh, if the feed is not "latest". This way, the
packages don't have the latest tag as version anymore, and the version
changes if commits get pushed to the feed's branch.

Related: SYS#5370
Change-Id: I4a4fa3b8f66652ef36a7fe62047a88a69c473f19
2021-04-29 16:05:14 +02:00
Oliver Smith 4e82ff70cd OBS: refactor git_version_gen related logic
Move git_version_gen calls into an own function and add some of the
description from I76e3713f0b01a6110091ff90e8e53aa79533c374 where this
code was added.

Don't call it inside get_commit_version anymore, but call it before.
Don't try to cat the resulting .tarball-version there if it doesn't
exist.

Related: SYS#5370
Change-Id: I9a1b6ae4b4311abb77dc6390733c5e330e3d489e
2021-04-29 16:05:14 +02:00
Oliver Smith 5ef41781aa OBS: add PACKAGES env var
Skip checking out and building source packages of all other packages, if
the environment variable is set.

Related: SYS#5370
Change-Id: I83c3744713fd6abda4b832460f30eb2e79ebeed8
2021-04-29 16:05:14 +02:00
Oliver Smith 797e4aa386 OBS: latest: support new 2021q1 feed
Related: SYS#5370
Change-Id: I7a59a6ad94b21ba397349813b56b9bd5ea01c7c3
2021-04-29 16:05:10 +02:00
Oliver Smith c925604247 Cosmetic: OBS: explain difference latest/nightly
Related: SYS#5370
Change-Id: I4de2a9e9d096f8f77bfd72b8cabb0a69af2d51df
2021-04-29 16:04:34 +02:00
Oliver Smith e660339f2e OBS: require PROJ environment variable to be set
Uploading to network:osmocom:* should only be done when these scripts
are running in the Osmocom jenkins. Remove the default and require users
of the script to explicitly set PROJ.

Related: SYS#5370
Change-Id: If49ce217e77716b63dfde9139e869672a54b66a2
2021-04-29 16:04:00 +02:00
Oliver Smith 3c31513bcc OBS: nightly: build: simplify changelog parameter
Change-Id: I4a7f63f71d248b3796493adf6dc1be9c1b737c2e
2021-04-29 11:03:07 +02:00
Oliver Smith 57a07962f6 Cosmetic: OBS: describe build() parameters
Change-Id: Ib50499d6d3bd862879eaff58c9bf2260afc97ff8
2021-04-29 11:03:00 +02:00
Oliver Smith e8f56403fc OBS: nightly: append date to all packages
Instead of only appending the date to non-Osmocom packages in
get_commit_version, append it to all packages in build(). This ensures
we increase the version of Osmocom packages even if the commit did not
change.

Fixes: OS#5135
Change-Id: I04d84f39f4093c8edfe21a94c10ecb8d3c7b5b64
2021-04-29 10:38:10 +02:00
Oliver Smith 0bb0238465 OBS: nightly: no change to osmocom-$FEED changelog
Skip the logic to generate a new debian/changelog version for
osmocom-nightly and osmocom-next packages in build(). Use
$OSMO_OBS_CONFLICT_PKGVER instead, as it gets written to
debian/changelog in common-obs-conflict.sh already, and append the date
to the variable.

Related: OS#5135
Change-Id: I85f0bcb633c16c7b5a81104f198d9561f53c0c01
2021-04-29 10:32:08 +02:00
Oliver Smith ccc67c7d44 repo-install-test: get journal of failed services
Depending on the service, error messages are not shown with the
systemctl command. Run journalctl for failed services so we get the
reason for the failure in the jenkins log.

Related: OS#5130
Change-Id: Ib454424d7867137246fadd73255d4dbff63731a6
2021-04-26 10:05:09 +02:00
Harald Welte 92948e6f41 add jenkins jobs for TTCN3 tests of osmo-pcap-client
Change-Id: I4283c3f578a9baccddc693d4b09043502212a8e5
2021-04-25 21:55:18 +02:00
Harald Welte f1b0acb231 release-tarballs: Don't rely on system-installed 'known_hosts'
We should do like the various contrib/jenkins.sh scripts and
bring our own known_hosts file to deploy to ftp.osmocom.org.

This fixes deploying after merging If0d57ef9edc4d6b3fdf435e44573a15d64245b6a
recently.

Change-Id: Ia598739f820c8b00c33382afbbe88bf2638241dc
2021-04-25 21:55:18 +02:00
Harald Welte 7cabaabd0e osmocom-release-tarballs: Switch from rita -> ftp.osmocom.org
We should use service-aliases and not the primary host name, as
that makes migration between machines hard.

Change-Id: If0d57ef9edc4d6b3fdf435e44573a15d64245b6a
2021-04-22 11:25:55 +02:00
Harald Welte 39632345e7 disable gbproxy-latest TTCN3 tests for the time being.
The latest tagged libosmocore misses several important features
and it is currently not economic to maintain a test suite for
the older NS dialect.

Change-Id: I3c87ec54c86ecbfe0c358178b4d8dafd613db584
2021-04-13 13:22:02 +02:00
Harald Welte 20925c1c2a jobs: Add TTCN3 test job for osmo-ns-dummy master "sns" and "fr"
Change-Id: I1e7bb5a00b91ca3cb33750c9f2035125b797b45c
Related: SYS#5396
2021-03-31 10:23:21 +02:00
Harald Welte 22aae4b8fa Add TTCN3 test job for osmo-ns-dummy master
Related: OS#5396
Change-Id: I3442c1fb826385a847f3965306bc48249474176a
2021-03-30 20:37:24 +02:00
Pau Espin fd18e126ac scripts: build debian-buster-jenkins image in docker regsitry
Change-Id: Ia08537e0ec67fd5fe102e418648a4f71aaedfd19
2021-03-22 12:46:16 +01:00
Pau Espin 72e63562fd ansible: osmocom_build_deps.yml: Install missing open5gs dep libnghttp2-dev
The official Build Guide lists it as a dependency, and meson fails
without it.

Change-Id: I6b40acd7dd5bdc596b26227bba83e3f87a841d00
2021-03-15 19:23:53 +01:00
Pau Espin 085f2bc1f5 jobs: Add OGT open5gs build jobs
Change-Id: Ib7786d077017b24825d575b6801cb7c7f08ea832
2021-03-15 19:13:07 +01:00
Pau Espin c427bd6cf4 ansible: ogt: uhubctl has new cmdline syntax to specify ports
Change-Id: Ie57d85dc0a66e053247cd5bb92a4b2dea4eb4309
2021-03-15 14:51:11 +01:00
Pau Espin 8b9f1a8d55 ansible: ogt: prod setup has 12 modems nowadays
Change-Id: I6e401b292b2587733396c4160c008b894fc066a5
2021-03-15 14:50:28 +01:00
Oliver Smith 85bca774fc jobs/osmocom-release-tarballs: adjust containers
Build debian-stretch-obs-latest instead of debian-stretch-build, before
building debian-stretch-build-dist.

Depends: docker-playground I2cf6ed732e55b8f0e63bd8fc040749bd16676d0f
Change-Id: I4189ab1bf483f0a31ffdb35af0d42fe2e9a72a90
2021-03-12 08:38:40 +00:00