[MERGED] osmo-ci[master]: Gerrit verification jobs as Jenkins Job Builder YAML [1] file.

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Sep 28 02:16:20 UTC 2017


Neels Hofmeyr has submitted this change and it was merged.

Change subject: Gerrit verification jobs as Jenkins Job Builder YAML [1] file.
......................................................................


Gerrit verification jobs as Jenkins Job Builder YAML [1] file.

All jobs are in jobs/ directory and will be automatically verified and
deployed in a follow-up commit.

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

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

Change-Id: I04387367a6e2d737bfb50423c81a8908d3c2a89f
---
M README.adoc
A jobs/README.adoc
A jobs/gerrit-verifications.yml
R jobs/osmocom-nightly-nitb-split.yml
4 files changed, 287 insertions(+), 0 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved; Verified
  Harald Welte: Looks good to me, but someone else must approve



diff --git a/README.adoc b/README.adoc
index 796d148..aa45b58 100644
--- a/README.adoc
+++ b/README.adoc
@@ -6,6 +6,9 @@
 - a cov-analysis-linux64-8.5.0 in coverity/
   (or the like, may need to adjust some scripts to match)
 
+jobs: Jenkins Job Builder YAML files defining jenkins jobs. Read jobs/README.adoc
+for more information about deployment.
+
 scripts: used by jenkins jobs. Various osmo*/contrib/jenkins.sh scripts assume
 osmo-ci to be checked out in the build slave user's home, i.e. using a PATH of
 $HOME/osmo-ci/scripts.
