Review at https://gerrit.osmocom.org/7021
jenkins: add osmo-gsm-tester_run-{prod,rnd} Both jobs doing the actual test run on the prod or rnd tester. Change-Id: Ic1c4babc547f48402b0bcfaf38e2734e87e565f0 --- M jobs/osmo-gsm-tester.yml A jobs/osmo-gsm-tester_run-prod.sh A jobs/osmo-gsm-tester_run-rnd.sh 3 files changed, 151 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/21/7021/1 diff --git a/jobs/osmo-gsm-tester.yml b/jobs/osmo-gsm-tester.yml index f25299d..0380f13 100644 --- a/jobs/osmo-gsm-tester.yml +++ b/jobs/osmo-gsm-tester.yml @@ -1,6 +1,5 @@ --- #TODO: -# - run # - trigger # - gerrit # - manual-run @@ -107,6 +106,18 @@ skip-tag: true basedir: osmo-gsm-tester +- scm: + name: osmo-gsm-tester-repo-clean + scm: + - git: + url: git://git.osmocom.org/osmo-gsm-tester + branches: + - ${OSMO_GSM_TESTER_BRANCH} + wipe-workspace: false + skip-tag: true + basedir: osmo-gsm-tester + clean: true + ## trigger build job - job: name: 'osmo-gsm-tester_build-trigger-all' @@ -117,3 +128,110 @@ # hopefully the trigger will support lists in the future - trigger: project: 'osmo-gsm-tester_build-osmo-bsc,osmo-gsm-tester_build-osmo-bts,osmo-gsm-tester_build-osmo-ggsn,osmo-gsm-tester_build-osmo-hlr,osmo-gsm-tester_build-osmo-mgw,osmo-gsm-tester_build-osmo-msc,osmo-gsm-tester_build-osmo-pcu,osmo-gsm-tester_build-osmo-sgsn,osmo-gsm-tester_build-osmo-trx,osmo-gsm-tester_build-osmo-nitb,osmo-gsm-tester_build-osmo-stp,osmo-gsm-tester_build-osmo-bts-sysmo,osmo-gsm-tester_build-osmo-pcu-sysmo' + +## run jobs +- project: + name: osmo-gsm-testers-runners + stage: + - prod + - rnd: + node: 'osmo-gsm-tester-rnd' + jobs: + - 'osmo-gsm-tester_run-{stage}' + +- builder: + name: osmo_gsm_copy_artifact + builders: + - copyartifact: + project: '{repo}' + filter: '*.tgz, *.md5' + which-build: last-successful + stable: true + +# all artefact in one place +- builder: + name: osmo_gsm_copy_artifact_all + builders: + - osmo_gsm_copy_artifact: + repo: osmo-gsm-tester_build-osmo-bsc + - osmo_gsm_copy_artifact: + repo: osmo-gsm-tester_build-osmo-bts + - osmo_gsm_copy_artifact: + repo: osmo-gsm-tester_build-osmo-ggsn + - osmo_gsm_copy_artifact: + repo: osmo-gsm-tester_build-osmo-hlr + - osmo_gsm_copy_artifact: + repo: osmo-gsm-tester_build-osmo-mgw + - osmo_gsm_copy_artifact: + repo: osmo-gsm-tester_build-osmo-msc + - osmo_gsm_copy_artifact: + repo: osmo-gsm-tester_build-osmo-pcu + - osmo_gsm_copy_artifact: + repo: osmo-gsm-tester_build-osmo-sgsn + - osmo_gsm_copy_artifact: + repo: osmo-gsm-tester_build-osmo-trx + - osmo_gsm_copy_artifact: + repo: osmo-gsm-tester_build-osmo-nitb + - osmo_gsm_copy_artifact: + repo: osmo-gsm-tester_build-osmo-stp + - osmo_gsm_copy_artifact: + repo: osmo-gsm-tester_build-osmo-bts-sysmo + - osmo_gsm_copy_artifact: + repo: osmo-gsm-tester_build-osmo-pcu-sysmo + +- defaults: + name: runners + description: 'Run an actual GSM hardware test using the binaries from the osmo-gsm-tester_build* jobs' + node: 'osmo-gsm-tester-prod' + project-type: freestyle + properties: + - build-discarder: + num-to-keep: 60 + parameters: + - string: + name: "OSMO_GSM_TESTER_BRANCH" + default: "origin/master" + description: "Which branch/sha should be used for testing" + - string: + name: "OSMO_GSM_TESTER_OPTS" + default: "" + description: "pass additional command line options to osmo-gsm-tester.py, e.g. to select specific suites:scenarios. Default: leave empty." + +- job-template: + name: 'osmo-gsm-tester_run-{stage}' + defaults: runners + triggers: + - timed: "H H/2 * * *" + - pollscm: + cron: "H/5 * * * *" + - reverse: + jobs: + - osmo-gsm-tester_build-osmo-bsc + - osmo-gsm-tester_build-osmo-bts + - osmo-gsm-tester_build-osmo-ggsn + - osmo-gsm-tester_build-osmo-hlr + - osmo-gsm-tester_build-osmo-mgw + - osmo-gsm-tester_build-osmo-msc + - osmo-gsm-tester_build-osmo-pcu + - osmo-gsm-tester_build-osmo-sgsn + - osmo-gsm-tester_build-osmo-trx + - osmo-gsm-tester_build-osmo-nitb + - osmo-gsm-tester_build-osmo-stp + - osmo-gsm-tester_build-osmo-bts-sysmo + - osmo-gsm-tester_build-osmo-pcu-sysmo + builders: + - osmo_gsm_copy_artifact_all + - shell: !include-raw osmo-gsm-tester_run-{stage}.sh + publishers: + - archive: + artifacts: '*-run.tgz, *-bin.tgz' + only-if-success: 'true' + default-excludes: false + - junit: + results: 'trial-*/last_run/trial-*.xml' + allow-empty-results: true + - email: + recipients: 'pes...@sysmocom.de' + notify-every-unstable-build: true + scm: + - 'osmo-gsm-tester-repo-clean' diff --git a/jobs/osmo-gsm-tester_run-prod.sh b/jobs/osmo-gsm-tester_run-prod.sh new file mode 100644 index 0000000..0764096 --- /dev/null +++ b/jobs/osmo-gsm-tester_run-prod.sh @@ -0,0 +1,21 @@ +#!/bin/sh +set -e -x + +# On our hardware, we actually use the example configuration as-is. +export OSMO_GSM_TESTER_CONF="$PWD/osmo-gsm-tester/example" + +# debug: provoke a failure +#export OSMO_GSM_TESTER_OPTS="-s debug -t fail" + +# TMP fix: prod main unit has sierra_2 and _3 instead of _1 and _2 +sed -i "s#/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1.6#/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1.7/1-1.7.6#g" "$OSMO_GSM_TESTER_CONF/resources.conf" +sed -i "s#/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1.5#/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1.7/1-1.7.5#g" "$OSMO_GSM_TESTER_CONF/resources.conf" +sed -i "s#/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1.3#/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1.7/1-1.7.3#g" "$OSMO_GSM_TESTER_CONF/resources.conf" +sed -i "s#/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1.2#/sys/devices/pci0000:00/0000:00:12.2/usb1/1-1/1-1.7/1-1.7.2#g" "$OSMO_GSM_TESTER_CONF/resources.conf" +sed -i "s#901700000009031#901700000015252#g" "$OSMO_GSM_TESTER_CONF/resources.conf" +sed -i "s#901700000009029#901700000015253#g" "$OSMO_GSM_TESTER_CONF/resources.conf" +sed -i "s#80A37E6FDEA931EAC92FFA5F671EFEAD#EBAB63D06C3F546A16C977CB40E57C68#g" "$OSMO_GSM_TESTER_CONF/resources.conf" +sed -i "s#00969E283349D354A8239E877F2E0866#EBD2B5F6CF3374106D0A66C11F922001#g" "$OSMO_GSM_TESTER_CONF/resources.conf" + +PATH="$PWD/osmo-gsm-tester/src:$PATH" \ + ./osmo-gsm-tester/contrib/jenkins-run.sh diff --git a/jobs/osmo-gsm-tester_run-rnd.sh b/jobs/osmo-gsm-tester_run-rnd.sh new file mode 100644 index 0000000..6ba3622 --- /dev/null +++ b/jobs/osmo-gsm-tester_run-rnd.sh @@ -0,0 +1,11 @@ +#!/bin/sh +set -e -x + +# On our hardware, we actually use the example configuration as-is. +export OSMO_GSM_TESTER_CONF="$PWD/osmo-gsm-tester/example" + +# debug: provoke a failure +#export OSMO_GSM_TESTER_OPTS="-s debug -t fail" + +PATH="$PWD/osmo-gsm-tester/src:$PATH" \ + ./osmo-gsm-tester/contrib/jenkins-run.sh -- To view, visit https://gerrit.osmocom.org/7021 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic1c4babc547f48402b0bcfaf38e2734e87e565f0 Gerrit-PatchSet: 1 Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Owner: lynxis lazus <lyn...@fe80.eu>