diff options
Diffstat (limited to 'jobs')
39 files changed, 2672 insertions, 489 deletions
diff --git a/jobs/README.adoc b/jobs/README.adoc index bea1d9f..eb14152 100644 --- a/jobs/README.adoc +++ b/jobs/README.adoc @@ -5,8 +5,6 @@ https://docs.openstack.org/infra/jenkins-job-builder/index.html[Jenkins Job Buil Install jenkins-job-builder: -For debian 9, see troubleshooting below. Otherwise: - apt-get install jenkins-job-builder Have a jenkins-job-builder.ini file. One of @@ -74,30 +72,78 @@ individual job names. Also be aware that jobs are only actually updated when anything changed. -- debian 9 +*Jenkins labels* -For jenkins-job-builder to work on debian 9: +Most jenkins jobs should run a docker container and install all required +dependencies inside that, so we don't need to install them on the jenkins node. +These jobs don't need to set a label, they can just run on any generic jenkins +node that has docker available. So if you add a new job, you probably don't +need a label at all. -add 'testing' to /etc/apt/sources.list like +Existing jobs typically have a label set by the topic they belong to, e.g.: +- osmocom-master +- osmocom-gerrit +- ttcn3 - deb http://ftp.de.debian.org/debian/ testing main +Other labels indicate specific software/hardware works here, e.g.: +- coverity +- hdlc +- osmo-gsm-tester +- podman -then +*ccache* - sudo apt-get update - sudo apt-get -t testing install python-jenkins - sudo apt-get install jenkins-job-builder +The jobs from master-builds and gerrit-verifications use ccache. View the +statistics with SSH on the build nodes with: -and make sure to *not* pick the python3 versions -(or you'll need to add catching of HTTPError to jenkins/__init__.py in -'def maybe_add_crumb') + $ CCACHE_DIR=~/ccache/gerrit-verifications ccache -s + $ CCACHE_DIR=~/ccache/master-builds ccache -s -*Jenkins labels* +Note that running multiple jobs in parallel influence the ccache statistics, +and it's impossible to tell which job caused which change in the stats (that's +why they are not printed at the end of each job, it would be confusing). + +*timers* + +A lot of the jenkins jobs run daily with a timer: + + triggers: + - timed: "H 20 * * *" + +or weekly: + + triggers: + - timed: "H 20 * * H" + +Use H for the minute / day of week, to have it derivated as hash of the job +name. Replace 20 with the hour (UTC) the job should run. + +The jobs follow this timetable, to ensure we don't attempt to use binary +packages before they have been built (leading to failing jobs). + + 18:00 - 21:00 OBS related + 18:XX osmocom-obs-sync (sync Debian:12 etc. with openSUSE OBS) + 19:XX osmocom-obs-check-new-distros + 19:XX osmocom-obs-wireshark + 20:XX osmocom-obs (new binary packages start building on OBS!) + + 22:00 - 03:00 Jobs that don't need binary packages + 22:XX coverity + 22:XX octsim_osmo-ccid-firmware + 22:XX osmo-gsm-tester-runner (virtual) + 23:XX master-builds-dahdi + 00:XX osmocom-api + 00:XX registry-update-base-images + 01:XX osmocom-build-tags-against-master + 01:XX osmocom-list-commits + 02:XX registry-triggers + 02:XX registry-rebuild-upload-fpga-build (weekly) -The build jobs are using labels to specify on which nodes the job should be run. -Please use the following labels + 04:00 - 18:00 Jobs that need binary packages + ttcn3-testsuites + 04:XX osmocom-release-manuals + 05:XX osmocom-release-tarballs + 06:XX repo-install-test + 06:XX coverity-status (runs intentionally much later than the coverity job) -- osmocom-master-debian8: are nodes which can build osmocom-master and is a debian 8 -- osmocom-master-debian9: are nodes which can build osmocom-master and is a debian 9 -- osmocom-gerrit-debian8: are nodes which can build osmocom-gerrit and is a debian 8 -- osmocom-gerrit-debian9: are nodes which can build osmocom-gerrit and is a debian 9 +master-builds: to avoid complexity, these run throughout the day (H H * * *). diff --git a/jobs/coverity-status.yml b/jobs/coverity-status.yml new file mode 100644 index 0000000..cb7522e --- /dev/null +++ b/jobs/coverity-status.yml @@ -0,0 +1,46 @@ +# Check if the coverity badge says "failed". This can happen for example if we +# use a coverity version that is no longer supported, and it doesn't fail in +# any other obvious way. (SYS#6685) +- project: + name: osmocom-coverity-status + jobs: + - osmocom-coverity-status + +- job: + name: 'osmocom-coverity-status' + project-type: freestyle + defaults: global + description: | + Verify that the coverity badge says "passed" and not "failed" (SYS#6685). + <br> + <br> + <img src="https://scan.coverity.com/projects/7523/badge.svg"> + builders: + - shell: | + coverity/badge_status.sh + publishers: + - email: + recipients: 'jenkins-notifications@lists.osmocom.org' + notify-every-unstable-build: true + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + parameters: + - string: + name: BRANCH + description: osmo-ci.git branch + default: 'origin/master' + scm: + - git: + url: https://gerrit.osmocom.org/osmo-ci + git-config-name: 'Jenkins Builder' + git-config-email: 'jenkins@osmocom.org' + branches: + - '$BRANCH' + triggers: + - timed: "H 06 * * *" + publishers: + - email: + notify-every-unstable-build: true + recipients: 'jenkins-notifications@lists.osmocom.org' diff --git a/jobs/coverity.yml b/jobs/coverity.yml index 5614fc0..42c060a 100644 --- a/jobs/coverity.yml +++ b/jobs/coverity.yml @@ -2,47 +2,48 @@ - project: name: osmocom-coverity jobs: - - osmocom-coverity-deps - osmocom-coverity - job: - name: 'osmocom-coverity-deps' - apt: - name: "{{ item }}" - cache_valid_time: 3600 - update_cache: yes - with_items: - - curl - -- job: name: 'osmocom-coverity' project-type: freestyle defaults: global description: 'Generated by job-builder' - display-name: 'Coverity-Upload (jenkins-job-builder)' node: coverity builders: - shell: | - cd $HOME/osmo-ci/coverity - export PATH=$PATH:/opt/coverity/current/bin - ./jenkins.sh + docker run \ + --rm=true \ + -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -u build \ + -v "$PWD:/build" \ + -v "$HOME/osmo-ci/coverity:/home/build/osmo-ci/coverity:ro" \ + -v "/opt/coverity:/opt/coverity:ro" \ + -w /build/coverity \ + "$USER/debian-bookworm-build" \ + ./jenkins.sh publishers: - email: - recipients: openbsc@lists.osmocom.org holger@freyther.de + recipients: 'jenkins-notifications@lists.osmocom.org' notify-every-unstable-build: true properties: - build-discarder: days-to-keep: 30 num-to-keep: 30 + parameters: + - string: + name: BRANCH + description: osmo-ci.git branch + default: 'origin/master' scm: - git: - url: git://git.osmocom.org/osmo-ci + url: https://gerrit.osmocom.org/osmo-ci git-config-name: 'Jenkins Builder' git-config-email: 'jenkins@osmocom.org' branches: - - 'origin/master' + - '$BRANCH' triggers: - - timed: "@daily" + - timed: "H 22 * * *" publishers: - email: notify-every-unstable-build: true diff --git a/jobs/gerrit-binpkgs.yml b/jobs/gerrit-binpkgs.yml new file mode 100644 index 0000000..a6cf44b --- /dev/null +++ b/jobs/gerrit-binpkgs.yml @@ -0,0 +1,73 @@ +# This file holds all gerrit verifications for building deb and rpm packages. +# https://jenkins.osmocom.org/jenkins/view/Jenkins-Gerrit/. +# One can simply add a gerrit job by adding project's repository to repos list. + +- project: + name: gerrit-binpkgs + jobs: + - 'gerrit-binpkgs' + +- job: + name: 'gerrit-binpkgs' + project-type: freestyle + node: osmocom-gerrit + concurrent: true + retry-count: 3 # scm checkout + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 1000 + description: | + binary packages job (deb/rpm) of CI for patches sent to + <a href="https://gerrit.osmocom.org">gerrit</a> + </br></br> + Related issue: <a href="https://osmocom.org/issues/2385">OS#2385</a> + + parameters: + !include: gerrit-verifications-parameters.yaml.inc + + scm: + - git: + basedir: '$PROJECT_NAME' + url: '$GERRIT_REPO_URL' + credentials-id: d5eda5e9-b59d-44ba-88d2-43473cb6e42d + branches: + - $GERRIT_BRANCH + refspec: $GERRIT_REFSPEC + name: + choosing-strategy: gerrit + wipe-workspace: true + skip-tag: true + submodule: + recursive: false + + builders: + - shell: |- + # Make obvious which distro we build for, for humans and for parsing + # by scripts/jenkins-gerrit/comment_generate.py + set +x + echo + echo "Building binary packages for distro: '$DISTRO'" + echo + set -x + + # Clone osmo-ci.git + rm -rf osmo-ci + git clone \ + --depth=1 \ + --branch="$BRANCH_CI" \ + https://gerrit.osmocom.org/osmo-ci \ + osmo-ci + git -C osmo-ci log --oneline + + cd "$PROJECT_NAME" + ../osmo-ci/scripts/obs/gerrit_binpkgs.sh "$DISTRO" + + wrappers: + - ansicolor: + colormap: xterm + - ssh-agent-credentials: + users: + - d5eda5e9-b59d-44ba-88d2-43473cb6e42d + +# vim: expandtab tabstop=2 shiftwidth=2 diff --git a/jobs/gerrit-lint.yml b/jobs/gerrit-lint.yml new file mode 100644 index 0000000..3039829 --- /dev/null +++ b/jobs/gerrit-lint.yml @@ -0,0 +1,62 @@ +# This file holds all gerrit lint verifications https://jenkins.osmocom.org/jenkins/view/Jenkins-Gerrit/. +# Add project's repositories to jobs/gerrit-verifications.yml. When +# pipeline_lint is set for that project, the pipeline will call the gerrit-lint +# job for it. + +- project: + name: gerrit-lint + jobs: + - 'gerrit-lint' + +- job: + name: 'gerrit-lint' + project-type: freestyle + node: osmocom-gerrit + retry-count: 3 # scm checkout + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 1000 + description: | + Lint job of CI for patches sent to <a href="https://gerrit.osmocom.org">gerrit</a>. + </br></br> + Related issue: <a href="https://osmocom.org/issues/5087">OS#5087</a> + + parameters: + !include: gerrit-verifications-parameters.yaml.inc + + scm: + - git: + basedir: 'code-from-gerrit' + url: '$GERRIT_REPO_URL' + credentials-id: d5eda5e9-b59d-44ba-88d2-43473cb6e42d + branches: + - $GERRIT_BRANCH + refspec: $GERRIT_REFSPEC + choosing-strategy: gerrit + wipe-workspace: false + skip-tag: true + submodule: + recursive: false + + builders: + - shell: | + rm -rf osmo-ci + git clone \ + --depth=1 \ + --branch="$BRANCH_CI" \ + https://gerrit.osmocom.org/osmo-ci \ + osmo-ci + git -C osmo-ci log --oneline + + cd code-from-gerrit + ../osmo-ci/lint/lint_diff.sh HEAD~1 + + wrappers: + - ansicolor: + colormap: xterm + - ssh-agent-credentials: + users: + - d5eda5e9-b59d-44ba-88d2-43473cb6e42d + +# vim: expandtab tabstop=2 shiftwidth=2 diff --git a/jobs/gerrit-verifications-comment.yml b/jobs/gerrit-verifications-comment.yml new file mode 100644 index 0000000..3ed54ad --- /dev/null +++ b/jobs/gerrit-verifications-comment.yml @@ -0,0 +1,45 @@ +# This job runs at the start/end of the pipeline in gerrit-verifications.yml. +# On start it posts a link to the pipeline to gerrit, and on end a list of +# failed/successful job links together with a vote +V/-V. + +- project: + name: gerrit-verifications-comment + jobs: + - 'gerrit-verifications-comment' + +- job: + name: 'gerrit-verifications-comment' + project-type: freestyle + node: osmocom-gerrit + retry-count: 3 # scm checkout + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 120 + description: | + Send start and result comments to <a href="https://gerrit.osmocom.org">gerrit</a>. + </br></br> + Related issue: <a href="https://osmocom.org/issues/2385">OS#2385</a> + + parameters: + !include: gerrit-verifications-parameters.yaml.inc + + scm: + - git: + url: 'https://gerrit.osmocom.org/osmo-ci' + credentials-id: d5eda5e9-b59d-44ba-88d2-43473cb6e42d + branches: + - '$BRANCH_CI' + wipe-workspace: true + + builders: + - shell: 'cd scripts/jenkins-gerrit && ./comment_send.sh' + + wrappers: + - ansicolor: + colormap: xterm + - ssh-agent-credentials: + users: + - d5eda5e9-b59d-44ba-88d2-43473cb6e42d + +# vim: expandtab tabstop=2 shiftwidth=2 diff --git a/jobs/gerrit-verifications-dahdi.yml b/jobs/gerrit-verifications-dahdi.yml new file mode 100644 index 0000000..5a8b3a6 --- /dev/null +++ b/jobs/gerrit-verifications-dahdi.yml @@ -0,0 +1,103 @@ +- project: + name: gerrit-dahdi-linux-stable + type: stable + repo: 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git' + linux-ver: + - "linux-4.19.y" + - "linux-5.10.y" + - "linux-6.1.y" + jobs: + - 'gerrit-dahdi-linux-{type}-{linux-ver}' + +- project: + name: gerrit-dahdi-linux-torvalds + type: torvalds + repo: 'https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git' + linux-ver: + - "master" + jobs: + - 'gerrit-dahdi-linux-{type}-{linux-ver}' + + +- job-template: + name: 'gerrit-dahdi-linux-{type}-{linux-ver}' + project-type: freestyle + node: osmocom-gerrit + concurrent: true + retry-count: 0 # scm checkout + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 120 + description: | + Pending gerrit code reviews of + <a href="https://gerrit.osmocom.org/#/q/status:open+project:dahdi-linux">dahdi-linux</a> + built against linux {linux-ver} + (<a href="https://osmocom.org/issues/5407">OS#5407</a>) + <br/><br/> + <b>Auto-generated using Jenkins Job Builder. DO NOT EDIT MANUALLY!</b> + + scm: + # Let jenkins clone the big linux repository and keep it between builds + # (wipe-workspace is false). Clone dahdi-linux with code from gerrit in + # the shell part below. + - git: + basedir: 'linux' + url: '{repo}' + branches: + - '{linux-ver}' + refspec: '{linux-ver}' + shallow-clone: true + wipe-workspace: false + clean: + before: true + + triggers: + - gerrit: + trigger-on: + - patchset-created-event: + exclude-drafts: true + exclude-no-code-change: true + projects: + - project-compare-type: 'PLAIN' + project-pattern: 'dahdi-linux' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**' + skip-vote: + successful: false + failed: false + unstable: false + notbuilt: false + silent: false + escape-quotes: false + server-name: gerrit.osmocom.org + + builders: + - shell: | + rm -rf dahdi-linux + git init dahdi-linux + cd dahdi-linux + git config advice.detachedHead false + git fetch \ + --depth=1 \ + https://gerrit.osmocom.org/dahdi-linux \ + "$GERRIT_REFSPEC" + git checkout FETCH_HEAD + cd .. + + docker run \ + --rm=true \ + -e "KSRC=/linux" \ + -v "$PWD/dahdi-linux:/build" \ + -v "$PWD/linux:/linux" \ + "$USER/debian-bookworm-build" \ + timeout 10m su build -c /build/contrib/jenkins.sh + + publishers: + - warnings: + console-log-parsers: + - 'GNU C Compiler 4 (gcc)' + resolve-relative-paths: true + +# vim: expandtab tabstop=2 shiftwidth=2 diff --git a/jobs/gerrit-verifications-parameters.yaml.inc b/jobs/gerrit-verifications-parameters.yaml.inc new file mode 100644 index 0000000..32df1b6 --- /dev/null +++ b/jobs/gerrit-verifications-parameters.yaml.inc @@ -0,0 +1,53 @@ +# This file gets included as parameters element of various jobs in the +# gerrit-verifications pipeline. All of these jobs have the same parameters +# and can be called from one run_job() function, without creating log entries +# about undefined parameters (OS#6261). See gerrit-verifications.yml for more +# information. + +- string: + name: BRANCH_CI + description: | + osmo-ci.git branch + default: 'master' +- string: + name: COMMENT_TYPE + description: set by gerrit verification pipeline job +- string: + name: DISTRO + description: set by gerrit verification pipeline job +- string: + name: GERRIT_BRANCH + description: set by gerrit verification pipeline job +- string: + name: GERRIT_CHANGE_NUMBER + description: set by gerrit verification pipeline job +- string: + name: GERRIT_HOST + description: set by gerrit verification pipeline job +- string: + name: GERRIT_PATCHSET_NUMBER + description: set by gerrit verification pipeline job +- string: + name: GERRIT_PATCHSET_REVISION + description: set by gerrit verification pipeline job +- string: + name: GERRIT_PATCHSET_UPLOADER_NAME + description: set by gerrit verification pipeline job +- string: + name: GERRIT_PORT + description: set by gerrit verification pipeline job +- string: + name: GERRIT_PROJECT + description: set by gerrit verification pipeline job +- string: + name: GERRIT_REFSPEC + description: set by gerrit verification pipeline job +- string: + name: GERRIT_REPO_URL + description: set by gerrit verification pipeline job +- string: + name: PIPELINE_BUILD_URL + description: set by gerrit verification pipeline job +- string: + name: PROJECT_NAME + description: set by gerrit verification pipeline job diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 486ecd3..607e909 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -1,14 +1,39 @@ -# This file holds all gerrit verifications https://jenkins.osmocom.org/jenkins/view/Jenkins-Gerrit/. -# One cane simply add a gerrit job by adding project's repository to repos list. +# This file holds all gerrit build verifications https://jenkins.osmocom.org/jenkins/view/Jenkins-Gerrit/. +# One can simply add a gerrit job by adding project's repository to repos list. +# +# Overview of jobs involved in the pipeline: +# https://osmocom.org/projects/osmocom-servers/wiki/Jenkins_gerrit-verifications_Pipeline +# +# How it works: +# * Two jobs get added for each repository: +# gerrit-{repos} +# gerrit-{repos}-build +# * The gerrit-{repos} job is a pipeline that runs the gerrit-{repos}-build job +# and other jobs (linting, building debian packages, ...). The purpose of +# this job is to reduce the amount of comments (and resulting mails) in +# gerrit coming from the jenkins build verification. If each job ran +# separately without this pipeline job, they would each generate mails. +# The gerrit-{repos} job gets triggered from gerrit whenever a new patch to +# test is available. It passes the GERRIT_BRANCH and GERRIT_REFSPEC variables +# from gerrit to the jobs called in the pipeline. +# * The gerrit-{repos}-build job runs contrib/jenkins.sh in docker in a matrix. +# By default the matrix results in only one job, however for some projects we +# use the matrix to build for multiple CPU architectures (x86_64, arm) or use +# it to build multiple configurations of the same project (see osmo-bts). +# +# NOTE: after updating the job with Jenkins Job Builder as usual, check if a +# new pipeline script was generated and approve it here: +# https://jenkins.osmocom.org/jenkins/scriptApproval/ +# This used to be necessary when changing the pipeline script, adding new +# projects etc. But it seems to get auto-approved now. - project: name: gerrit # following default values can be overridden by each repo disabled: false concurrent: true - node: osmocom-gerrit-debian8 # axes related defaults - slave_axis: !!python/tuple [osmocom-gerrit-debian9] + slave_axis: !!python/tuple [osmocom-gerrit] a1_name: a1 a1: !!python/tuple [default] a2_name: a2 @@ -24,47 +49,84 @@ # Documentation for variables (keep in sync!): # https://osmocom.org/projects/osmocom-servers/wiki/Jenkins_build_verification_jobs docker_run: | - ARTIFACT_STORE="$HOME/jenkins_build_artifact_store" - mkdir -p "$ARTIFACT_STORE" docker run --rm=true \ --cap-add SYS_PTRACE \ - -e ARTIFACT_STORE=/artifact_store \ -e ASCIIDOC_WARNINGS_CHECK="1" \ -e HOME=/build \ -e JOB_NAME="$JOB_NAME" \ -e MAKE=make \ -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ + -e OSMO_GSM_MANUALS_DIR="/opt/osmo-gsm-manuals" \ -e PARALLEL_MAKE="$PARALLEL_MAKE" \ - -e PATH="$PATH:/build_bin" \ -e WITH_MANUALS="1" \ -w /build -i -u build \ - -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ - -v "$ARTIFACT_STORE:/artifact_store" \ - docker_img: '$USER/debian-stretch-jenkins' - docker_img_erlang: '$USER/debian-buster-erlang' - cmd: '{docker_run} {docker_img} /build/contrib/jenkins.sh' + -v "$PWD:/build" \ + docker_run_ccache: | + CCACHE_DIR="$HOME/ccache/gerrit-verifications" + mkdir -p "$CCACHE_DIR" + chown osmocom-build:osmocom-build "$CCACHE_DIR" + + docker run --rm=true \ + --cap-add SYS_PTRACE \ + -e ASCIIDOC_WARNINGS_CHECK="1" \ + -e HOME=/build \ + -e JOB_NAME="$JOB_NAME" \ + -e MAKE=make \ + -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ + -e OSMO_GSM_MANUALS_DIR="/opt/osmo-gsm-manuals" \ + -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e WITH_MANUALS="1" \ + -w /build -i -u build \ + -v "$PWD:/build" \ + \ + -e CCACHE_DIR="/ccache" \ + -e PATH="/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \ + -v "$CCACHE_DIR:/ccache" \ + docker_img: '$USER/debian-bookworm-build' + docker_img_erlang: '$USER/debian-bookworm-erlang' + timeout_cmd: '/usr/bin/timeout 30m' + cmd: '{docker_run_ccache} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh' gerrit_url: 'ssh://jenkins@gerrit.osmocom.org:29418' repos_url: '{gerrit_url}/{repos}' gerrit_project: '{repos}' + # Which jobs to run in the pipeline + pipeline_build: true + pipeline_lint: true + pipeline_binpkgs: "debian:10 debian:12" # in alphabetical order repos: - - asn1c - - cellmgr-ng + - asn1c: + pipeline_binpkgs: "" + pipeline_lint: false + + - cellmgr-ng: + pipeline_binpkgs: "debian:10 debian:12" + + - docker-playground: + pipeline_build: false + pipeline_binpkgs: "" + - libasn1c - libgtpnl - libosmo-abis + - libosmo-gprs - libosmo-netif + - libosmo-pfcp - libosmo-sccp - libosmocore: + slave_axis: !!python/tuple [io_uring] # OS#6405 a1_name: arch a1: !!python/tuple [arm-none-eabi, amd64] combination_filter: '!(arch=="arm-none-eabi" && label=="FreeBSD_amd64")' - cmd: '{docker_run} {docker_img} /build/contrib/jenkins_arch.sh "$arch"' + cmd: '{docker_run_ccache} {docker_img} {timeout_cmd} /build/contrib/jenkins_arch.sh "$arch"' - libsmpp34 - - libtelnet + + - libtelnet: + pipeline_binpkgs: "" + - libusrp - openbsc: @@ -75,22 +137,24 @@ a3_name: IU a3: !!python/tuple [--disable-iu] cmd: | - {docker_run} \ + {docker_run_ccache} \ -e IU="$IU" \ -e SMPP="$SMPP" \ -e MGCP="$MGCP" \ - {docker_img} /build/contrib/jenkins.sh + {docker_img} {timeout_cmd} /build/contrib/jenkins.sh + pipeline_binpkgs: "" - openggsn: a1_name: GTP a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] concurrent: false - cmd: ./contrib/jenkins.sh + cmd: '{timeout_cmd} ./contrib/jenkins.sh' - osmo-bsc + - osmo-bsc-nat - osmo-bts: - slave_axis: !!python/tuple [osmocom-master-debian9, rpi4-deb9build-ansible] + slave_axis: !!python/tuple [osmocom-gerrit, rpi4-raspbian11] a1_name: FIRMWARE_VERSION a1: !!python/tuple [master, femtobts_v2.7, superfemto_v2.4, superfemto_v3.0.1pre, superfemto_v3.1, superfemto_v5.1, v2017.01, litecell15, oc2g, oc2g-next] a2_name: BTS_MODEL @@ -98,24 +162,60 @@ a3_name: WITH_MANUALS a3: !!python/tuple ["1", "0"] combination_filter: > - (FIRMWARE_VERSION == "master" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (FIRMWARE_VERSION == "master" && BTS_MODEL == "trx" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") || - (FIRMWARE_VERSION == "femtobts_v2.7" && BTS_MODEL == "sysmo" && WITH_MANUALS == "1" && label == "osmocom-master-debian9") || - (FIRMWARE_VERSION == "superfemto_v2.4" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (FIRMWARE_VERSION == "superfemto_v3.0.1pre" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (FIRMWARE_VERSION == "superfemto_v3.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (FIRMWARE_VERSION == "superfemto_v5.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (FIRMWARE_VERSION == "v2017.01" && BTS_MODEL == "lc15" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (FIRMWARE_VERSION == "litecell15" && BTS_MODEL == "lc15" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (FIRMWARE_VERSION == "oc2g" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (FIRMWARE_VERSION == "oc2g-next" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") + (FIRMWARE_VERSION == "master" && WITH_MANUALS == "0" && label == "osmocom-gerrit") || + (FIRMWARE_VERSION == "master" && BTS_MODEL == "trx" && WITH_MANUALS == "0" && label == "rpi4-raspbian11") || + (FIRMWARE_VERSION == "femtobts_v2.7" && BTS_MODEL == "sysmo" && WITH_MANUALS == "1" && label == "osmocom-gerrit") || + (FIRMWARE_VERSION == "superfemto_v2.4" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-gerrit") || + (FIRMWARE_VERSION == "superfemto_v3.0.1pre" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-gerrit") || + (FIRMWARE_VERSION == "superfemto_v3.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-gerrit") || + (FIRMWARE_VERSION == "superfemto_v5.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-gerrit") || + (FIRMWARE_VERSION == "v2017.01" && BTS_MODEL == "lc15" && WITH_MANUALS == "0" && label == "osmocom-gerrit") || + (FIRMWARE_VERSION == "litecell15" && BTS_MODEL == "lc15" && WITH_MANUALS == "0" && label == "osmocom-gerrit") || + (FIRMWARE_VERSION == "oc2g" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0" && label == "osmocom-gerrit") || + (FIRMWARE_VERSION == "oc2g-next" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0" && label == "osmocom-gerrit") concurrent: false - cmd: 'ASCIIDOC_WARNINGS_CHECK="1" ./contrib/jenkins_bts_model.sh "$BTS_MODEL"' + cmd: | + DOCKER_IMG="{docker_img}" + case "$(arch)" in + arm*) DOCKER_IMG="$DOCKER_IMG-arm" ;; + esac + {docker_run_ccache} \ + -e FIRMWARE_VERSION="$FIRMWARE_VERSION" \ + -e WITH_MANUALS="$WITH_MANUALS" \ + "$DOCKER_IMG" {timeout_cmd} /build/contrib/jenkins_bts_model.sh "$BTS_MODEL" - osmo_dia2gsup: repos_url: '{gerrit_url}/erlang/{repos}' gerrit_project: 'erlang/{repos}' - cmd: '{docker_run} {docker_img_erlang} /build/contrib/jenkins.sh' + cmd: '{docker_run} {docker_img_erlang} {timeout_cmd} /build/contrib/jenkins.sh' + pipeline_binpkgs: "debian:11 debian:12" + + - osmo-epdg: + repos_url: '{gerrit_url}/erlang/{repos}' + gerrit_project: 'erlang/{repos}' + cmd: '{docker_run} {docker_img_erlang} {timeout_cmd} /build/contrib/jenkins.sh' + pipeline_binpkgs: "debian:12" + + - osmo-e1-hardware: + a2_name: JOB_TYPE + a2: !!python/tuple ["firmware", "gateware", "manuals", "software"] + cmd: | + DOCKER_IMG="{docker_img}" + case "$JOB_TYPE" in + firmware|gateware|manuals) + DOCKER_IMG="registry.osmocom.org/$USER/fpga-build" + docker pull "$DOCKER_IMG" + ;; + esac + {docker_run} \ + -e JOB_TYPE="$JOB_TYPE" \ + "$DOCKER_IMG" \ + {timeout_cmd} /build/contrib/jenkins.sh + pipeline_binpkgs: "" + + - osmo-ci: + pipeline_build: false + pipeline_binpkgs: "" - osmo-ggsn: a1_name: GTP @@ -126,17 +226,19 @@ (GTP == "--enable-gtp-linux" && WITH_MANUALS == "0") || (GTP == "--disable-gtp-linux" && WITH_MANUALS == "1") cmd: | - {docker_run} \ + {docker_run_ccache} \ -e GTP="$GTP" \ -e WITH_MANUALS="$WITH_MANUALS" \ - {docker_img} /build/contrib/jenkins.sh + {docker_img} {timeout_cmd} /build/contrib/jenkins.sh - - osmo-gsm-manuals + - osmo-gsm-manuals: + pipeline_binpkgs: "debian:10 debian:12" - osmo_gsup: repos_url: '{gerrit_url}/erlang/{repos}' gerrit_project: 'erlang/{repos}' - cmd: '{docker_run} {docker_img_erlang} /build/contrib/jenkins.sh' + cmd: '{docker_run_ccache} {docker_img_erlang} {timeout_cmd} /build/contrib/jenkins.sh' + pipeline_binpkgs: "" - osmo-hlr - osmo-iuh @@ -148,18 +250,18 @@ a2_name: WITH_MANUALS a2: !!python/tuple ["1", "0"] combination_filter: > - (IU == "--enable-iu" && WITH_MANUALS == "0") || - (IU == "--disable-iu" && WITH_MANUALS == "1") + (IU == "--enable-iu" && WITH_MANUALS == "1") || + (IU == "--disable-iu" && WITH_MANUALS == "0") cmd: | - {docker_run} \ + {docker_run_ccache} \ -e IU="$IU" \ -e WITH_MANUALS="$WITH_MANUALS" \ - {docker_img} /build/contrib/jenkins.sh + {docker_img} {timeout_cmd} /build/contrib/jenkins.sh - osmo-pcap - osmo-pcu: - slave_axis: !!python/tuple [osmocom-master-debian9, rpi4-deb9build-ansible] + slave_axis: !!python/tuple [osmocom-gerrit, rpi4-raspbian11] a1_name: FIRMWARE_VERSION a1: !!python/tuple [master, v2017.01, litecell15, oc2g] a2_name: with_vty @@ -169,24 +271,29 @@ a4_name: WITH_MANUALS a4: !!python/tuple ["1", "0"] combination_filter: > - (with_vty == "True" && with_dsp == "sysmo" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="v2017.01" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="litecell15" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (with_vty == "True" && with_dsp == "oc2g" && FIRMWARE_VERSION=="oc2g" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (with_vty == "False" && with_dsp == "none" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "1" && label == "osmocom-master-debian9") || - (with_vty == "False" && with_dsp == "none" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") + (with_vty == "True" && with_dsp == "sysmo" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0" && label == "osmocom-gerrit") || + (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0" && label == "osmocom-gerrit") || + (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="v2017.01" && WITH_MANUALS == "0" && label == "osmocom-gerrit") || + (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="litecell15" && WITH_MANUALS == "0" && label == "osmocom-gerrit") || + (with_vty == "True" && with_dsp == "oc2g" && FIRMWARE_VERSION=="oc2g" && WITH_MANUALS == "0" && label == "osmocom-gerrit") || + (with_vty == "False" && with_dsp == "none" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "1" && label == "osmocom-gerrit") || + (with_vty == "False" && with_dsp == "none" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0" && label == "rpi4-raspbian11") cmd: | - {docker_run} \ + DOCKER_IMG="{docker_img}" + case "$(arch)" in + arm*) DOCKER_IMG="$DOCKER_IMG-arm" ;; + esac + {docker_run_ccache} \ -e FIRMWARE_VERSION="$FIRMWARE_VERSION" \ -e with_vty="$with_vty" \ -e with_dsp="$with_dsp" \ -e WITH_MANUALS="$WITH_MANUALS" \ - {docker_img} /build/contrib/jenkins.sh + "$DOCKER_IMG" {timeout_cmd} /build/contrib/jenkins.sh - osmo-python-tests: repos_url: '{gerrit_url}/python/{repos}' gerrit_project: 'python/{repos}' + pipeline_binpkgs: "debian:10 debian:12" - osmo-sgsn: a1_name: IU @@ -194,80 +301,358 @@ a2_name: WITH_MANUALS a2: !!python/tuple ["1", "0"] combination_filter: > - (IU == "--enable-iu" && WITH_MANUALS == "0") || - (IU == "--disable-iu" && WITH_MANUALS == "1") + (IU == "--enable-iu" && WITH_MANUALS == "1") || + (IU == "--disable-iu" && WITH_MANUALS == "0") cmd: | - {docker_run} \ + {docker_run_ccache} \ -e IU="$IU" \ -e WITH_MANUALS="$WITH_MANUALS" \ - {docker_img} /build/contrib/jenkins.sh + {docker_img} {timeout_cmd} /build/contrib/jenkins.sh - osmo_ss7: repos_url: '{gerrit_url}/erlang/{repos}' gerrit_project: 'erlang/{repos}' - cmd: '{docker_run} {docker_img_erlang} /build/contrib/jenkins.sh' + cmd: '{docker_run} {docker_img_erlang} {timeout_cmd} /build/contrib/jenkins.sh' + pipeline_binpkgs: "" - osmo-sip-connector - osmo-trx: - slave_axis: !!python/tuple [osmocom-master-debian9,rpi4-deb9build-ansible] + slave_axis: !!python/tuple [osmocom-gerrit,rpi4-raspbian11] a1_name: INSTR - a1: !!python/tuple [--with-sse, --without-sse --with-neon, --with-neon-vfpv4] + a1: !!python/tuple [--with-sse, --without-sse, --with-neon, --with-neon-vfpv4] a2_name: WITH_MANUALS a2: !!python/tuple ["1", "0"] combination_filter: > - (INSTR == "--without-sse" && WITH_MANUALS == "1" && label == "osmocom-master-debian9") || - (INSTR == "--with-sse" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (INSTR == "--with-neon" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") || - (INSTR == "--with-neon-vfpv4" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") - cmd: 'ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins.sh' - - - osmocom-bb - - osmo-tetra - - osmo-sysmon + (INSTR == "--without-sse" && WITH_MANUALS == "1" && label == "osmocom-gerrit") || + (INSTR == "--with-sse" && WITH_MANUALS == "0" && label == "osmocom-gerrit") || + (INSTR == "--with-neon" && WITH_MANUALS == "0" && label == "rpi4-raspbian11") || + (INSTR == "--with-neon-vfpv4" && WITH_MANUALS == "0" && label == "rpi4-raspbian11") + cmd: | + DOCKER_IMG="{docker_img}" + case "$(arch)" in + arm*) DOCKER_IMG="$DOCKER_IMG-arm" ;; + esac + {docker_run_ccache} \ + -e INSTR="$INSTR" \ + -e WITH_MANUALS="$WITH_MANUALS" \ + "$DOCKER_IMG" {timeout_cmd} /build/contrib/jenkins.sh + + - osmocom-bb: + pipeline_binpkgs: "debian:12" + + - osmo-tetra: + pipeline_binpkgs: "" + + - osmo-sysmon: + pipeline_binpkgs: "debian:10 debian:12" + - osmo-remsim - simtrace2 - - osmo-asf4-dfu - - osmo-ccid-firmware + + - osmo-opencm3-projects: + cmd: '{docker_run} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh' + pipeline_binpkgs: "" + + - osmo-asf4-dfu: + pipeline_binpkgs: "" + + - osmo-ccid-firmware: + pipeline_binpkgs: "" + - osmo-e1d - osmo-cbc - - osmo-e1-recorder - - gapk + + - osmo-e1-recorder: + pipeline_binpkgs: "" + + - gapk: + pipeline_binpkgs: "debian:12" + - osmo-uecups - - osmo-el2tpd + + - osmo-el2tpd: + pipeline_binpkgs: "" + - osmo-smlc + - osmo-gbproxy + - osmo-hnodeb + + - osmo-hnbgw: + a1_name: PFCP + a1: !!python/tuple ["1", "0"] + a2_name: WITH_MANUALS + a2: !!python/tuple ["1", "0"] + a3_name: NFTABLES + a3: !!python/tuple ["1", "0"] + combination_filter: > + (PFCP == "1" && WITH_MANUALS == "1" && NFTABLES == "1") || + (PFCP == "0" && WITH_MANUALS == "0" && NFTABLES == "0") + cmd: | + {docker_run_ccache} \ + -e PFCP="$PFCP" \ + -e WITH_MANUALS="$WITH_MANUALS" \ + -e NFTABLES="$NFTABLES" \ + {docker_img} {timeout_cmd} /build/contrib/jenkins.sh + + - osmo-upf: + pipeline_binpkgs: "debian:11 debian:12" - pysim: - slave_axis: !!python/tuple [simtester] concurrent: false - cmd: './contrib/jenkins.sh' + slave_axis: !!python/tuple [simtester,osmocom-gerrit] + a2_name: JOB_TYPE + a2: !!python/tuple ["test", "distcheck", "pylint", "docs"] + combination_filter: > + (JOB_TYPE == "test" && label == "simtester") || + (JOB_TYPE == "distcheck" && label == "osmocom-gerrit") || + (JOB_TYPE == "pylint" && label == "osmocom-gerrit") || + (JOB_TYPE == "docs" && label == "osmocom-gerrit") + cmd: | + case "$JOB_TYPE" in + "test") + {timeout_cmd} ./contrib/jenkins.sh + ;; + *) + {docker_run} \ + -e JOB_TYPE="$JOB_TYPE" \ + {docker_img} \ + {timeout_cmd} /build/contrib/jenkins.sh + ;; + esac + pipeline_binpkgs: "" - osmo-ttcn3-hacks: - repos_url: 'https://gerrit.osmocom.org/{repos}' slave_axis: !!python/tuple [ttcn3] - concurrent: false cmd: | - set -e - make deps; make clean; make compile + docker run \ + --rm \ + -v "$PWD:/build" \ + "registry.osmocom.org/osmocom-build/debian-bookworm-titan" \ + {timeout_cmd} \ + sh -e -x -c " + useradd --uid=1000 build; + cd /build; + su build -c 'make deps'; + su build -c 'make clean'; + su build -c 'make compile'; + " + pipeline_binpkgs: "" + + - dahdi-tools: + pipeline_lint: false + pipeline_binpkgs: "" jobs: - 'gerrit-{repos}' + - 'gerrit-{repos}-build' - job-template: name: 'gerrit-{repos}' + project-type: pipeline + concurrent: true + parameters: + - bool: + name: PIPELINE_BUILD + description: Enable the build job (runs contrib/jenkins.sh) + default: '{obj:pipeline_build}' + - bool: + name: PIPELINE_LINT + description: Enable the lint job + default: '{obj:pipeline_lint}' + - string: + name: REPO_URL + description: Clone URL, to be passed to jobs started in the pipeline + default: '{obj:repos_url}' + - string: + name: PIPELINE_BINPKGS + description: | + Enable the binpkgs job (build deb/rpm packages) for the given space + separated distributions. Empty list disables the binpkgs job. The + distributions must have binary packages in the osmocom:master + repository. + default: '{obj:pipeline_binpkgs}' + dsl: | + def run_job(display_name, job_name, comment_type=null, distro=null) {{ + try {{ + echo "pipeline_${{display_name}}: running job ${{job_name}}" + + // IMPORTANT: Keep gerrit-verifications-parameters.yaml.inc in sync + // with the list of parameters here, and make sure all jobs passed + // to run_job() include the .yaml.inc file. (OS#6261) + build job: job_name, parameters: [ + string(name: "COMMENT_TYPE", value: comment_type), + string(name: "DISTRO", value: distro), + string(name: "GERRIT_BRANCH", value: "${{env.GERRIT_BRANCH}}"), + string(name: "GERRIT_CHANGE_NUMBER", value: "${{env.GERRIT_CHANGE_NUMBER}}"), + string(name: "GERRIT_HOST", value: "${{env.GERRIT_HOST}}"), + string(name: "GERRIT_PATCHSET_NUMBER", value: "${{env.GERRIT_PATCHSET_NUMBER}}"), + string(name: "GERRIT_PATCHSET_REVISION", value: "${{env.GERRIT_PATCHSET_REVISION}}"), + string(name: "GERRIT_PATCHSET_UPLOADER_NAME", value: "${{env.GERRIT_PATCHSET_UPLOADER_NAME}}"), + string(name: "GERRIT_PORT", value: "${{env.GERRIT_PORT}}"), + string(name: "GERRIT_PROJECT", value: "${{env.GERRIT_PROJECT}}"), + string(name: "GERRIT_REFSPEC", value: "${{env.GERRIT_REFSPEC}}"), + string(name: "GERRIT_REPO_URL", value: "${{env.REPO_URL}}"), + string(name: "PIPELINE_BUILD_URL", value: "${{env.BUILD_URL}}"), + string(name: "PROJECT_NAME", value: "{repos}"), + ] + echo "pipeline_${{display_name}}: SUCCESS" + }} catch (Exception e) {{ + echo "pipeline_${{display_name}}: FAILED" + }} + }} + + pipeline {{ + agent none + stages {{ + stage("Verification") {{ + parallel {{ + + // Run the comment job to add the pipeline link to gerrit + stage("Start Comment") {{ + steps {{ + script {{ + run_job("comment_start", "gerrit-verifications-comment", "start") + }} + }} + }} + + stage("Build") {{ + when {{ + expression {{ params.PIPELINE_BUILD }} + }} + steps {{ + script {{ + run_job("build", "gerrit-{repos}-build") + }} + }} + }} + + stage("Lint") {{ + when {{ + expression {{ params.PIPELINE_LINT }} + }} + steps {{ + script {{ + run_job("lint", "gerrit-lint") + }} + }} + }} + + // Generating binpkgs stages is not possible if we want to run + // them in parallel and not have another job that just waits + // until they complete. + + stage("binpkgs-0") {{ + when {{ + expression {{ params.PIPELINE_BINPKGS.split().size() > 0 }} + }} + steps {{ + script {{ + distro = params.PIPELINE_BINPKGS.split()[0] + run_job(distro, "gerrit-binpkgs", null, distro) + }} + }} + }} + + stage("binpkgs-1") {{ + when {{ + expression {{ params.PIPELINE_BINPKGS.split().size() > 1 }} + }} + steps {{ + script {{ + distro = params.PIPELINE_BINPKGS.split()[1] + run_job(distro, "gerrit-binpkgs", null, distro) + }} + }} + }} + + stage("binpkgs-2") {{ + when {{ + expression {{ params.PIPELINE_BINPKGS.split().size() > 2 }} + }} + steps {{ + script {{ + distro = params.PIPELINE_BINPKGS.split()[2] + run_job(distro, "gerrit-binpkgs", null, distro) + }} + }} + }} + + }} // end of parallel + }} // end of Verification stage + + // Run the comment job to get successful/failed links and add a + // comment + vote to gerrit + stage("Result Comment") {{ + steps {{ + script {{ + run_job("comment_result", "gerrit-verifications-comment", "result") + }} + }} + }} + + }} + }} + disabled: '{obj:disabled}' + retry-count: 3 # scm checkout + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 1000 + description: | + Pipeline of CI for patches sent to + <a href="https://gerrit.osmocom.org/#/q/status:open+project:{repos}">{repos}</a> + <br/><br/> + <b>Auto-generated using Jenkins Job Builder. DO NOT EDIT MANUALLY!</b> + + scm: + - git: + url: '{obj:repos_url}' + credentials-id: d5eda5e9-b59d-44ba-88d2-43473cb6e42d + branches: + - $GERRIT_BRANCH + refspec: $GERRIT_REFSPEC + name: + choosing-strategy: gerrit + wipe-workspace: false + skip-tag: true + submodule: + recursive: true + + triggers: + - gerrit: + trigger-on: + - patchset-created-event: + exclude-drafts: true + exclude-no-code-change: true + projects: + - project-compare-type: 'PLAIN' + project-pattern: '{obj:gerrit_project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**' + skip-vote: + successful: false + failed: false + unstable: false + notbuilt: false + silent: true # comment + vote is done in gerrit-pipeline-result.yml + escape-quotes: false + server-name: gerrit.osmocom.org + +- job-template: + name: 'gerrit-{repos}-build' project-type: matrix - node: '{node}' concurrent: '{obj:concurrent}' disabled: '{obj:disabled}' retry-count: 3 # scm checkout properties: - build-discarder: days-to-keep: 30 - num-to-keep: 120 - artifact-days-to-keep: -1 - artifact-num-to-keep: -1 + num-to-keep: 1000 description: | - Pending gerrit code reviews of + Build job of CI for patches sent to <a href="https://gerrit.osmocom.org/#/q/status:open+project:{repos}">{repos}</a> <br/><br/> <b>Auto-generated using Jenkins Job Builder. DO NOT EDIT MANUALLY!</b> @@ -309,29 +694,11 @@ choosing-strategy: gerrit wipe-workspace: false skip-tag: true + submodule: + recursive: true - triggers: - - gerrit: - trigger-on: - - patchset-created-event: - exclude-drafts: true - exclude-no-code-change: true - projects: - - project-compare-type: 'PLAIN' - project-pattern: '{obj:gerrit_project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**' - skip-vote: - successful: false - failed: false - unstable: false - notbuilt: false - silent: false - escape-quotes: false - no-name-and-email: false - trigger-for-unreviewed-patches: true - server-name: gerrit.osmocom.org + parameters: + !include: gerrit-verifications-parameters.yaml.inc builders: - shell: '{obj:cmd}' diff --git a/jobs/master-builds-dahdi.yml b/jobs/master-builds-dahdi.yml new file mode 100644 index 0000000..8f6d070 --- /dev/null +++ b/jobs/master-builds-dahdi.yml @@ -0,0 +1,82 @@ +- project: + name: master-builds-dahdi-linux-stable + type: stable + repo: 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git' + linux-ver: + - "linux-4.19.y" + - "linux-5.10.y" + - "linux-6.1.y" + jobs: + - 'master-dahdi-linux-{type}-{linux-ver}' + +- project: + name: master-builds-dahdi-linux-torvalds + type: torvalds + repo: 'https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git' + linux-ver: + - "master" + jobs: + - 'master-dahdi-linux-{type}-{linux-ver}' + +- job-template: + name: 'master-dahdi-linux-{type}-{linux-ver}' + project-type: freestyle + node: osmocom-master + concurrent: true + retry-count: 0 # scm checkout + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 120 + description: | + Automatic jenkins test job of + <a href="https://gerrit.osmocom.org/#/q/status:open+project:dahdi-linux">dahdi-linux</a> + built against linux {linux-ver} + (<a href="https://osmocom.org/issues/5407">OS#5407</a>) + <br/><br/> + <b>Auto-generated using Jenkins Job Builder. DO NOT EDIT MANUALLY!</b> + + scm: + # Let jenkins clone the big linux repository and keep it between builds + # (wipe-workspace is false). Clone dahdi-linux with code from gerrit in + # the shell part below. + - git: + basedir: 'linux' + url: '{repo}' + branches: + - '{linux-ver}' + refspec: '{linux-ver}' + shallow-clone: true + wipe-workspace: false + clean: + before: true + + triggers: + - timed: "H 23 * * *" + + builders: + - shell: | + rm -rf dahdi-linux + git clone \ + --depth=1 \ + https://gerrit.osmocom.org/dahdi-linux + git -C dahdi-linux log --oneline + + docker run \ + --rm=true \ + -e "KSRC=/linux" \ + -v "$PWD/dahdi-linux:/build" \ + -v "$PWD/linux:/linux" \ + "$USER/debian-bookworm-build" \ + timeout 10m su build -c /build/contrib/jenkins.sh + + publishers: + - warnings: + console-log-parsers: + - 'GNU C Compiler 4 (gcc)' + resolve-relative-paths: true + - email: + recipients: 'jenkins-notifications@lists.osmocom.org laforge@gnumonks.org' + send-to-individuals: true + +# vim: expandtab tabstop=2 shiftwidth=2 diff --git a/jobs/master-builds.yml b/jobs/master-builds.yml index 47a9eea..a902be8 100644 --- a/jobs/master-builds.yml +++ b/jobs/master-builds.yml @@ -5,9 +5,8 @@ # following default values can be overridden by each repo disabled: false concurrent: true - node: 'osmocom-master-debian8' # axes related defaults - slave_axis: !!python/tuple [osmocom-master-debian9] + slave_axis: !!python/tuple [osmocom-master] a1_name: a1 a1: !!python/tuple [default] a2_name: a2 @@ -23,34 +22,68 @@ # Documentation for variables (keep in sync!): # https://osmocom.org/projects/osmocom-servers/wiki/Jenkins_build_verification_jobs docker_run: | - ARTIFACT_STORE="$HOME/jenkins_build_artifact_store" - mkdir -p "$ARTIFACT_STORE" docker run --rm=true \ --cap-add SYS_PTRACE \ - -e ARTIFACT_STORE=/artifact_store \ -e ASCIIDOC_WARNINGS_CHECK="1" \ -e HOME=/build \ + -e IS_MASTER_BUILD=1 \ -e JOB_NAME="$JOB_NAME" \ -e MAKE=make \ -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ + -e OSMO_GSM_MANUALS_DIR="/opt/osmo-gsm-manuals" \ -e PARALLEL_MAKE="$PARALLEL_MAKE" \ - -e PATH="$PATH:/build_bin" \ -e PUBLISH="1" \ + -e SSH_AUTH_SOCK=/ssh-agent \ -e WITH_MANUALS="1" \ -w /build -i -u build \ - -v "$PWD:/build" -v "$HOME/bin:/build_bin" \ - -v "$ARTIFACT_STORE:/artifact_store" \ + -v $(readlink -f $SSH_AUTH_SOCK):/ssh-agent \ + -v "$PWD:/build" \ -v "$HOME/.ssh:/home/build/.ssh:ro" \ - docker_img: '$USER/debian-stretch-jenkins' - cmd: '{docker_run} {docker_img} /build/contrib/jenkins.sh' - wrappers: [] + docker_run_ccache: | + CCACHE_DIR="$HOME/ccache/master-builds" + mkdir -p "$CCACHE_DIR" + chown osmocom-build:osmocom-build "$CCACHE_DIR" + + docker run --rm=true \ + --cap-add SYS_PTRACE \ + -e ASCIIDOC_WARNINGS_CHECK="1" \ + -e HOME=/build \ + -e IS_MASTER_BUILD=1 \ + -e JOB_NAME="$JOB_NAME" \ + -e MAKE=make \ + -e OSMOPY_DEBUG_TCP_SOCKETS="1" \ + -e OSMO_GSM_MANUALS_DIR="/opt/osmo-gsm-manuals" \ + -e PARALLEL_MAKE="$PARALLEL_MAKE" \ + -e PUBLISH="1" \ + -e SSH_AUTH_SOCK=/ssh-agent \ + -e WITH_MANUALS="1" \ + -w /build -i -u build \ + -v $(readlink -f $SSH_AUTH_SOCK):/ssh-agent \ + -v "$PWD:/build" \ + -v "$HOME/.ssh:/home/build/.ssh:ro" \ + \ + -e CCACHE_DIR="/ccache" \ + -e PATH="/usr/lib/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \ + -v "$CCACHE_DIR:/ccache" \ + docker_img: '$USER/debian-bookworm-build' + docker_img_erlang: '$USER/debian-bookworm-erlang' + timeout_cmd: '/usr/bin/timeout 30m' + cmd: '{docker_run_ccache} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh' trigger: email: jenkins-notifications@lists.osmocom.org laforge@gnumonks.org - git_base_url: git.osmocom.org + gerrit_url: 'https://gerrit.osmocom.org' + gitea_url: 'https://gitea.osmocom.org' + repos_url: '{gerrit_url}/{repos}' + branches: + - master + ssh: + - docs_ftp.osmocom.org # in alphabetical order repos: - - asn1c + - asn1c: + branches: + - osmo-iuh/master - libasn1c: # Full triggers would be: @@ -60,7 +93,7 @@ trigger: master-osmo-iuh - libgtpnl: - trigger: master-osmo-ggsn, openggsn + trigger: master-osmo-ggsn, openggsn, master-osmo-upf - libosmo-abis: # Full triggers would be: @@ -73,21 +106,32 @@ master-libosmo-netif, master-osmo-bts - libosmo-dsp: + repos_url: '{gitea_url}/sdr/{repos}' cmd: | - {docker_run} \ - {docker_img} sh -ex -c \ + {docker_run_ccache} \ + {docker_img} {timeout_cmd} sh -ex -c \ 'autoreconf -fi; \ ./configure; \ $MAKE $PARALLEL_MAKE; \ $MAKE distcheck' trigger: master-osmo-gmr - email: gerrit-log@lists.osmocom.org laforge@gnumonks.org 246tnt@gmail.com + email: jenkins-notifications@lists.osmocom.org laforge@gnumonks.org 246tnt@gmail.com + + - libosmo-gprs: + # Full triggers would be: + # trigger: > + # master-osmo-pcu + # Optimized: + # (see comment at libosmocore) + trigger: > + master-osmo-pcu - libosmo-netif: # Full triggers would be: # trigger: > # master-libosmo-sccp, master-openbsc, mastere-osmo-hlr, master-osmo-iuh, - # master-osmo-mgw, master-osmo-msc, master-osmo-sgsn + # master-osmo-mgw, master-osmo-msc, master-osmo-sgsn, master-osmo-hnodeb, + # master-osmo-hnbgw # Optimized: # (see comment at libosmocore) trigger: > @@ -96,31 +140,44 @@ master-osmo-mgw, master-osmo-sgsn + - libosmo-pfcp: + # Full triggers would be: + # trigger: > + # master-osmo-upf, master-osmo-hnbgw + # Optimized: + # (see comment at libosmocore) + trigger: > + master-osmo-upf, + master-osmo-hnbgw + - libosmo-sccp: # Full triggers would be: # trigger: > - # master-openbsc, master-osmo-bsc, master-osmo-iuh, master-osmo-msc, master-osmo-sgsn + # master-openbsc, master-osmo-bsc, master-osmo-iuh, master-osmo-msc, + # master-osmo-sgsn, master-osmo-hnodeb, master-osmo-hnbgw # Optimized: # (see comment at libosmocore) trigger: > master-openbsc, master-osmo-bsc, + master-osmo-bsc-nat, master-osmo-iuh, master-osmo-msc, master-osmo-sgsn - libosmocore: + slave_axis: !!python/tuple [io_uring] # OS#6405 a1_name: arch a1: !!python/tuple [arm-none-eabi, amd64] combination_filter: '!(arch=="arm-none-eabi" && label=="FreeBSD_amd64")' - cmd: '{docker_run} {docker_img} /build/contrib/jenkins_arch.sh "$arch"' + cmd: '{docker_run_ccache} {docker_img} {timeout_cmd} /build/contrib/jenkins_arch.sh "$arch"' # Full triggers would be: # trigger: > # master-libosmo-abis, master-libosmo-netif, master-libosmo-sccp, master-openbsc, # master-osmo-bsc, master-osmo-bts, master-osmo-ggsn, master-osmo-gmr, master-osmo-hlr, # master-osmo-iuh, master-osmo-mgw, master-osmo-msc, master-osmo-pcap, master-osmo-pcu, - # master-osmo-sgsn, master-osmo-sip-connector, master-osmo-tetra, - # master-osmocom-bb, SIMtrace, xgoldmon + # master-osmo-sgsn, master-osmo-sip-connector, master-osmo-tetra, master-osmo-hnodeb + # master-osmocom-bb, master-simtrace, master-xgoldmon # Optimized: # libosmocore # -> master-libosmo-abis @@ -128,29 +185,38 @@ # -> master-libosmo-sccp # -> master-openbsc # -> master-osmo-bsc + # -> master-osmo-bsc-nat # -> master-osmo-iuh # -> master-osmo-msc # -> master-osmo-sgsn + # -> master-osmo-hnodeb # -> master-osmo-msc # -> master-osmo-sgsn # -> master-osmo-hlr # -> master-osmo-mgw # -> master-osmo-sgsn # -> master-osmo-bts + # -> master-libosmo-gprs + # -> master-osmo-pcu + # -> master-libosmo-pfcp + # -> master-osmo-upf + # -> master-osmo-hnbgw # -> master-osmo-ggsn # -> master-osmo-sgsn # [...] trigger: > master-libosmo-abis, + master-libosmo-pfcp, + master-osmo-gbproxy, master-osmo-ggsn, master-osmo-gmr, master-osmo-pcap, - master-osmo-pcu, master-osmo-sip-connector, master-osmo-tetra, + master-osmo-trx, master-osmocom-bb, - SIMtrace, - xgoldmon + master-simtrace, + master-xgoldmon - libsmpp34: trigger: master-osmo-msc, master-openbsc @@ -167,16 +233,17 @@ a3_name: IU a3: !!python/tuple [--disable-iu] cmd: | - {docker_run} \ + {docker_run_ccache} \ -e IU="$IU" \ -e SMPP="$SMPP" \ -e MGCP="$MGCP" \ - {docker_img} /build/contrib/jenkins.sh + {docker_img} {timeout_cmd} /build/contrib/jenkins.sh - osmo-bsc + - osmo-bsc-nat - osmo-bts: - slave_axis: !!python/tuple [osmocom-master-debian9, rpi4-deb9build-ansible] + slave_axis: !!python/tuple [osmocom-master, rpi4-raspbian11] a1_name: FIRMWARE_VERSION a1: !!python/tuple [master, femtobts_v2.7, superfemto_v2.4, superfemto_v3.0.1pre, superfemto_v3.1, superfemto_v5.1, v2017.01, origin/nrw/litecell15, origin/nrw/oc2g] a2_name: BTS_MODEL @@ -184,20 +251,72 @@ a3_name: WITH_MANUALS a3: !!python/tuple ["1", "0"] combination_filter: > - (FIRMWARE_VERSION == "master" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (FIRMWARE_VERSION == "master" && BTS_MODEL == "trx" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") || - (FIRMWARE_VERSION == "femtobts_v2.7" && BTS_MODEL == "sysmo" && WITH_MANUALS == "1" && label == "osmocom-master-debian9") || - (FIRMWARE_VERSION == "superfemto_v2.4" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (FIRMWARE_VERSION == "superfemto_v3.0.1pre" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (FIRMWARE_VERSION == "superfemto_v3.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (FIRMWARE_VERSION == "superfemto_v5.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (FIRMWARE_VERSION == "v2017.01" && BTS_MODEL == "lc15" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (FIRMWARE_VERSION == "origin/nrw/litecell15" && BTS_MODEL == "lc15" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (FIRMWARE_VERSION == "origin/nrw/oc2g" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") + (FIRMWARE_VERSION == "master" && WITH_MANUALS == "1" && label == "osmocom-master") || + (FIRMWARE_VERSION == "master" && BTS_MODEL == "trx" && WITH_MANUALS == "0" && label == "rpi4-raspbian11") || + (FIRMWARE_VERSION == "femtobts_v2.7" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master") || + (FIRMWARE_VERSION == "superfemto_v2.4" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master") || + (FIRMWARE_VERSION == "superfemto_v3.0.1pre" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master") || + (FIRMWARE_VERSION == "superfemto_v3.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master") || + (FIRMWARE_VERSION == "superfemto_v5.1" && BTS_MODEL == "sysmo" && WITH_MANUALS == "0" && label == "osmocom-master") || + (FIRMWARE_VERSION == "v2017.01" && BTS_MODEL == "lc15" && WITH_MANUALS == "0" && label == "osmocom-master") || + (FIRMWARE_VERSION == "origin/nrw/litecell15" && BTS_MODEL == "lc15" && WITH_MANUALS == "0" && label == "osmocom-master") || + (FIRMWARE_VERSION == "origin/nrw/oc2g" && BTS_MODEL == "oc2g" && WITH_MANUALS == "0" && label == "osmocom-master") concurrent: false - cmd: 'PUBLISH=1 ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins_bts_model.sh "$BTS_MODEL"' + cmd: | + DOCKER_IMG="{docker_img}" + case "$(arch)" in + arm*) DOCKER_IMG="$DOCKER_IMG-arm" ;; + esac + {docker_run_ccache} \ + -e FIRMWARE_VERSION="$FIRMWARE_VERSION" \ + -e WITH_MANUALS="$WITH_MANUALS" \ + "$DOCKER_IMG" {timeout_cmd} /build/contrib/jenkins_bts_model.sh "$BTS_MODEL" + + - osmo_dia2gsup: + repos_url: '{gerrit_url}/erlang/{repos}' + cmd: '{docker_run} {docker_img_erlang} {timeout_cmd} /build/contrib/jenkins.sh' + + - osmo-epdg: + repos_url: '{gerrit_url}/erlang/{repos}' + cmd: '{docker_run} {docker_img_erlang} {timeout_cmd} /build/contrib/jenkins.sh' + + - osmo-e1-hardware: + a2_name: JOB_TYPE + a2: !!python/tuple ["firmware", "gateware", "manuals", "software"] + cmd: | + DOCKER_IMG="{docker_img}" + case "$JOB_TYPE" in + firmware|gateware) + DOCKER_IMG="registry.osmocom.org/$USER/fpga-build" + docker pull "$DOCKER_IMG" + ;; + esac + {docker_run} \ + -e JOB_TYPE="$JOB_TYPE" \ + "$DOCKER_IMG" \ + {timeout_cmd} /build/contrib/jenkins.sh --publish + ssh: + - binaries_ftp.osmocom.org + - docs_ftp.osmocom.org + - ice40-usbtrace: + repos_url: '{gitea_url}/electronics/{repos}' + docker_img: 'registry.osmocom.org/$USER/fpga-build' + cmd: 'docker pull {docker_img} && {docker_run} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh --publish' + ssh: + - binaries_ftp.osmocom.org + - docs_ftp.osmocom.org + - no2bootloader: + repos_url: 'https://github.com/no2fpga/{repos}' + docker_img: 'registry.osmocom.org/$USER/fpga-build' + cmd: 'docker pull {docker_img} && {docker_run} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh --publish' + email: jenkins-notifications@lists.osmocom.org laforge@gnumonks.org kredon@sysmocom.de 246tnt@gmail.com + ssh: + - binaries_ftp.osmocom.org + - docs_ftp.osmocom.org + + - osmo-fl2k: + repos_url: '{gitea_url}/sdr/{repos}' - - osmo-fl2k - osmo-ggsn: a1_name: GTP a1: !!python/tuple [--enable-gtp-linux,--disable-gtp-linux] @@ -207,31 +326,43 @@ (GTP == "--enable-gtp-linux" && WITH_MANUALS == "0") || (GTP == "--disable-gtp-linux" && WITH_MANUALS == "1") cmd: | - {docker_run} \ + {docker_run_ccache} \ -e GTP="$GTP" \ -e WITH_MANUALS="$WITH_MANUALS" \ - {docker_img} /build/contrib/jenkins.sh + {docker_img} {timeout_cmd} /build/contrib/jenkins.sh trigger: master-osmo-sgsn + - osmo-upf + - osmo-gmr: - email: gerrit-log@lists.osmocom.org 246tnt@gmail.com + repos_url: '{gitea_url}/satellite/{repos}' + email: jenkins-notifications@lists.osmocom.org 246tnt@gmail.com - - osmo-gsm-manuals: - node: 'osmocom-master-debian9' + - osmo-gsm-manuals + + - osmo_gsup: + repos_url: '{gerrit_url}/erlang/{repos}' + cmd: '{docker_run_ccache} {docker_img_erlang} {timeout_cmd} /build/contrib/jenkins.sh' - osmo-gsm-tester: - cmd: '{docker_run} {docker_img} /build/contrib/jenkins-build-manuals.sh' + cmd: '{docker_run} {docker_img} {timeout_cmd} /build/contrib/jenkins-build-manuals.sh' - osmo-hlr - osmo-iuh: # Full triggers would be: - # trigger: master-osmo-msc, master-osmo-sgsn + # trigger: master-osmo-msc, master-osmo-sgsn, master-osmo-hnodeb, master-osmo-hnbgw # Optimized: # (see comment at libosmocore) trigger: > master-osmo-msc, - master-osmo-sgsn + master-osmo-sgsn, + master-osmo-hnodeb, + master-osmo-hnbgw + + - osmo-ir77: + repos_url: '{gitea_url}/satellite/{repos}' + email: jenkins-notifications@lists.osmocom.org 246tnt@gmail.com - osmo-mgw: trigger: master-osmo-msc, master-osmo-bsc @@ -242,18 +373,18 @@ a2_name: WITH_MANUALS a2: !!python/tuple ["1", "0"] combination_filter: > - (IU == "--enable-iu" && WITH_MANUALS == "0") || - (IU == "--disable-iu" && WITH_MANUALS == "1") + (IU == "--enable-iu" && WITH_MANUALS == "1") || + (IU == "--disable-iu" && WITH_MANUALS == "0") cmd: | - {docker_run} \ + {docker_run_ccache} \ -e IU="$IU" \ -e WITH_MANUALS="$WITH_MANUALS" \ - {docker_img} /build/contrib/jenkins.sh + {docker_img} {timeout_cmd} /build/contrib/jenkins.sh - osmo-pcap - osmo-pcu: - slave_axis: !!python/tuple [osmocom-master-debian9, rpi4-deb9build-ansible] + slave_axis: !!python/tuple [osmocom-master, rpi4-raspbian11] a1_name: FIRMWARE_VERSION a1: !!python/tuple [master, v2017.01, origin/nrw/litecell15] a2_name: with_vty @@ -263,19 +394,26 @@ a4_name: WITH_MANUALS a4: !!python/tuple ["1", "0"] combination_filter: > - (with_vty == "True" && with_dsp == "sysmo" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="v2017.01" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="origin/nrw/litecell15" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (with_vty == "False" && with_dsp == "none" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "1" && label == "osmocom-master-debian9") || - (with_vty == "False" && with_dsp == "none" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") + (with_vty == "True" && with_dsp == "sysmo" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0" && label == "osmocom-master") || + (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0" && label == "osmocom-master") || + (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="v2017.01" && WITH_MANUALS == "0" && label == "osmocom-master") || + (with_vty == "True" && with_dsp == "lc15" && FIRMWARE_VERSION=="origin/nrw/litecell15" && WITH_MANUALS == "0" && label == "osmocom-master") || + (with_vty == "False" && with_dsp == "none" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "1" && label == "osmocom-master") || + (with_vty == "False" && with_dsp == "none" && FIRMWARE_VERSION=="master" && WITH_MANUALS == "0" && label == "rpi4-raspbian11") cmd: | - {docker_run} \ + DOCKER_IMG="{docker_img}" + case "$(arch)" in + arm*) DOCKER_IMG="$DOCKER_IMG-arm" ;; + esac + {docker_run_ccache} \ -e FIRMWARE_VERSION="$FIRMWARE_VERSION" \ -e with_vty="$with_vty" \ -e with_dsp="$with_dsp" \ -e WITH_MANUALS="$WITH_MANUALS" \ - {docker_img} /build/contrib/jenkins.sh + "$DOCKER_IMG" {timeout_cmd} /build/contrib/jenkins.sh + + - osmo-python-tests: + repos_url: '{gerrit_url}/python/{repos}' - osmo-sgsn: a1_name: IU @@ -283,45 +421,72 @@ a2_name: WITH_MANUALS a2: !!python/tuple ["1", "0"] combination_filter: > - (IU == "--enable-iu" && WITH_MANUALS == "0") || - (IU == "--disable-iu" && WITH_MANUALS == "1") + (IU == "--enable-iu" && WITH_MANUALS == "1") || + (IU == "--disable-iu" && WITH_MANUALS == "0") cmd: | - {docker_run} \ + {docker_run_ccache} \ -e IU="$IU" \ -e WITH_MANUALS="$WITH_MANUALS" \ - {docker_img} /build/contrib/jenkins.sh + {docker_img} {timeout_cmd} /build/contrib/jenkins.sh - osmo-sip-connector: - email: gerrit-log@lists.osmocom.org laforge@gnumonks.org holger@freyther.de + email: jenkins-notifications@lists.osmocom.org laforge@gnumonks.org holger@freyther.de - osmo-tetra: - email: gerrit-log@lists.osmocom.org laforge@gnumonks.org 246tnt@gmail.com + email: jenkins-notifications@lists.osmocom.org laforge@gnumonks.org 246tnt@gmail.com - osmo-trx: - slave_axis: !!python/tuple [osmocom-master-debian9,rpi4-deb9build-ansible] + slave_axis: !!python/tuple [osmocom-master,rpi4-raspbian11] a1_name: INSTR a1: !!python/tuple [--with-sse, --without-sse, --with-neon, --with-neon-vfpv4] a2_name: WITH_MANUALS a2: !!python/tuple ["1", "0"] combination_filter: > - (INSTR == "--without-sse" && WITH_MANUALS == "1" && label == "osmocom-master-debian9") || - (INSTR == "--with-sse" && WITH_MANUALS == "0" && label == "osmocom-master-debian9") || - (INSTR == "--with-neon" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") || - (INSTR == "--with-neon-vfpv4" && WITH_MANUALS == "0" && label == "rpi4-deb9build-ansible") - cmd: 'PUBLISH=1 ASCIIDOC_WARNINGS_CHECK=1 ./contrib/jenkins.sh' + (INSTR == "--without-sse" && WITH_MANUALS == "1" && label == "osmocom-master") || + (INSTR == "--with-sse" && WITH_MANUALS == "0" && label == "osmocom-master") || + (INSTR == "--with-neon" && WITH_MANUALS == "0" && label == "rpi4-raspbian11") || + (INSTR == "--with-neon-vfpv4" && WITH_MANUALS == "0" && label == "rpi4-raspbian11") + cmd: | + DOCKER_IMG="{docker_img}" + case "$(arch)" in + arm*) DOCKER_IMG="$DOCKER_IMG-arm" ;; + esac + {docker_run_ccache} \ + -e INSTR="$INSTR" \ + -e WITH_MANUALS="$WITH_MANUALS" \ + "$DOCKER_IMG" {timeout_cmd} /build/contrib/jenkins.sh - osmocom-bb - osmo-sysmon - osmo-remsim - osmo-asf4-dfu: - cmd: '{docker_run} {docker_img} /build/contrib/jenkins.sh --publish' - email: gerrit-log@lists.osmocom.org laforge@gnumonks.org ewild@sysmocom.de + cmd: '{docker_run_ccache} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh --publish' + email: jenkins-notifications@lists.osmocom.org laforge@gnumonks.org ewild@sysmocom.de + ssh: + - binaries_ftp.osmocom.org + - docs_ftp.osmocom.org - osmo-ccid-firmware: - cmd: '{docker_run} {docker_img} /build/contrib/jenkins.sh --publish' - email: gerrit-log@lists.osmocom.org laforge@gnumonks.org ewild@sysmocom.de + cmd: '{docker_run_ccache} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh --publish' + email: jenkins-notifications@lists.osmocom.org laforge@gnumonks.org ewild@sysmocom.de + ssh: + - binaries_ftp.osmocom.org + - docs_ftp.osmocom.org + - simtrace: + repos_url: '{gitea_url}/sim-card/{repos}' + email: jenkins-notifications@lists.osmocom.org laforge@gnumonks.org kredon@sysmocom.de - simtrace2: - cmd: '{docker_run} {docker_img} /build/contrib/jenkins.sh --publish' - email: gerrit-log@lists.osmocom.org laforge@gnumonks.org kredon@sysmocom.de + cmd: '{docker_run_ccache} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh --publish' + email: jenkins-notifications@lists.osmocom.org laforge@gnumonks.org kredon@sysmocom.de + ssh: + - binaries_ftp.osmocom.org + - docs_ftp.osmocom.org + - osmo-opencm3-projects: + repos_url: '{gitea_url}/electronics/{repos}' + cmd: '{docker_run} {docker_img} {timeout_cmd} /build/contrib/jenkins.sh --publish' + email: jenkins-notifications@lists.osmocom.org laforge@gnumonks.org kredon@sysmocom.de + ssh: + - binaries_ftp.osmocom.org + - docs_ftp.osmocom.org - osmo-e1d - osmo-cbc @@ -330,15 +495,66 @@ - osmo-uecups - osmo-el2tpd - osmo-smlc + - osmo-gbproxy + - osmo-hnodeb + + - osmo-hnbgw: + a1_name: PFCP + a1: !!python/tuple ["1", "0"] + a2_name: WITH_MANUALS + a2: !!python/tuple ["1", "0"] + a3_name: NFTABLES + a3: !!python/tuple ["1", "0"] + combination_filter: > + (PFCP == "1" && WITH_MANUALS == "1" && NFTABLES == "1") || + (PFCP == "0" && WITH_MANUALS == "0" && NFTABLES == "0") + cmd: | + {docker_run_ccache} \ + -e PFCP="$PFCP" \ + -e WITH_MANUALS="$WITH_MANUALS" \ + -e NFTABLES="$NFTABLES" \ + {docker_img} {timeout_cmd} /build/contrib/jenkins.sh - rtl-sdr: + repos_url: '{gitea_url}/sdr/{repos}' email: laforge@gnumonks.org steve@steve-m.de + - pysim: + concurrent: false + slave_axis: !!python/tuple [simtester,osmocom-master] + a2_name: JOB_TYPE + a2: !!python/tuple ["test", "pylint", "docs"] + combination_filter: > + (JOB_TYPE == "test" && label == "simtester") || + (JOB_TYPE == "pylint" && label == "osmocom-master") || + (JOB_TYPE == "docs" && label == "osmocom-master") + cmd: | + case "$JOB_TYPE" in + "test") + {timeout_cmd} ./contrib/jenkins.sh + ;; + *) + {docker_run} \ + -e JOB_TYPE="$JOB_TYPE" \ + {docker_img} \ + {timeout_cmd} /build/contrib/jenkins.sh + ;; + esac + - sysmo-usim-tool: concurrent: false - cmd: cd ./tests; ./run-tests + cmd: cd ./tests; {timeout_cmd} ./run-tests slave_axis: !!python/tuple [simtester] - git_base_url: git.sysmocom.de + repos_url: 'https://gitea.sysmocom.de/sysmocom/{repos}' + + - dahdi-tools + + - xgoldmon: + repos_url: 'https://github.com/2b-as/{repos}' + cmd: | + rm -rf osmo-ci + git clone --depth=1 https://gerrit.osmocom.org/osmo-ci -b master + {docker_run_ccache} {docker_img} {timeout_cmd} /build/osmo-ci/scripts/xgoldmon-jenkins.sh jobs: - 'master-{repos}' @@ -353,11 +569,9 @@ - build-discarder: days-to-keep: 30 num-to-keep: 120 - artifact-days-to-keep: -1 - artifact-num-to-keep: -1 description: | Automatic jenkins test job of - <a href="http://{git_base_url}/{repos}">{repos}</a> + <a href="{repos_url}">{repos}</a> <br/><br/> <b>Auto-generated using Jenkins Job Builder. DO NOT EDIT MANUALLY!</b> @@ -365,7 +579,6 @@ sequential: '{obj:sequential}' combination-filter: | {obj:combination_filter} - node: '{obj:node}' axes: - axis: type: slave @@ -390,13 +603,14 @@ scm: - git: - url: git://{git_base_url}/{repos} - branches: - - 'origin/master' + url: '{obj:repos_url}' + branches: '{obj:branches}' refspec: name: wipe-workspace: false skip-tag: true + submodule: + recursive: true triggers: - pollscm: @@ -408,15 +622,22 @@ - shell: '{obj:cmd}' publishers: + - archive: + allow-empty: true + artifacts: '**/core, **/testsuite.log, **/workspace.tar.xz' - warnings: console-log-parsers: - 'GNU C Compiler 4 (gcc)' resolve-relative-paths: true - trigger: project: '{obj:trigger}' + - trigger: + project: 'Osmocom_OBS_master' - email: recipients: '{obj:email}' send-to-individuals: true - wrappers: '{obj:wrappers}' + wrappers: + - ssh-agent-credentials: + users: '{obj:ssh}' # vim: expandtab tabstop=2 shiftwidth=2 diff --git a/jobs/octsim_osmo-ccid-firmware.yml b/jobs/octsim_osmo-ccid-firmware.yml new file mode 100644 index 0000000..7db1039 --- /dev/null +++ b/jobs/octsim_osmo-ccid-firmware.yml @@ -0,0 +1,53 @@ +- job: + axes: + - axis: + name: label + type: slave + values: + - octsimtest + block-downstream: false + block-upstream: false + builders: + - shell: | + cd ./tests + mkdir -p sysmo-octsim/dl + ./run-tests + concurrent: false + description: octsim osmo-ccid-firmware CI - flash every build to octsim and see + if it still works + disabled: false + execution-strategy: + sequential: false + name: octsim_osmo-ccid-firmware + project-type: matrix + scm: + - git: + url: https://gerrit.osmocom.org/osmo-ccid-firmware + git-config-name: 'Jenkins Builder' + git-config-email: 'jenkins@osmocom.org' + skip-tag: true + branches: + - 'origin/master' + properties: + - build-blocker: + block-level: GLOBAL + blocking-jobs: [] + queue-scanning: DISABLED + use-build-blocker: false + - build-discarder: + days-to-keep: 30 + num-to-keep: 120 + - rebuild: + auto-rebuild: false + rebuild-disabled: false + publishers: + - email: + notify-every-unstable-build: true + recipients: jsteiger@sysmocom.de + send-to-individuals: true + retry-count: '3' + triggers: + - reverse: + jobs: master-osmo-ccid-firmware, + - timed: H 22 * * * + wrappers: [] diff --git a/jobs/osmo-gsm-manuals-trigger.yml b/jobs/osmo-gsm-manuals-trigger.yml new file mode 100644 index 0000000..29882e3 --- /dev/null +++ b/jobs/osmo-gsm-manuals-trigger.yml @@ -0,0 +1,40 @@ +# Roll out osmo-gsm-manuals to relevant build environments: +# * jenkins build slaves (update-osmo-ci-on-slaves) +# * docker images built on build slaves (update-osmo-ci-on-slaves) +# * docker image built in registry: fpga-build (registry-rebuild-upload-fpga-build) + +- project: + name: osmo-gsm-manuals-trigger + jobs: + - 'osmo-gsm-manuals-trigger' + +# Trigger from osmo-gsm-manuals.git too +- job: + name: osmo-gsm-manuals-trigger + description: | + Roll out osmo-gsm-manuals to relevant build environments.<br> + <br> + Related: <a href="https://osmocom.org/issues/4912">OS#4912</a> + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + scm: + - git: + url: https://gerrit.osmocom.org/osmo-gsm-manuals + git-config-name: 'Jenkins Builder' + git-config-email: 'jenkins@osmocom.org' + skip-tag: true + branches: + - 'origin/master' + triggers: + - pollscm: + cron: "H/5 * * * *" + ignore-post-commit-hooks: false + publishers: + - trigger: + project: > + update-osmo-ci-on-slaves, + registry-rebuild-upload-fpga-build + +# vim: expandtab tabstop=2 shiftwidth=2 diff --git a/jobs/osmo-gsm-tester-builder.yml b/jobs/osmo-gsm-tester-builder.yml index a519f93..cd50cb8 100644 --- a/jobs/osmo-gsm-tester-builder.yml +++ b/jobs/osmo-gsm-tester-builder.yml @@ -11,7 +11,7 @@ - osmo-ggsn - osmo-hlr - osmo-mgw - - osmo-iuh + - osmo-hnbgw - osmo-msc - osmo-pcu - osmo-sgsn @@ -29,6 +29,7 @@ triggered-by: master-osmo-bts - osmo-pcu-oc2g: triggered-by: master-osmo-pcu + - open5gs - srslte triggered-by: 'master-{repo}' @@ -91,6 +92,8 @@ - add_param_build_branch: name: OSMO_GSM_TESTER_BUILD_osmo_iuh - add_param_build_branch: + name: OSMO_GSM_TESTER_BUILD_osmo_hnbgw + - add_param_build_branch: name: OSMO_GSM_TESTER_BUILD_osmo_msc - add_param_build_branch: name: OSMO_GSM_TESTER_BUILD_osmo_hlr @@ -101,6 +104,8 @@ - add_param_build_branch: name: OSMO_GSM_TESTER_BUILD_osmocom_bb - add_param_build_branch: + name: OSMO_GSM_TESTER_BUILD_open5gs + - add_param_build_branch: name: OSMO_GSM_TESTER_BUILD_srslte scm: - osmo-gsm-tester-repo @@ -111,7 +116,7 @@ name: osmo-gsm-tester-repo scm: - git: - url: git://git.osmocom.org/osmo-gsm-tester + url: https://gerrit.osmocom.org/osmo-gsm-tester branches: - ${OSMO_GSM_TESTER_BRANCH} wipe-workspace: false diff --git a/jobs/osmo-gsm-tester-runner.yml b/jobs/osmo-gsm-tester-runner.yml index 4cdd383..4909fe7 100644 --- a/jobs/osmo-gsm-tester-runner.yml +++ b/jobs/osmo-gsm-tester-runner.yml @@ -32,7 +32,7 @@ name: osmo-gsm-tester-repo scm: - git: - url: git://git.osmocom.org/osmo-gsm-tester + url: https://gerrit.osmocom.org/osmo-gsm-tester branches: - ${OSMO_GSM_TESTER_BRANCH} wipe-workspace: false @@ -63,7 +63,7 @@ - copy_artifact: repo: osmo-gsm-tester_build-osmo-mgw - copy_artifact: - repo: osmo-gsm-tester_build-osmo-iuh + repo: osmo-gsm-tester_build-osmo-hnbgw - copy_artifact: repo: osmo-gsm-tester_build-osmo-msc - copy_artifact: @@ -87,6 +87,8 @@ - copy_artifact: repo: osmo-gsm-tester_build-osmo-pcu-oc2g - copy_artifact: + repo: osmo-gsm-tester_build-open5gs + - copy_artifact: repo: osmo-gsm-tester_build-srslte - defaults: @@ -109,6 +111,7 @@ - job-template: name: 'osmo-gsm-tester_run-{stage}' + disabled: true defaults: runner node: 'osmo-gsm-tester-{stage}' triggers: @@ -130,6 +133,7 @@ - osmo-gsm-tester_build-osmo-pcu-sysmo - osmo-gsm-tester_build-osmo-bts-oc2g - osmo-gsm-tester_build-osmo-pcu-oc2g + - osmo-gsm-tester_build-open5gs - osmo-gsm-tester_build-srslte builders: - copy_artifact_all @@ -168,8 +172,8 @@ branch-pattern: '**' builders: - shell: | - # make sure no bin artifacts from a previous run remain - rm -f *.tgz *.md5 + # make sure no test results/bin artifacts from a previous run remain + rm -rf trial-* *.tgz *.md5 - copy_artifact_all - shell: !include-raw: osmo-gsm-tester_run-gerrit.sh publishers: @@ -183,6 +187,7 @@ # ttcn3 job - job: name: 'osmo-gsm-tester_ttcn3' + disabled: true defaults: runner scm: - 'osmo-gsm-tester-repo' @@ -190,8 +195,8 @@ - timed: "H 23 * * *" builders: - shell: | - # make sure no bin artifacts from a previous run remain - rm -f *.tgz *.md5 + # make sure no test results/bin artifacts from a previous run remain + rm -rf trial-* *.tgz *.md5 - copy_artifact_all - copy_artifact: repo: osmo-gsm-tester_build-osmocom-bb @@ -208,7 +213,7 @@ - job: name: 'osmo-gsm-tester_virtual' defaults: runner - node: 'osmocom-master-debian9' + node: 'osmocom-master' scm: - 'osmo-gsm-tester-repo' triggers: @@ -216,11 +221,46 @@ builders: - shell: | # make sure no bin artifacts from a previous run remain - rm -f *.tgz *.md5 + rm -rf *.tgz *.md5 - copy_artifact_all - copy_artifact: repo: osmo-gsm-tester_build-osmocom-bb - - shell: > + - shell: | + # Set a trap to fix workspace permissions / kill the docker container on exit + clean_up() { + docker kill "osmo-gsm-tester-virtual" || true + docker run --rm \ + -v "$WORKSPACE":/workspace \ + debian:bullseye \ + chmod -R a+rwX /workspace/ + } + clean_up_trap() { + set +x + echo + echo "### Clean up ###" + echo + set -x + + trap - EXIT INT TERM 0 + clean_up + } + trap clean_up_trap EXIT INT TERM 0 + + # Make sure no test results from a previous run remain + clean_up + rm -rf trial-* + + # Build the docker image + rm -rf docker-playground + git clone \ + --depth=1 \ + --branch="$DOCKER_PLAYGROUND_BRANCH" \ + https://gerrit.osmocom.org/docker-playground \ + docker-playground + git -C docker-playground log --oneline + make -C docker-playground/debian-buster-jenkins # OS#6126 + make -C docker-playground/osmo-gsm-tester + unlink osmo-gsm-tester/sysmocom/resources.conf || true ln -s resources.conf.virtual osmo-gsm-tester/sysmocom/resources.conf @@ -237,8 +277,8 @@ -e BUILD_NUMBER="$BUILD_NUMBER" \ -w /build -i \ -v "$PWD:/build" \ - -v "$HOME/bin:/build_bin" \ -v "$HOME/.ssh:/home/build/.ssh:ro" \ + --name=osmo-gsm-tester-virtual \ --cap-add=sys_nice \ $USER/osmo-gsm-tester \ /bin/bash -c 'LANG="en_US.utf8" LC_ALL="en_US.UTF-8" LC_LANG="en_US.UTF-8" PATH="$PWD/osmo-gsm-tester/src:${PATH}" ./osmo-gsm-tester/contrib/jenkins-run.sh' @@ -249,12 +289,19 @@ - junit: results: 'trial-*/last_run/trial-*.xml' allow-empty-results: true + - email: + notify-every-unstable-build: true + recipients: jenkins-notifications@lists.osmocom.org parameters: - string: name: "OSMO_GSM_TESTER_OPTS" - default: "-s nitb_netreg_mass" - description: "pass additional command line options to osmo-gsm-tester.py, e.g. to select specific suites:scenarios. Default: leave empty." + default: "-s netreg_mass" + description: "pass additional command line options to osmo-gsm-tester.py, e.g. to select specific suites:scenarios" - string: name: "OSMO_GSM_TESTER_BRANCH" - default: "origin/master" + default: "master" description: "Which branch/sha should be used for testing" + - string: + name: "DOCKER_PLAYGROUND_BRANCH" + default: "master" + description: "Which branch/sha should be used for building the osmo-gsm-tester docker container" diff --git a/jobs/osmo-gsm-tester-trigger.yml b/jobs/osmo-gsm-tester-trigger.yml index e37c1f1..216dabc 100644 --- a/jobs/osmo-gsm-tester-trigger.yml +++ b/jobs/osmo-gsm-tester-trigger.yml @@ -8,6 +8,10 @@ - job: name: 'osmo-gsm-tester_build-trigger-all' description: 'Manually kick off all osmo-gsm-tester_build-osmo-* builds at once.' + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 project-type: freestyle node: osmo-gsm-tester-build publishers: @@ -28,5 +32,6 @@ osmo-gsm-tester_build-osmo-bts-sysmo, osmo-gsm-tester_build-osmo-pcu-sysmo, osmo-gsm-tester_build-osmo-bts-oc2g, - osmo-gsm-tester_build-osmo-pcu-oc2g + osmo-gsm-tester_build-osmo-pcu-oc2g, + osmo-gsm-tester_build-open5gs, osmo-gsm-tester_build-srslte diff --git a/jobs/osmocom-api.yml b/jobs/osmocom-api.yml new file mode 100644 index 0000000..312496b --- /dev/null +++ b/jobs/osmocom-api.yml @@ -0,0 +1,46 @@ +- job: + concurrent: false + description: This job builds the doxygen API documentation for latest libosmo* + and uploads it to <a href="https://downloads.osmocom.org/api/latest/" + >https://downloads.osmocom.org/api/latest/</a> + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + name: Osmocom_API + node: osmocom-master + project-type: freestyle + publishers: + - email: + notify-every-unstable-build: true + recipients: jenkins-notifications@lists.osmocom.org + triggers: + - timed: "H 00 * * *" + wrappers: + - ssh-agent-credentials: + users: + - api_ftp.osmocom.org + parameters: + - string: + name: BRANCH + description: osmo-ci.git branch + default: 'master' + scm: + - git: + branches: + - '$BRANCH' + url: https://gerrit.osmocom.org/osmo-ci + git-config-name: 'Jenkins Builder' + git-config-email: 'jenkins@osmocom.org' + wipe-workspace: true + builders: + - shell: | + docker run \ + --rm=true \ + -e SSH_AUTH_SOCK=/ssh-agent \ + -u build \ + -v "$PWD:/build" \ + -v $(readlink -f $SSH_AUTH_SOCK):/ssh-agent \ + -w /build \ + "$USER/debian-bookworm-build" \ + scripts/osmocom-api-doxygen.sh diff --git a/jobs/osmocom-build-tags-against-master.yml b/jobs/osmocom-build-tags-against-master.yml index 1520ec2..e33c9a3 100644 --- a/jobs/osmocom-build-tags-against-master.yml +++ b/jobs/osmocom-build-tags-against-master.yml @@ -11,7 +11,11 @@ description: | Build old releases of programs/libraries against "master of the day" libosmo* (<a href="https://osmocom.org/issues/3765">OS#3765</a>) - node: osmocom-master-debian9 + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + node: osmocom-master parameters: - string: name: BRANCH @@ -20,16 +24,23 @@ default: '*/master' builders: - shell: | - PARALLEL_MAKE=-j8 scripts/osmocom-build-old-tags-against-master.sh + docker run \ + --rm=true \ + -e PARALLEL_MAKE="-j8" \ + -u build \ + -v "$PWD:/build" \ + -w /build \ + "$USER/debian-bookworm-build" \ + scripts/osmocom-build-old-tags-against-master.sh scm: - git: branches: - '$BRANCH' - url: git://git.osmocom.org/osmo-ci + url: https://gerrit.osmocom.org/osmo-ci git-config-name: 'Jenkins Builder' git-config-email: 'jenkins@osmocom.org' triggers: - - timed: "@midnight" + - timed: "H 01 * * *" publishers: - archive: allow-empty: false diff --git a/jobs/osmocom-depcheck.yml b/jobs/osmocom-depcheck.yml index 1e5533d..5e20f95 100644 --- a/jobs/osmocom-depcheck.yml +++ b/jobs/osmocom-depcheck.yml @@ -12,7 +12,11 @@ Verifies that Osmocom programs really build with the dependency versions they claim to support in configure.ac. (Generated by job-builder) - node: osmocom-master-debian9 + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + node: osmocom-master parameters: - string: name: PROJECTS @@ -26,7 +30,7 @@ name: GIT_URL_PREFIX description: | Where to clone the sources from - default: 'git://git.osmocom.org/' + default: 'https://gerrit.osmocom.org/' - bool: name: BUILD description: | @@ -65,7 +69,7 @@ - git: branches: - '$BRANCH' - url: git://git.osmocom.org/osmo-ci + url: https://gerrit.osmocom.org/osmo-ci git-config-name: 'Jenkins Builder' git-config-email: 'jenkins@osmocom.org' diff --git a/jobs/osmocom-list-commits.yml b/jobs/osmocom-list-commits.yml index f2651f4..d367499 100644 --- a/jobs/osmocom-list-commits.yml +++ b/jobs/osmocom-list-commits.yml @@ -11,7 +11,11 @@ description: | Generate and upload a list of Osmocom git repositories and their latest tag and commits. <b>The latest list is <a href="https://jenkins.osmocom.org/jenkins/job/Osmocom-list-commits/lastSuccessfulBuild/artifact/commits.txt/*view*/">here</a>.</b> - node: osmocom-master-debian9 + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + node: osmocom-master parameters: - string: name: BRANCH @@ -26,11 +30,11 @@ - git: branches: - '$BRANCH' - url: git://git.osmocom.org/osmo-ci + url: https://gerrit.osmocom.org/osmo-ci git-config-name: 'Jenkins Builder' git-config-email: 'jenkins@osmocom.org' triggers: - - timed: "@midnight" + - timed: "H 01 * * *" publishers: - archive: allow-empty: false diff --git a/jobs/osmocom-obs-check-builders.yml b/jobs/osmocom-obs-check-builders.yml new file mode 100644 index 0000000..01fdba5 --- /dev/null +++ b/jobs/osmocom-obs-check-builders.yml @@ -0,0 +1,32 @@ +--- +- project: + name: Osmocom_OBS_check_builders + jobs: + - Osmocom_OBS_check_builders + +- job-template: + name: 'Osmocom_OBS_check_builders' + project-type: freestyle + defaults: global + description: | + Verify that the expected amount of builders are connected to + obs.osmocom.org. + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + builders: + - shell: | + scripts/obs/check_builders.sh + scm: + - git: + branches: + - 'origin/master' + url: https://gerrit.osmocom.org/osmo-ci + triggers: + - timed: "@hourly" + node: obs + publishers: + - email: + notify-every-unstable-build: true + recipients: 'jenkins-notifications@lists.osmocom.org' diff --git a/jobs/osmocom-obs-check-new-distros.yml b/jobs/osmocom-obs-check-new-distros.yml new file mode 100644 index 0000000..760479a --- /dev/null +++ b/jobs/osmocom-obs-check-new-distros.yml @@ -0,0 +1,39 @@ +--- +- job: + name: 'Osmocom_OBS_check_new_distros' + project-type: freestyle + concurrent: false + defaults: global + description: | + Check whether new distributions (Debian, Raspyberry Pi OS, Ubuntu) are + available in openSUSE's OBS that we need to add to the Osmocom OBS. + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + node: obs + parameters: + - string: + name: CI_BRANCH + description: osmo-ci.git branch + default: 'master' + scm: + - git: + branches: + - '$CI_BRANCH' + url: https://gerrit.osmocom.org/osmo-ci + git-config-name: 'Jenkins Builder' + git-config-email: 'jenkins@osmocom.org' + builders: + - shell: | + export PYTHONUNBUFFERED=1 + ./scripts/obs/check_new_distros.py --docker + triggers: + - timed: "H 19 * * *" + wrappers: + - ansicolor: + colormap: xterm + publishers: + - email: + notify-every-unstable-build: true + recipients: 'jenkins-notifications@lists.osmocom.org' diff --git a/jobs/osmocom-obs-ewild.yml b/jobs/osmocom-obs-ewild.yml new file mode 100644 index 0000000..111ec09 --- /dev/null +++ b/jobs/osmocom-obs-ewild.yml @@ -0,0 +1,72 @@ +--- +- project: + name: Osmocom_OBS_ewild + jobs: + - Osmocom_OBS_ewild_{branch_suffix} + branch_suffix: + - mssdr + +- job-template: + name: 'Osmocom_OBS_ewild_{branch_suffix}' + project-type: freestyle + concurrent: false + defaults: global + description: | + Iterate over Osmocom projects, and update projects from the + "Hoernchen/{branch_suffix}" branch in OBS. If a package exists in OBS + for a project, but it doesn't have the git branch anymore then delete the + package from OBS. + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + node: obs + parameters: + - string: + name: CI_BRANCH + description: osmo-ci.git branch + default: 'master' + builders: + - shell: | + export PYTHONUNBUFFERED=1 + BRANCH="Hoernchen/{branch_suffix}" + PROJ="home:ewild:{branch_suffix}" + VERSION_APPEND="~ewild.{branch_suffix}" + PACKAGE="$GERRIT_PROJECT" + + # When manually triggered, run on all Osmocom packages + if [ -z "$PACKAGE" ]; then + PACKAGE="ALL_OSMOCOM_PACKAGES" + fi + + ./scripts/obs/update_obs_project.py \ + --apiurl https://obs.osmocom.org \ + --conflict-pkgname "osmocom-nightly" \ + --delete \ + --docker \ + --feed "master" \ + --git-branch "$BRANCH" \ + --version-append "$VERSION_APPEND" \ + "$PROJ" \ + "$PACKAGE" + scm: + - git: + branches: + - '$CI_BRANCH' + url: https://gerrit.osmocom.org/osmo-ci + git-config-name: 'Jenkins Builder' + git-config-email: 'jenkins@osmocom.org' + triggers: + - gerrit: + trigger-on: + - ref-updated-event + projects: + - project-compare-type: 'ANT' + project-pattern: '**' + branches: + - branch-pattern: 'Hoernchen/{branch_suffix}' + server-name: gerrit.osmocom.org + publishers: + - email: + notify-every-unstable-build: true + recipients: 'ewild@sysmocom.de' diff --git a/jobs/osmocom-obs-nhofmeyr.yml b/jobs/osmocom-obs-nhofmeyr.yml new file mode 100644 index 0000000..427dcd2 --- /dev/null +++ b/jobs/osmocom-obs-nhofmeyr.yml @@ -0,0 +1,73 @@ +--- +- project: + name: Osmocom_OBS_nhofmeyr + jobs: + - Osmocom_OBS_nhofmeyr_{branch_suffix} + branch_suffix: + - dev + +- job-template: + name: 'Osmocom_OBS_nhofmeyr_{branch_suffix}' + project-type: freestyle + concurrent: false + defaults: global + description: | + Iterate over Osmocom projects, and update projects from the + "neels/{branch_suffix}" branch in OBS. If a package exists in OBS + for a project, but it doesn't have the git branch anymore then delete the + package from OBS. (created from osmo-ci.git/jobs/osmocom-obs-nhofmeyr.yml + which was originally a copy of osmocom-obs-rhizomatica.yml) + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + node: obs + parameters: + - string: + name: CI_BRANCH + description: osmo-ci.git branch + default: 'master' + builders: + - shell: | + export PYTHONUNBUFFERED=1 + BRANCH="neels/{branch_suffix}" + PROJ="home:nhofmeyr:{branch_suffix}" + VERSION_APPEND="~nhofmeyr.{branch_suffix}" + PACKAGE="$GERRIT_PROJECT" + + # When manually triggered, run on all Osmocom packages + if [ -z "$PACKAGE" ]; then + PACKAGE="ALL_OSMOCOM_PACKAGES" + fi + + ./scripts/obs/update_obs_project.py \ + --apiurl https://obs.osmocom.org \ + --conflict-pkgname "osmocom-latest" \ + --delete \ + --docker \ + --feed "master" \ + --git-branch "$BRANCH" \ + --version-append "$VERSION_APPEND" \ + "$PROJ" \ + "$PACKAGE" + scm: + - git: + branches: + - '$CI_BRANCH' + url: https://gerrit.osmocom.org/osmo-ci + git-config-name: 'Jenkins Builder' + git-config-email: 'jenkins@osmocom.org' + triggers: + - gerrit: + trigger-on: + - ref-updated-event + projects: + - project-compare-type: 'ANT' + project-pattern: '**' + branches: + - branch-pattern: 'neels/{branch_suffix}' + server-name: gerrit.osmocom.org + publishers: + - email: + notify-every-unstable-build: true + recipients: 'nhofmeyr@sysmocom.de' diff --git a/jobs/osmocom-obs-rhizomatica.yml b/jobs/osmocom-obs-rhizomatica.yml new file mode 100644 index 0000000..92ab465 --- /dev/null +++ b/jobs/osmocom-obs-rhizomatica.yml @@ -0,0 +1,73 @@ +--- +- project: + name: Osmocom_OBS_rhizomatica + jobs: + - Osmocom_OBS_rhizomatica_{branch_suffix} + branch_suffix: + - testing + - production + +- job-template: + name: 'Osmocom_OBS_rhizomatica_{branch_suffix}' + project-type: freestyle + concurrent: false + defaults: global + description: | + Iterate over Osmocom projects, and update projects from the + "rhizomatica/{branch_suffix}" branch in OBS. If a package exists in OBS + for a project, but it doesn't have the git branch anymore then delete the + package from OBS (<a href="https://osmocom.org/issues/5981">OS#5981</a>). + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + node: obs + parameters: + - string: + name: CI_BRANCH + description: osmo-ci.git branch + default: 'master' + builders: + - shell: | + export PYTHONUNBUFFERED=1 + BRANCH="rhizomatica/{branch_suffix}" + PROJ="rhizomatica:{branch_suffix}" + VERSION_APPEND="~rhizomatica.{branch_suffix}" + PACKAGE="$GERRIT_PROJECT" + + # When manually triggered, run on all Osmocom packages + if [ -z "$PACKAGE" ]; then + PACKAGE="ALL_OSMOCOM_PACKAGES" + fi + + ./scripts/obs/update_obs_project.py \ + --apiurl https://obs.osmocom.org \ + --conflict-pkgname "osmocom-latest" \ + --delete \ + --docker \ + --feed "master" \ + --git-branch "$BRANCH" \ + --version-append "$VERSION_APPEND" \ + "$PROJ" \ + "$PACKAGE" + scm: + - git: + branches: + - '$CI_BRANCH' + url: https://gerrit.osmocom.org/osmo-ci + git-config-name: 'Jenkins Builder' + git-config-email: 'jenkins@osmocom.org' + triggers: + - gerrit: + trigger-on: + - ref-updated-event + projects: + - project-compare-type: 'ANT' + project-pattern: '**' + branches: + - branch-pattern: 'rhizomatica/{branch_suffix}' + server-name: gerrit.osmocom.org + publishers: + - email: + notify-every-unstable-build: true + recipients: 'jenkins-notifications@lists.osmocom.org' diff --git a/jobs/osmocom-obs-sync.yml b/jobs/osmocom-obs-sync.yml new file mode 100644 index 0000000..a57f968 --- /dev/null +++ b/jobs/osmocom-obs-sync.yml @@ -0,0 +1,54 @@ +--- +- job: + name: 'Osmocom_OBS_sync' + project-type: freestyle + concurrent: false + defaults: global + description: | + Sync base distributions (Debian:12 etc.) from openSUSE's OBS to our OBS + (<a href="https://osmocom.org/issues/6165">OS#6165</a>). + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + node: obs + parameters: + - string: + name: CI_BRANCH + description: osmo-ci.git branch + default: 'master' + scm: + - git: + branches: + - '$CI_BRANCH' + url: https://gerrit.osmocom.org/osmo-ci + git-config-name: 'Jenkins Builder' + git-config-email: 'jenkins@osmocom.org' + builders: + - shell: | + export PYTHONUNBUFFERED=1 + export DISTROS=" + AlmaLinux:8 + Debian:10 + Debian:11 + Debian:12 + Debian:Next + Raspbian:10 + Raspbian:11 + Raspbian:12 + Ubuntu:22.04 + Ubuntu:23.10 + Ubuntu:24.04 + " + ./scripts/obs/sync_obs_projects.py \ + --docker \ + $DISTROS + triggers: + - timed: "H 18 * * *" + wrappers: + - ansicolor: + colormap: xterm + publishers: + - email: + notify-every-unstable-build: true + recipients: 'jenkins-notifications@lists.osmocom.org' diff --git a/jobs/osmocom-obs-wireshark.yml b/jobs/osmocom-obs-wireshark.yml new file mode 100644 index 0000000..213a1f3 --- /dev/null +++ b/jobs/osmocom-obs-wireshark.yml @@ -0,0 +1,42 @@ +--- +- project: + name: Osmocom_OBS + jobs: + - Osmocom_OBS_wireshark + +- job: + name: 'Osmocom_OBS_wireshark' + project-type: freestyle + defaults: global + description: | + See <a href="https://osmocom.org/issues/2537">OS#2537</a> + for more information. + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + node: obs + parameters: + - string: + name: BRANCH + description: osmo-ci.git branch + default: 'master' + builders: + - shell: | + export PYTHONUNBUFFERED=1 + ./scripts/obs/update_obs_wireshark.sh osmocom:wireshark + scm: + - git: + branches: + - '$BRANCH' + url: https://gerrit.osmocom.org/osmo-ci + git-config-name: 'Jenkins Builder' + git-config-email: 'jenkins@osmocom.org' + wipe-workspace: true + triggers: + - timed: "H 19 * * *" + + publishers: + - email: + notify-every-unstable-build: true + recipients: 'jenkins-notifications@lists.osmocom.org' diff --git a/jobs/osmocom-obs.yml b/jobs/osmocom-obs.yml index becb846..eb77f4d 100644 --- a/jobs/osmocom-obs.yml +++ b/jobs/osmocom-obs.yml @@ -4,21 +4,27 @@ jobs: - Osmocom_OBS_{type} type: - - nightly - - latest - - next + - master: + conflict_version: "" + - nightly: + # For nightly we don't provide ABI compatibility, make sure packages + # from different build dates are not mixed by accident + conflict_version: "$(date +%Y%m%d%H%M)" + - latest: + conflict_version: "" - job-template: name: 'Osmocom_OBS_{type}' project-type: freestyle + concurrent: false defaults: global description: | - <ul> - <li><a href="https://build.opensuse.org/project/show/network:osmocom:{type}">osmocom:{type} home page</a> - <li><a href="https://build.opensuse.org/project/monitor/network:osmocom:{type}">osmocom:{type} build monitor</a> - <li><a href="https://osmocom.org/projects/cellular-infrastructure/wiki/Binary_Packages">Wiki: binary packages</a> - </ul> - (Generated by job-builder) + See <a href="https://osmocom.org/projects/cellular-infrastructure/wiki/Binary_Packages">Wiki: binary packages</a> + for more information. + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 node: obs parameters: - string: @@ -26,17 +32,25 @@ description: osmo-ci.git branch default: 'refs/remotes/origin/master' builders: - - shell: - ./scripts/osmocom-{type}-packages.sh + - shell: | + export PYTHONUNBUFFERED=1 + + ./scripts/obs/update_obs_project.py \ + --apiurl https://obs.osmocom.org \ + --conflict-version {conflict_version} \ + --docker \ + --feed {type} \ + --meta \ + osmocom:{type} scm: - git: branches: - '$BRANCH' - url: git://git.osmocom.org/osmo-ci + url: https://gerrit.osmocom.org/osmo-ci git-config-name: 'Jenkins Builder' git-config-email: 'jenkins@osmocom.org' triggers: - - timed: "H 01 * * *" # run before osmocom-debian-install.yml + - timed: "H 20 * * *" publishers: - email: diff --git a/jobs/osmocom-release-manuals.yml b/jobs/osmocom-release-manuals.yml new file mode 100644 index 0000000..c9d04ae --- /dev/null +++ b/jobs/osmocom-release-manuals.yml @@ -0,0 +1,45 @@ +--- +- project: + name: Osmocom-release-manuals + jobs: + - Osmocom-release-manuals + +- job: + name: 'Osmocom-release-manuals' + node: osmocom-master + project-type: freestyle + defaults: global + description: | + Build manuals for all new Osmocom releases + (<a href="https://osmocom.org/issues/5902">OS#5902</a>). + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + parameters: + - string: + name: BRANCH_CI + description: | + osmo-ci.git branch + default: 'master' + builders: + - shell: | + scripts/manuals/publish-manuals-for-tags.sh + scm: + - git: + branches: + - '$BRANCH_CI' + url: https://gerrit.osmocom.org/osmo-ci + git-config-name: 'Jenkins Builder' + git-config-email: 'jenkins@osmocom.org' + wipe-workspace: true + triggers: + - timed: "H 04 * * *" + publishers: + - email: + notify-every-unstable-build: true + recipients: 'jenkins-notifications@lists.osmocom.org' + wrappers: + - ssh-agent-credentials: + users: + - docs_ftp.osmocom.org diff --git a/jobs/osmocom-release-tarballs.yml b/jobs/osmocom-release-tarballs.yml index fd078be..4b3c8dc 100644 --- a/jobs/osmocom-release-tarballs.yml +++ b/jobs/osmocom-release-tarballs.yml @@ -6,52 +6,36 @@ - job-template: name: 'Osmocom-release-tarballs' + node: osmocom-master project-type: freestyle defaults: global description: | For each relevant Osmocom repository and its tags, build release tarballs (<a href="https://osmocom.org/issues/3870">OS#3870</a>). <br><br> Publishes to: <a href="https://ftp.osmocom.org/releases/">https://ftp.osmocom.org/releases</a> + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 parameters: - string: name: BRANCH_OSMO_CI description: | - osmo-ci.git branch where the osmocom-release-tarballs.sh gets pulled from - default: 'master' - - string: - name: BRANCH_DOCKER_PLAYGROUND - description: | - docker-playground.git branch where the Dockerfile gets pulled from + osmo-ci.git branch with scripts/tarballs/publish-tarballs-for-tags.sh default: 'master' builders: - shell: | - export OSMO_BRANCH_DOCKER_PLAYGROUND="$BRANCH_DOCKER_PLAYGROUND" - . scripts/common.sh - docker_images_require "debian-stretch-build" "debian-stretch-build-dist" - - docker run \ - --rm=true \ - -v "$PWD:/osmo-ci" \ - -w /osmo-ci \ - -e KEEP_TEMP="$KEEP_TEMP" \ - "$USER/debian-stretch-build-dist" /osmo-ci/scripts/osmocom-release-tarballs.sh - - SSH_COMMAND="ssh -p 48" - cd _release_tarballs - rsync -avz --delete -e "$SSH_COMMAND" . releases@rita.osmocom.org:web-files/ + PUBLISH=1 scripts/tarballs/publish-tarballs-for-tags.sh scm: - git: branches: - '$BRANCH_OSMO_CI' - url: git://git.osmocom.org/osmo-ci + url: https://gerrit.osmocom.org/osmo-ci git-config-name: 'Jenkins Builder' git-config-email: 'jenkins@osmocom.org' - # Don't wipe workspace to keep generated release tarballs - wipe-workspace: false + wipe-workspace: true triggers: - - timed: "@midnight" - # Limit to one specific builder (so we don't regenerate all tarballs when switching to another builder) - node: build2-deb9build-ansible + - timed: "H 05 * * *" publishers: - email: notify-every-unstable-build: true @@ -59,6 +43,6 @@ wrappers: - ssh-agent-credentials: users: - - releases + - releases_ftp.osmocom.org # vim: expandtab tabstop=2 shiftwidth=2 diff --git a/jobs/registry-rebuild-upload-fpga-build.yml b/jobs/registry-rebuild-upload-fpga-build.yml new file mode 100644 index 0000000..1846e49 --- /dev/null +++ b/jobs/registry-rebuild-upload-fpga-build.yml @@ -0,0 +1,39 @@ +--- +- project: + name: registry-rebuild-upload-fpga-build + jobs: + - registry-rebuild-upload-fpga-build + +- job: + name: registry-rebuild-upload-fpga-build + description: | + Rebuild + push fpga-build docker images in our private registry.osmocom.org + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + node: osmocom-master + scm: + - git: + url: https://gerrit.osmocom.org/docker-playground + skip-tag: true + branches: + - 'origin/master' + + builders: + - shell: | + REGISTRY="registry.osmocom.org" + cd debian-buster-build && make + cd .. + cd fpga-build && make REGISTRY_HOST=$REGISTRY + docker push $REGISTRY/$USER/fpga-build + cd .. + triggers: + - timed: "H 02 * * H" + + publishers: + - email: + notify-every-unstable-build: true + recipients: 'jenkins-notifications@lists.osmocom.org' + +# vim: expandtab tabstop=2 shiftwidth=2 diff --git a/jobs/registry-rebuild-upload-titan.yml b/jobs/registry-rebuild-upload-titan.yml new file mode 100644 index 0000000..a535920 --- /dev/null +++ b/jobs/registry-rebuild-upload-titan.yml @@ -0,0 +1,72 @@ +- project: + name: registry-rebuild-upload-titan + jobs: + - registry-rebuild-upload-titan + - registry-rebuild-upload-ttcn3-bts-tests + +- scm: + name: osmocom-docker-playground + scm: + - git: + url: https://gerrit.osmocom.org/docker-playground + skip-tag: true + branches: + - 'origin/master' + + +- job: + name: registry-rebuild-upload-titan + description: | + Rebuild + push ttcn3 base images (debian-bookworm-titan) in our private + registry.osmocom.org + <br><br> + Related:<br> + <ul> + <li> <a href="https://osmocom.org/issues/5017">OS#5017</a> + </ul> + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + node: osmocom-master + scm: + - 'osmocom-docker-playground' + builders: + - shell: | + REGISTRY="registry.osmocom.org" + make -C debian-bookworm-titan REGISTRY_HOST=$REGISTRY + docker push "$REGISTRY/$USER/debian-bookworm-titan" + publishers: + - email: + notify-every-unstable-build: true + recipients: 'jenkins-notifications@lists.osmocom.org' + +- job: + name: registry-rebuild-upload-ttcn3-bts-tests + description: | + Rebuild + push ttcn3-bts-test image in our private registry.osmocom.org. + This docker container is used by osmo-gsm-tester main unit to run TTCN3 + BTS_Tests testsuite against real hardware. + <br><br> + Related:<br> + <ul> + <li>SYS#5765 + </ul> + node: osmocom-master + triggers: + - reverse: + jobs: + - registry-rebuild-upload-titan + scm: + - 'osmocom-docker-playground' + builders: + - shell: | + REGISTRY="registry.osmocom.org" + make -C ttcn3-bts-test REGISTRY_HOST=$REGISTRY + docker push "$REGISTRY/$USER/ttcn3-bts-test" + publishers: + - email: + notify-every-unstable-build: true + recipients: 'jenkins-notifications@lists.osmocom.org' + +# vim: expandtab tabstop=2 shiftwidth=2 diff --git a/jobs/registry-triggers.yml b/jobs/registry-triggers.yml new file mode 100644 index 0000000..da7d402 --- /dev/null +++ b/jobs/registry-triggers.yml @@ -0,0 +1,35 @@ +- project: + name: registry-triggers + jobs: + - 'registry-trigger-{repos}' + repos: + - osmo-ttcn3-hacks: + # Cache is invalidated on changes in deps/Makefile (OS#5017) + trigger: > + registry-rebuild-upload-titan + +- job-template: + name: 'registry-trigger-{repos}' + description: | + Update registry.osmocom.org after changes in {repos}. + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + scm: + - git: + url: https://gerrit.osmocom.org/{repos} + branches: + - 'origin/master' + trigger: + email: jenkins-notifications@lists.osmocom.org + triggers: + - pollscm: + cron: "H/5 * * * *" + ignore-post-commit-hooks: false + - timed: "H 02 * * *" + publishers: + - trigger: + project: '{obj:trigger}' + +# vim: expandtab tabstop=2 shiftwidth=2 diff --git a/jobs/registry-update-base-images.yml b/jobs/registry-update-base-images.yml new file mode 100644 index 0000000..b51ae95 --- /dev/null +++ b/jobs/registry-update-base-images.yml @@ -0,0 +1,48 @@ +--- +- project: + name: registry-update-base-images + jobs: + - registry-update-base-images + +- job: + name: registry-update-base-images + description: | + Update base docker images in our private registry.osmocom.org with those from docker.io + Related:<br> + <ul> + <li> <a href="https://osmocom.org/issues/4839">OS#4839</a> + </ul> + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 + node: osmocom-master + builders: + - shell: | + REGISTRY="registry.osmocom.org" + IMAGES=" + debian:buster + debian:bullseye + debian:bookworm + debian:sid + + centos:centos7 + " + for i in $IMAGES; do + src=$i + dst=${REGISTRY}/$i + echo + echo ======= $src + docker pull $src + docker tag $src $dst + docker push $dst + done + triggers: + - timed: "H 00 * * *" + + publishers: + - email: + notify-every-unstable-build: true + recipients: 'jenkins-notifications@lists.osmocom.org' + +# vim: expandtab tabstop=2 shiftwidth=2 diff --git a/jobs/repo-install-test.yml b/jobs/repo-install-test.yml index f386eab..0891e24 100644 --- a/jobs/repo-install-test.yml +++ b/jobs/repo-install-test.yml @@ -4,10 +4,12 @@ jobs: - Osmocom-repo-install-{distro} distro: - - debian: + - debian10: + feeds: !!python/tuple [nightly, latest] + - debian11: + feeds: !!python/tuple [nightly, latest] + - debian12: feeds: !!python/tuple [nightly, latest] - - centos: - feeds: !!python/tuple [next, nightly] - job-template: name: Osmocom-repo-install-{distro} @@ -23,43 +25,40 @@ <li> <a href="https://osmocom.org/issues/3176">OS#3176</a>: install all Osmocom debian packages <li> <a href="https://osmocom.org/issues/3369">OS#3369</a>: check if systemd services start properly <li> <a href="https://osmocom.org/issues/4563">OS#4563</a>: extend for centos + <li> <a href="https://osmocom.org/issues/5365">OS#5365</a>: run in qemu </ul> - node: osmocom-master-debian9 + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 30 parameters: - string: name: BRANCH_CI description: | osmo-ci.git branch default: 'master' - - string: - name: BRANCH_DP - description: | - docker-playground.git branch - default: 'master' axes: - axis: type: slave name: label - # Force using "build2-deb9build-ansible": https://osmocom.org/issues/4563#note-10 - values: !!python/tuple [build2-deb9build-ansible] + values: !!python/tuple [qemu] - axis: type: user-defined name: feed values: '{obj:feeds}' builders: - shell: | - export OSMO_BRANCH_DOCKER_PLAYGROUND="$BRANCH_DP" export FEED="$feed" scripts/repo-install-test.sh "{distro}" scm: - git: branches: - '$BRANCH_CI' - url: git://git.osmocom.org/osmo-ci + url: https://gerrit.osmocom.org/osmo-ci git-config-name: 'Jenkins Builder' git-config-email: 'jenkins@osmocom.org' triggers: - - timed: "H 04 * * *" # run after osmocom-obs.yml + - timed: "H 06 * * *" publishers: - email: diff --git a/jobs/ttcn3-testsuites-kernel-git.yml b/jobs/ttcn3-testsuites-kernel-git.yml new file mode 100644 index 0000000..6ce8fe8 --- /dev/null +++ b/jobs/ttcn3-testsuites-kernel-git.yml @@ -0,0 +1,125 @@ +# TTCN-3 testsuite jobs with parameters to build a kernel from source (OS#3208) +# In contrary to the kernel jobs in ttcn3-testsuites.yml, here the jobs are +# manually triggered and the kernel git repository is not hardcoded. +--- +- project: + name: 'ttcn3-testsuites-kernel-git' + concurrent: false + disabled: false + description: "" + node: ttcn3 + wipe_workspace: false + jobs: + - "{job-name}" + job-name: + - ttcn3-ggsn-test-kernel-git: + # Cache the linux source tree in the workspace of one node + node: ttcn3-ggsn-test-kernel-git + description: | + Run the + <a href="https://osmocom.org/projects/cellular-infrastructure/wiki/Titan_TTCN3_Testsuites"> + Osmocom Titan TTCN-3 testsuite</a> against + <a href="https://osmocom.org/projects/openggsn/wiki/OsmoGGSN"> + OsmoGGSN</a> with the GTP kernel module. The kernel is built + from the git repository and branch provided as parameters when + starting this job. + +- job-template: + name: '{job-name}' + project-type: freestyle + disabled: '{obj:disabled}' + defaults: global + description: '{obj:description}' + node: '{obj:node}' + parameters: + - string: + name: KERNEL_URL + description: | + Remote URL of git repository, from which the kernel will be + built. + default: 'https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git' + - string: + name: KERNEL_REMOTE_NAME + description: | + Short name for the remote URL, which will be used to add it to + the local git checkout with <code>git remote add</code>. + default: 'net-next' + - string: + name: KERNEL_BRANCH + description: | + Branch to check out from the remote with + <code>KERNEL_URL</code> and <code>KERNEL_REMOTE_NAME</code> + before building the kernel. + default: 'master' + - choice: + name: OSMOCOM_VERSION + choices: + - latest + - master + description: | + Version of the Osmocom stack to test against the kernel. Either + <code>latest</code> for the latest release version, or + <code>master</code> for HEAD of Osmocom git repositories. + default: 'latest' + - string: + name: BRANCH + description: | + Branch of <code>docker-playground.git</code> + (for development of the test infrastructure, don't change this + when testing kernel trees). + default: '*/master' + + builders: + - shell: |- + export REGISTRY_HOST="registry.osmocom.org" + + # Translate job name to docker-playground dir and relevant + # environment variables + case "{job-name}" in + ttcn3-ggsn-test-kernel-git) + DIR="ttcn3-ggsn-test" + export IMAGE_SUFFIX="$OSMOCOM_VERSION" + export KERNEL_TEST=1 + export KERNEL_BUILD=1 + ;; + *) + echo "Can't handle job: {job-name}" + exit 1 + ;; + esac + + cd "$DIR" + ./jenkins.sh + scm: + - git: + branches: + - '$BRANCH' + url: https://gerrit.osmocom.org/docker-playground + git-config-name: 'Jenkins Builder' + git-config-email: 'jenkins@osmocom.org' + wipe-workspace: "{obj:wipe_workspace}" + publishers: + - junit: + results: '**/junit-xml-*.log' + allow-empty-results: false + - email: + notify-every-unstable-build: false + recipients: '{obj:email}' + send-to-individuals: false + - archive: + allow-empty: false + artifacts: logs/**/* + case-sensitive: true + default-excludes: true + fingerprint: false + only-if-success: false + properties: + - build-discarder: + days-to-keep: 30 + num-to-keep: 120 + wrappers: + - ansicolor: + colormap: xterm + email: jenkins-notifications@lists.osmocom.org + +# vim: expandtab tabstop=2 shiftwidth=2 diff --git a/jobs/ttcn3-testsuites.yml b/jobs/ttcn3-testsuites.yml index 2dd504f..8a1f767 100644 --- a/jobs/ttcn3-testsuites.yml +++ b/jobs/ttcn3-testsuites.yml @@ -3,189 +3,246 @@ name: 'ttcn3-testsuites' concurrent: false disabled: false + description: | + Run the a testsuite from + <a href="https://gitea.osmocom.org/osmocom/docker-playground"> + docker-playground.git</a>.<br> + If this job ends in <code>-latest</code>, the job runs the latest + stable versions of the Osmocom stack. Otherwise the nightly builds.<br> + See <a href="https://osmocom.org/projects/cellular-infrastructure/wiki/Titan_TTCN3_Testsuites"> + TTCN3 Testsuite</a> for more information. timer: "@midnight" - # Block *-latest for all master jobs (without suffix) - blocking: "^{job-name}.*" + node: ttcn3 + wipe_workspace: true jobs: - "{job-name}" # Folders from docker-playground.git + # timer: 10 per hour from 04:00 - 18:00, see jobs/README.adoc job-name: - # debian-stretch nightly - order by time + # debian nightly - order by time - nplab-m3ua-test: - blocking: "^(nplab|NPLAB-.*)-m3ua-test.*" - timer: 00 03 * * * + timer: H 04 * * * - nplab-sua-test: - blocking: "^(nplab|NPLAB-.*)-sua-test.*" - timer: 15 03 * * * + timer: H 04 * * * - ttcn3-ggsn-test: - blocking: "^(ttcn3|TTCN3-.*)-ggsn-test.*" - timer: 00 04 * * * + timer: H 04 * * * + - ttcn3-ggsn-test-kernel: + timer: H 04 * * * + description: | + Test osmo-ggsn master with the Debian kernel. + - ttcn3-ggsn-test-kernel-pablo-gtp: + timer: H 04 * * * + # Cache the linux source tree in the workspace of one node + wipe_workspace: false + description: | + Test osmo-ggsn master with the Linux kernel built from main of + <a href="https://git.kernel.org/pub/scm/linux/kernel/git/pablo/gtp.git/">pablo/gtp.git</a>. + <br> + This is a temporary job, to be removed once the IPv6 related GTP + patches are upstreamed (OS#1952). + - ttcn3-ggsn-test-kernel-latest: + timer: H 04 * * * + description: | + Test osmo-ggsn latest with the Debian kernel. + - ttcn3-ggsn-test-kernel-latest-net-next: + timer: H 04 * * * + # Cache the linux source tree in the workspace of one node + wipe_workspace: false + node: ttcn3-ggsn-test-kernel-git + description: | + Test osmo-ggsn latest with the Linux kernel built from master of + <a href="https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/"> + net-next.git</a>. + - ttcn3-ggsn-test-kernel-latest-torvalds: + timer: H 04 * * * + # Cache the linux source tree in the workspace of one node + wipe_workspace: false + node: ttcn3-ggsn-test-kernel-git + description: | + Test osmo-ggsn latest with the Linux kernel built from master of + <a href="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/"> + torvalds/linux.git</a>. + - ttcn3-ggsn-test-ogs: + timer: H 04 * * * + description: | + Test open5gs-smfd + open5gs-upfd main. + email: jenkins-notifications@lists.osmocom.org acetcom@gmail.com - ttcn3-msc-test: - blocking: "^(ttcn3|TTCN3-.*)-msc-test.*" - timer: 30 04 * * * + timer: H 04 * * * - ttcn3-pcu-test: - blocking: "^(ttcn3|TTCN3-.*)-pcu-test.*" - timer: 00 05 * * * + timer: H 04 * * * - ttcn3-pcu-test-sns: - blocking: "^(ttcn3|TTCN3-.*)-pcu-test.*" - timer: 15 05 * * * + timer: H 05 * * * - ttcn3-sgsn-test: - blocking: "^(ttcn3|TTCN3-.*)-sgsn-test.*" - timer: 30 05 * * * + timer: H 05 * * * + - ttcn3-sgsn-test-sns: + timer: H 05 * * * - ttcn3-bsc-test: - blocking: "^(ttcn3|TTCN3-.*)-bsc-test.*" - timer: 00 06 * * * + timer: H 05 * * * - ttcn3-mgw-test: - blocking: "^(ttcn3|TTCN3-.*)-mgw-test.*" - timer: 30 06 * * * + timer: H 05 * * * - ttcn3-hlr-test: - blocking: "^(ttcn3|TTCN3-.*)-hlr-test.*" - timer: 45 06 * * * + timer: H 05 * * * - ttcn3-bts-test: - blocking: "^(ttcn3|TTCN3-.*)-bts-test.*" - timer: 00 07 * * * + timer: H 05 * * * - ttcn3-sip-test: - blocking: "^(ttcn3|TTCN3-.*)-sip-test.*" - timer: 30 07 * * * + timer: H 05 * * * - ttcn3-bscnat-test: - blocking: "^(ttcn3|TTCN3-.*)-bscnat-test.*" - timer: 00 08 * * * + timer: H 05 * * * + disabled: true - ttcn3-bsc-test-sccplite: - blocking: "^(ttcn3|TTCN3-.*)-bsc-test.*" - timer: 30 08 * * * + timer: H 05 * * * - ttcn3-remsim-test: - blocking: "^(ttcn3|TTCN3-.*)-remsim-test.*" - timer: 00 09 * * * + timer: H 05 * * * - ttcn3-stp-test: - blocking: "^(ttcn3|TTCN3-.*)-stp-test.*" - timer: 30 09 * * * + timer: H 06 * * * - ttcn3-sccp-test: - blocking: "^(ttcn3|TTCN3-.*)-sccp-test.*" - timer: 00 10 * * * + timer: H 06 * * * - ttcn3-smlc-test: - blocking: "^(ttcn3|TTCN3-.*)-smlc-test.*" - timer: 10 10 * * * + timer: H 06 * * * + - ttcn3-gbproxy-test: + timer: H 06 * * * + - ttcn3-gbproxy-test-fr: + timer: H 06 * * * + node: hdlc + - ttcn3-cbc-test: + timer: H 06 * * * + - ttcn3-ns-test: + timer: H 06 * * * + - ttcn3-ns-test-sns: + timer: H 06 * * * + - ttcn3-ns-test-fr: + timer: H 06 * * * + node: hdlc + - ttcn3-ns-test-sgsn-sns: + timer: H 06 * * * + - ttcn3-pcap-client-test: + timer: H 07 * * * + - ttcn3-bsc-test-vamos: + timer: H 07 * * * + - ttcn3-hnodeb-test: + timer: H 07 * * * + - ttcn3-upf-test: + timer: H 07 * * * + - ttcn3-hnbgw-test: + timer: H 07 * * * + - ttcn3-fr-test: + timer: H 07 * * * + node: hdlc + - ttcn3-pgw-test: + timer: H 07 * * * + description: | + Test open5gs-smfd + open5gs-upfd PGW main. + email: jenkins-notifications@lists.osmocom.org acetcom@gmail.com + - ttcn3-mme-test-ogs: + timer: H 07 * * * + description: | + Test open5gs-mmed + email: jenkins-notifications@lists.osmocom.org acetcom@gmail.com + - ttcn3-hss-test-ogs: + timer: H 07 * * * + description: | + Test open5gs-hssd + email: jenkins-notifications@lists.osmocom.org acetcom@gmail.com + - ttcn3-dia2gsup-test: + timer: H 07 * * * + - ttcn3-epdg-test: + timer: H 07 * * * + # osmo-epdg requires OTP and kernel >= debian12: + node: build4-deb12build-ansible + - ttcn3-asterisk-ims-ue-test: + timer: H 07 * * * - # debian-stretch latest stable + # debian latest stable - nplab-m3ua-test-latest: - blocking: "^(nplab|NPLAB-.*)-m3ua-test.*" - timer: 00 03 * * * + timer: H 07 * * * - nplab-sua-test-latest: - blocking: "^(nplab|NPLAB-.*)-sua-test.*" - timer: 15 03 * * * + timer: H 08 * * * - ttcn3-ggsn-test-latest: - blocking: "^(ttcn3|TTCN3-.*)-ggsn-test.*" - timer: 00 04 * * * + timer: H 08 * * * - ttcn3-msc-test-latest: - blocking: "^(ttcn3|TTCN3-.*)-msc-test.*" - timer: 30 04 * * * + timer: H 08 * * * - ttcn3-pcu-test-latest: - blocking: "^(ttcn3|TTCN3-.*)-pcu-test.*" - timer: 00 05 * * * + timer: H 08 * * * - ttcn3-pcu-test-sns-latest: - blocking: "^(ttcn3|TTCN3-.*)-pcu-test.*" - timer: 15 05 * * * + timer: H 08 * * * - ttcn3-sgsn-test-latest: - blocking: "^(ttcn3|TTCN3-.*)-sgsn-test.*" - timer: 30 05 * * * + timer: H 08 * * * + - ttcn3-sgsn-test-sns-latest: + timer: H 08 * * * - ttcn3-bsc-test-latest: - blocking: "^(ttcn3|TTCN3-.*)-bsc-test.*" - timer: 00 06 * * * + timer: H 08 * * * - ttcn3-mgw-test-latest: - blocking: "^(ttcn3|TTCN3-.*)-mgw-test.*" - timer: 30 06 * * * + timer: H 08 * * * - ttcn3-hlr-test-latest: - blocking: "^(ttcn3|TTCN3-.*)-hlr-test.*" - timer: 45 06 * * * + timer: H 08 * * * - ttcn3-bts-test-latest: - blocking: "^(ttcn3|TTCN3-.*)-bts-test.*" - timer: 00 07 * * * + timer: H 08 * * * - ttcn3-sip-test-latest: - blocking: "^(ttcn3|TTCN3-.*)-sip-test.*" - timer: 30 07 * * * + timer: H 09 * * * - ttcn3-bscnat-test-latest: - blocking: "^(ttcn3|TTCN3-.*)-bscnat-test.*" - timer: 00 08 * * * + timer: H 09 * * * + disabled: true - ttcn3-bsc-test-sccplite-latest: - blocking: "^(ttcn3|TTCN3-.*)-bsc-test.*" - timer: 30 08 * * * + timer: H 09 * * * - ttcn3-remsim-test-latest: - blocking: "^(ttcn3|TTCN3-.*)-remsim-test.*" - timer: 00 09 * * * + timer: H 09 * * * - ttcn3-stp-test-latest: - blocking: "^(ttcn3|TTCN3-.*)-stp-test.*" - timer: 30 09 * * * - #- ttcn3-sccp-test-latest: - # blocking: "^(ttcn3|TTCN3-.*)-sccp-test.*" - # timer: 00 10 * * * - #- ttcn3-smlc-test: - # blocking: "^(ttcn3|TTCN3-.*)-smlc-test.*" - # timer: 10 10 * * * + timer: H 09 * * * + - ttcn3-sccp-test-latest: + timer: H 09 * * * + - ttcn3-smlc-test-latest: + timer: H 09 * * * + - ttcn3-gbproxy-test-latest: + timer: H 09 * * * + - ttcn3-gbproxy-test-fr-latest: + timer: H 09 * * * + node: hdlc + - ttcn3-cbc-test-latest: + timer: H 09 * * * + - ttcn3-pcap-client-test-latest: + timer: H 10 * * * + - ttcn3-hnodeb-test-latest: + timer: H 10 * * * + - ttcn3-upf-test-latest: + timer: H 10 * * * + disabled: true + - ttcn3-hnbgw-test-latest: + timer: H 10 * * * + + # Jobs below use uppercase TTCN3-$DISTRO, so they get listed separately from the ttcn3-* (debian) jobs - # Jobs below use uppercase TTCN3-$DISTRO, so they get listed separately from the ttcn3-* (debian-stretch) jobs + # centos7 nightly + - TTCN3-centos7-pcap-client-test: + timer: H 10 * * * - # centos8 nightly - - TTCN3-centos-ggsn-test: - blocking: "^(ttcn3|TTCN3-.*)-ggsn-test.*" - timer: 00 04 * * * - - TTCN3-centos-msc-test: - blocking: "^(ttcn3|TTCN3-.*)-msc-test.*" - timer: 30 04 * * * - - TTCN3-centos-pcu-test: - blocking: "^(ttcn3|TTCN3-.*)-pcu-test.*" - timer: 00 05 * * * - - TTCN3-centos-pcu-test-sns: - blocking: "^(ttcn3|TTCN3-.*)-pcu-test.*" - timer: 15 05 * * * - - TTCN3-centos-sgsn-test: - blocking: "^(ttcn3|TTCN3-.*)-sgsn-test.*" - timer: 30 05 * * * - - TTCN3-centos-bsc-test: - blocking: "^(ttcn3|TTCN3-.*)-bsc-test.*" - timer: 00 06 * * * - - TTCN3-centos-mgw-test: - blocking: "^(ttcn3|TTCN3-.*)-mgw-test.*" - timer: 30 06 * * * - - TTCN3-centos-hlr-test: - blocking: "^(ttcn3|TTCN3-.*)-hlr-test.*" - timer: 45 06 * * * - - TTCN3-centos-bts-test: - blocking: "^(ttcn3|TTCN3-.*)-bts-test.*" - timer: 00 07 * * * - - TTCN3-centos-sip-test: - blocking: "^(ttcn3|TTCN3-.*)-sip-test.*" - timer: 30 07 * * * - - TTCN3-centos-bsc-test-sccplite: - blocking: "^(ttcn3|TTCN3-.*)-bsc-test.*" - timer: 30 08 * * * - - TTCN3-centos-remsim-test: - blocking: "^(ttcn3|TTCN3-.*)-remsim-test.*" - timer: 00 09 * * * - - TTCN3-centos-stp-test: - blocking: "^(ttcn3|TTCN3-.*)-stp-test.*" - timer: 30 09 * * * - #- TTCN3-sccp-test-latest: - # blocking: "^(ttcn3|TTCN3-.*)-sccp-test.*" - # timer: 00 10 * * * - #- ttcn3-smlc-test: - # blocking: "^(ttcn3|TTCN3-.*)-smlc-test.*" - # timer: 10 10 * * * + # centos7 latest + - TTCN3-centos7-pcap-client-test-latest: + timer: H 10 * * * + + # With LIBOSMO_IO_BACKEND=IO_URING (OS#6357) + - ttcn3-bsc-test-io_uring: + timer: H 11 * * * + - ttcn3-msc-test-io_uring: + timer: H 11 * * * + - ttcn3-hnbgw-test-io_uring: + timer: H 11 * * * + - ttcn3-gbproxy-test-io_uring: + timer: H 11 * * * + - ttcn3-sgsn-test-io_uring: + timer: H 11 * * * + - ttcn3-stp-test-io_uring: + timer: H 11 * * * + - ttcn3-mgw-test-io_uring: + timer: H 11 * * * - job-template: name: '{job-name}' project-type: freestyle disabled: '{obj:disabled}' defaults: global - description: | - Run the <code>{job-name}</code> testsuite from - <a href="https://git.osmocom.org/docker-playground/">docker-playground.git</a>.<br> - If this job ends in <code>-latest</code>, the job runs the latest stable versions of the Osmocom stack. - Otherwise the nightly builds.<br> - Generated with the jenkins-job-builder config introduced in - <a href="https://osmocom.org/issues/3268">OS#3268</a>.<br> - See <a href="https://osmocom.org/projects/cellular-infrastructure/wiki/Titan_TTCN3_Testsuites"> - TTCN3 Testsuite</a> for more information. - node: ttcn3 + description: '{obj:description}' + node: '{obj:node}' parameters: - string: name: BRANCH @@ -193,34 +250,84 @@ Branch of <code>docker-playground.git</code>. Only modify if you are hacking on the docker-playground scripts. default: '*/master' - builders: - shell: |- + export REGISTRY_HOST="registry.osmocom.org" + + # Translate job name to docker-playground dir and relevant + # environment variables case "{job-name}" in - TTCN3-centos-*-latest) - cd "$(echo "{job-name}" | sed s/^TTCN3-centos\-/ttcn3-/ | sed s/\-latest$//)" - IMAGE_SUFFIX="latest-centos8" ./jenkins.sh + ttcn3-ggsn-test-kernel) + DIR="ttcn3-ggsn-test" + export IMAGE_SUFFIX="master" + # Run against debian's kernel + export KERNEL_TEST=1 ;; - TTCN3-centos-*) - cd "$(echo "{job-name}" | sed s/^TTCN3-centos\-/ttcn3-/)" - IMAGE_SUFFIX="master-centos8" ./jenkins.sh + ttcn3-ggsn-test-kernel-pablo-gtp) + DIR="ttcn3-ggsn-test" + export IMAGE_SUFFIX="master" + export KERNEL_TEST=1 + export KERNEL_BUILD=1 + export KERNEL_URL="https://git.kernel.org/pub/scm/linux/kernel/git/pablo/gtp.git" + export KERNEL_REMOTE_NAME="pablo-gtp" + export KERNEL_BRANCH="main" + ;; + ttcn3-ggsn-test-kernel-latest) + DIR="ttcn3-ggsn-test" + export IMAGE_SUFFIX="latest" + export KERNEL_TEST=1 + ;; + ttcn3-ggsn-test-kernel-latest-net-next) + DIR="ttcn3-ggsn-test" + export IMAGE_SUFFIX="latest" + export KERNEL_TEST=1 + export KERNEL_BUILD=1 + export KERNEL_URL="https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git" + export KERNEL_REMOTE_NAME="net-next" + export KERNEL_BRANCH="main" + ;; + ttcn3-ggsn-test-kernel-latest-torvalds) + DIR="ttcn3-ggsn-test" + export IMAGE_SUFFIX="latest" + export KERNEL_TEST=1 + export KERNEL_BUILD=1 + export KERNEL_URL="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git" + export KERNEL_REMOTE_NAME="torvalds" + export KERNEL_BRANCH="master" + ;; + TTCN3-centos7-*-latest) + DIR="$(echo "{job-name}" | sed s/^TTCN3-centos7\-/ttcn3-/ | sed s/\-latest$//)" + export IMAGE_SUFFIX="latest-centos7" + ;; + TTCN3-centos7-*) + DIR="$(echo "{job-name}" | sed s/^TTCN3-centos7\-/ttcn3-/)" + export IMAGE_SUFFIX="master-centos7" + ;; + *-io_uring) + DIR="$(echo "{job-name}" | sed s/\-io_uring$//)" + # OS#6405: set memlock to unlimited for older kernels + export DOCKER_ARGS="-e LIBOSMO_IO_BACKEND=IO_URING --ulimit memlock=-1" ;; *-latest) - cd "$(echo "{job-name}" | sed s/\-latest$//)" - IMAGE_SUFFIX="latest" ./jenkins.sh + DIR="$(echo "{job-name}" | sed s/\-latest$//)" + export IMAGE_SUFFIX="latest" ;; *) - cd "{job-name}" - IMAGE_SUFFIX="master" ./jenkins.sh + DIR="{job-name}" + export IMAGE_SUFFIX="master" ;; esac + + cd "$DIR" + ./jenkins.sh scm: - git: branches: - '$BRANCH' - url: git://git.osmocom.org/docker-playground + url: https://gerrit.osmocom.org/docker-playground git-config-name: 'Jenkins Builder' git-config-email: 'jenkins@osmocom.org' + wipe-workspace: "{obj:wipe_workspace}" triggers: - timed: "{obj:timer}" publishers: @@ -228,8 +335,8 @@ results: '**/junit-xml-*.log' allow-empty-results: false - email: - notify-every-unstable-build: true - recipients: laforge@gnumonks.org + notify-every-unstable-build: false + recipients: '{obj:email}' send-to-individuals: false - archive: allow-empty: false @@ -239,14 +346,12 @@ fingerprint: false only-if-success: false properties: - - build-blocker: - use-build-blocker: true - blocking-jobs: - - "{obj:blocking}" - build-discarder: days-to-keep: 30 num-to-keep: 120 - artifact-days-to-keep: -1 - artifact-num-to-keep: -1 + wrappers: + - ansicolor: + colormap: xterm + email: jenkins-notifications@lists.osmocom.org # vim: expandtab tabstop=2 shiftwidth=2 diff --git a/jobs/update-osmo-ci-on-slaves.yml b/jobs/update-osmo-ci-on-slaves.yml index 16c4ceb..c826175 100644 --- a/jobs/update-osmo-ci-on-slaves.yml +++ b/jobs/update-osmo-ci-on-slaves.yml @@ -6,41 +6,60 @@ type: slave name: label values: - - simtester - - admin2-deb8build - - admin2-deb9build - - host2-deb8build-ansible - - host2-deb9build-ansible - - build2-deb8build-ansible - - build2-deb9build-ansible - build2-deb10build-ansible - - rpi4-deb9build-ansible + - build2-deb11build-ansible + - build4-deb12build-ansible + - gtp0-deb10fr + - host2-deb11build-ansible + - rpi4-raspbian11build-ansible-1 + - rpi4-raspbian11build-ansible-2 + - rpi4-raspbian11build-ansible-3 + - simtester properties: - build-discarder: days-to-keep: 30 num-to-keep: 120 + parameters: + - string: + name: OSMO_BRANCH_CI + description: | + osmo-ci.git branch + default: 'master' + - string: + # Used in scripts/common.sh:docker_images_require() + name: OSMO_BRANCH_DOCKER_PLAYGROUND + description: | + docker-playground.git branch + default: 'master' scm: - git: - url: git://git.osmocom.org/osmo-ci + url: https://gerrit.osmocom.org/osmo-ci git-config-name: 'Jenkins Builder' git-config-email: 'jenkins@osmocom.org' skip-tag: true branches: - - 'origin/master' + - '$OSMO_BRANCH_CI' + wipe-workspace: true triggers: - pollscm: cron: "H/5 * * * *" ignore-post-commit-hooks: false + - timed: "H H * * *" builders: - shell: './contrib/jenkins.sh' + + wrappers: + - ansicolor: + colormap: xterm + description: | <b>Auto-generated using Jenkins Job Builder. DO NOT EDIT MANUALLY!</b> publishers: - email: - recipients: intern@lists.sysmocom.de + recipients: jenkins-notifications@lists.osmocom.org # Trigger from docker-playground.git too - job: @@ -48,10 +67,9 @@ description: | Trigger <a href="https://jenkins.osmocom.org/jenkins/job/update-osmo-ci-on-slaves/">update-osmo-ci-on-slaves</a> on changes in docker-playground.git, so it can rebuild docker containers relevant for the jenkins slaves. - node: osmocom-master-debian9 scm: - git: - url: git://git.osmocom.org/docker-playground + url: https://gerrit.osmocom.org/docker-playground git-config-name: 'Jenkins Builder' git-config-email: 'jenkins@osmocom.org' skip-tag: true diff --git a/jobs/update-osmo-python-on-slaves.yml b/jobs/update-osmo-python-on-slaves.yml index ab433a6..0842fba 100644 --- a/jobs/update-osmo-python-on-slaves.yml +++ b/jobs/update-osmo-python-on-slaves.yml @@ -6,14 +6,14 @@ type: slave name: label values: - - admin2-deb8build - - admin2-deb9build - - host2-deb8build-ansible - - host2-deb9build-ansible - - build2-deb8build-ansible - - build2-deb9build-ansible - build2-deb10build-ansible - - rpi4-deb9build-ansible + - build2-deb11build-ansible + - build3-deb11build-ansible + - build4-deb12build-ansible + - host2-deb11build-ansible + - rpi4-raspbian11build-ansible-1 + - rpi4-raspbian11build-ansible-2 + - rpi4-raspbian11build-ansible-3 properties: - build-discarder: days-to-keep: 30 @@ -42,6 +42,6 @@ project: update-osmo-ci-on-slaves threshold: FAILURE - email: - recipients: intern@lists.sysmocom.de + recipients: jenkins-notifications@lists.osmocom.org # vim: expandtab tabstop=2 shiftwidth=2 |