diff --git a/jobs/README.adoc b/jobs/README.adoc
new file mode 100644
index 0000000..b8c8164
--- /dev/null
+++ b/jobs/README.adoc
@@ -0,0 +1,31 @@
+This "jobs" folder holds
+https://docs.openstack.org/infra/jenkins-job-builder/index.html[Jenkins Job Builder]
+YAML files, which define jenkins' jobs.
+
+One can declare a single job per file or create a job-template to declare several jobs of the same kind.
+The gerrit-verifications.yaml file for example holds all gerrit verification jobs.
+
+'''
+*WIP:* Furthermore, we're planning to automatically deploy merged changes by having two jobs based on gerrit events:
+
+pre-merge:
+
+- test generation of XML
+
+post-merge:
+
+- test generation of XML
+- deploy jobs
+
+'''
+The XML test generation is done by:
+
+ jenkins-jobs test jobs/
+
+
+The deployment will be done by:
+
+ jenkins-jobs --conf "$JJB_CONFIGFILE" update jobs/
+
+but it is not clear *yet* how we want to store/inject the `"$JJB_CONFIGFILE"` part.
+
diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml
new file mode 100644
index 0000000..780f2d5
--- /dev/null
+++ b/jobs/gerrit-verifications.yml
@@ -0,0 +1,253 @@
+# 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.
+
+- project:
+    name: gerrit
+    # following default values can be overridden by each repo
+    disabled: false
+    concurrent: false
+    node: linux_amd64_debian8
+    # axes related defaults
+    slave_axis: !!python/tuple [linux_amd64_debian8]
+    a1_name: a1
+    a1: !!python/tuple [default]
+    a2_name: a2
+    a2: !!python/tuple [default]
+    a3_name: a3
+    a3: !!python/tuple [default]
+    a4_name: a4
+    a4: !!python/tuple [default]
+    combination_filter: ''
+    # most common build invocation
+    cmd: ./contrib/jenkins.sh
+
+    repos:
+      - osmo-iuh
+      - osmo-gsm-manuals
+      - osmo-sip-connector
+      - osmocom-bb
+      - osmo-tetra
+
+      - osmo-hlr:
+          slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64]
+
+      - osmo-trx:
+          slave_axis: !!python/tuple [OsmocomBuild1]
+
+      - osmo-ggsn:
+          slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64]
+
+      - osmo-pcap:
+          slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64]
+
+      - libsmpp34:
+          slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64]
+
+      - openggsn:
+          slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64]
+
+      - libosmo-sccp:
+          slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64]
+
+      - libosmo-netif:
+          slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64]
+
+      - libosmo-abis:
+          slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64]
+
+      - libasn1c:
+          slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64]
+
+      - cellmgr-ng:
+          concurrent: true
+          cmd: >
+            docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \
+            -e IU="$IU" -e SMPP="$SMPP" -e MGCP="$MGCP" -w /build -i -u build -v $PWD:/build \
+            osmocom:amd64 /build/contrib/jenkins.sh'
+
+      - osmo-bsc:
+          cmd: >
+            docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \
+            -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build -i -u build \
+            -v "$PWD:/build" -v "$HOME/bin:/build_bin" \
+            osmocom:amd64 /build/contrib/jenkins.sh'
+
+      - osmo-gsm-tester:
+          slave_axis: !!python/tuple [OsmocomBuild1]
+          cmd: 'make deps; make check'
+
+      - osmo-bts:
+          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-next]
+          a2_name: BTS_MODEL
+          a2: !!python/tuple [sysmo, oct, trx, oct+trx, lc15]
+          combination_filter: >
+            FIRMWARE_VERSION == "master" ||
+            (FIRMWARE_VERSION == "femtobts_v2.7" && BTS_MODEL == "sysmo") ||
+            (FIRMWARE_VERSION == "superfemto_v2.4" && BTS_MODEL == "sysmo") ||
+            (FIRMWARE_VERSION == "superfemto_v3.0.1pre" && BTS_MODEL == "sysmo") ||
+            (FIRMWARE_VERSION == "superfemto_v3.1" && BTS_MODEL == "sysmo") ||
+            (FIRMWARE_VERSION == "superfemto_v5.1" && BTS_MODEL == "sysmo") ||
+            (FIRMWARE_VERSION == "v2017.01" && BTS_MODEL == "lc15") ||
+            (FIRMWARE_VERSION == "superfemto_v3.1" && BTS_MODEL == "lc15")
+          cmd: './contrib/jenkins_bts_model.sh "$BTS_MODEL"'
+
+      - openBSC:
+          a1_name: SMPP
+          a1: !!python/tuple [--enable-smpp]
+          a2_name: MGCP
+          a2: !!python/tuple [--enable-mgcp-transcoding, --disable-mgcp-transcoding]
+          a3_name: IU
+          a3: !!python/tuple [--disable-iu]
+          cmd: >
+            ARTIFACT_STORE="$HOME/jenkins_build_artifact_store"
+            mkdir -p "$ARTIFACT_STORE"
+
+            docker run --rm=true -e HOME=/build -e ARTIFACT_STORE=/artifact_store \
+              -e JOB_NAME="$JOB_NAME" -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \
+              -e IU="$IU" -e SMPP="$SMPP" -e MGCP="$MGCP" -e PATH="$PATH:/build_bin" \
+              -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build -i -u build -v "$PWD:/build" \
+              -v "$HOME/bin:/build_bin" -v "$ARTIFACT_STORE:/artifact_store" \
+              osmocom:amd64 /build/contrib/jenkins.sh
+
+      - libosmocore:
+          slave_axis: !!python/tuple [linux_amd64_debian8, FreeBSD_amd64]
+          a1_name: arch
+          a1: !!python/tuple [arm-none-eabi, amd64]
+          combination_filter: '!(arch=="arm-none-eabi" && label=="FreeBSD_amd64")'
+          cmd: >
+            if [[ "$JOB_NAME" == *"arch=arm-none-eabi,label=linux_amd64_debian8"* ]]; then
+              ./contrib/jenkins-arm.sh
+            else
+              ./contrib/jenkins.sh
+            fi
+
+      - osmo-mgw:
+          a1_name: MGCP
+          a1: !!python/tuple [--enable-mgcp-transcoding, --disable-mgcp-transcoding]
+          cmd: >
+            docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \
+              -e MGCP="$MGCP" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build \
+              -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \
+              osmocom:amd64 /build/contrib/jenkins.sh'
+
+      - osmo-msc:
+          a1_name: IU
+          a1: !!python/tuple [--enable-iu, --disable-iu]
+          cmd: >
+            ARTIFACT_STORE="$HOME/jenkins_build_artifact_store"
+            mkdir -p "$ARTIFACT_STORE"
+
+            docker run --rm=true -i -e HOME=/build -e ARTIFACT_STORE=/artifact_store \
+              -e JOB_NAME="$JOB_NAME" -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \
+              -e IU="$IU" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" \
+              -w /build -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \
+              osmocom:amd64 /build/contrib/jenkins.sh
+
+      - osmo-pcu:
+          a1_name: FIRMWARE_VERSION
+          a1: !!python/tuple [master, v2017.01, origin/nrw/litecell15-next]
+          a2_name: with_vty
+          a2: !!python/tuple [yes ,no]
+          a3_name: with_dsp
+          a3: !!python/tuple [sysmo, lc15, none]
+          combination_filter: >
+            (with_vty == "yes" && with_dsp == "sysmo" && FIRMWARE_VERSION=="master") ||
+            (with_vty == "yes" && with_dsp == "lc15" && FIRMWARE_VERSION=="master") ||
+            (with_vty == "yes" && with_dsp == "lc15" && FIRMWARE_VERSION=="v2017.01") ||
+            (with_vty == "yes" && with_dsp == "lc15" && FIRMWARE_VERSION=="origin/nrw/litecell15-next") ||
+            (with_vty == "no" && with_dsp == "none" && FIRMWARE_VERSION=="master")
+
+      - osmo-sgsn:
+          concurrent: true
+          a1_name: IU
+          a1: !!python/tuple [--enable-iu, --disable-iu]
+          cmd: >
+            docker run --rm=true -e HOME=/build -e MAKE=make -e PARALLEL_MAKE="$PARALLEL_MAKE" \
+              -e IU="$IU" -e PATH="$PATH:/build_bin" -e OSMOPY_DEBUG_TCP_SOCKETS="1" -w /build \
+              -i -u build -v "$PWD:/build" -v "$HOME/bin:/build_bin" \
+              osmocom:amd64 /build/contrib/jenkins.sh
+
+    jobs:
+      - '{repos}-gerrit'
+
+- job-template:
+    name: '{repos}-gerrit'
+    project-type: matrix
+    node: '{node}'
+    concurrent: '{obj:concurrent}'
+    disabled: '{obj:disabled}'
+    retry-count: 3 # scm checkout
+    build-discarder:
+      daysToKeep: 30
+      numToKeep: 120
+      artifactDaysToKeep: -1
+      artifactNumToKeep: -1
+    description: 'Pending reviews: https://gerrit.osmocom.org/#/q/status:open+project:{repos} '
+
+    execution-strategy:
+      combination-filter: |
+        {obj:combination_filter}
+    axes:
+      - axis:
+          type: slave
+          name: label
+          values: '{obj:slave_axis}'
+      - axis:
+          type: user-defined
+          name: '{obj:a1_name}'
+          values: '{obj:a1}'
+      - axis:
+          type: user-defined
+          name: '{obj:a2_name}'
+          values: '{obj:a2}'
+      - axis:
+          type: user-defined
+          name: '{obj:a3_name}'
+          values: '{obj:a3}'
+      - axis:
+          type: user-defined
+          name: '{obj:a4_name}'
+          values: '{obj:a4}'
+
+    scm:
+      - git:
+         url: ssh://jenkins@gerrit.osmocom.org:29418/{repos}
+         credentials-id: d5eda5e9-b59d-44ba-88d2-43473cb6e42d
+         branches:
+           - $GERRIT_BRANCH
+         choosing-strategy: gerrit
+         wipe-workspace: false
+         skip-tag: true
+         clean:
+           before: true
+
+    triggers:
+      - gerrit:
+          trigger-on:
+            - patchset-created-event
+          projects:
+            - project-compare-type: 'PLAIN'
+              project-pattern: '{repos}'
+              branches:
+                - branch-compare-type: 'ANT'
+                  branch-pattern: '**'
+          skip-vote:
+              successful: true
+              failed: true
+              unstable: true
+              notbuilt: true
+          silent: false
+          escape-quotes: false
+          no-name-and-email: false
+          trigger-for-unreviewed-patches: true
+          server-name: gerrit.osmocom.org
+
+    builders:
+      - shell: '{obj:cmd}'
+
+    publishers:
+       - warnings:
+           console-log-parsers:
+             - 'GNU C Compiler 4 (gcc)'
+           resolve-relative-paths: true
diff --git a/scripts/osmocom-nightly-nitb-split.yml b/jobs/osmocom-nightly-nitb-split.yml
similarity index 100%
rename from scripts/osmocom-nightly-nitb-split.yml
rename to jobs/osmocom-nightly-nitb-split.yml

-- 
To view, visit https://gerrit.osmocom.org/3911
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I04387367a6e2d737bfb50423c81a8908d3c2a89f
Gerrit-PatchSet: 7
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: André Boddenberg <dr.blobb at gmail.com>
Gerrit-Reviewer: André Boddenberg <dr.blobb at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Holger Freyther <holger at freyther.de>
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>



More information about the gerrit-log mailing list