--- /dev/null
+#!/bin/bash
+
+# the following two methods exist in scripts/build_utils.sh
+pkgs=( "tox" )
+install_python_packages "pkgs[@]"
+
+cd "$WORKSPACE/ceph-iscsi"
+
+$VENV/tox -rv
--- /dev/null
+- scm:
+ name: ceph-iscsi
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph-iscsi.git
+ branches:
+ - ${sha1}
+ refspec: +refs/pull/*:refs/remotes/origin/pr/*
+ browser: auto
+ timeout: 20
+ skip-tag: true
+ wipe-workspace: true
+ basedir: "ceph-iscsi"
+
+- job:
+ name: ceph-iscsi-tox
+ description: Runs tox tests for ceph-iscsi on each GitHub PR
+ project-type: freestyle
+ node: python3
+ block-downstream: false
+ block-upstream: false
+ defaults: global
+ display-name: 'ceph-iscsi: tox'
+ quiet-period: 5
+ retry-count: 3
+
+ properties:
+ - build-discarder:
+ days-to-keep: 15
+ num-to-keep: 30
+ artifact-days-to-keep: 15
+ artifact-num-to-keep: 15
+ - github:
+ url: https://github.com/ceph/ceph-iscsi/
+
+ parameters:
+ - string:
+ name: sha1
+ description: "A pull request ID, like 'origin/pr/72/head'"
+
+ triggers:
+ - github-pull-request:
+ admin-list:
+ - dillaman
+ org-list:
+ - ceph
+ trigger-phrase: 'jenkins tox'
+ only-trigger-phrase: false
+ github-hooks: true
+ permit-all: true
+ auto-close-on-fail: false
+ status-context: "tox"
+
+ scm:
+ - ceph-iscsi
+
+ builders:
+ - shell:
+ !include-raw:
+ - ../../../scripts/build_utils.sh
+ - ../../build/build
--- /dev/null
+- job:
+ name: ceph-iscsi-trigger
+ node: master
+ project-type: freestyle
+ defaults: global
+ quiet-period: 5
+ block-downstream: false
+ block-upstream: false
+ properties:
+ - build-discarder:
+ days-to-keep: 1
+ num-to-keep: 10
+ artifact-days-to-keep: -1
+ artifact-num-to-keep: -1
+ - github:
+ url: https://github.com/ceph/ceph-iscsi
+ discard-old-builds: true
+
+ triggers:
+ - github
+
+ scm:
+ - git:
+ url: https://github.com/ceph/ceph-iscsi.git
+ branches:
+ - 'origin/master*'
+ - 'origin/wip*'
+ skip-tag: true
+ timeout: 20
+ wipe-workspace: true
+
+ builders:
+ - trigger-builds:
+ - project: 'ceph-iscsi'
+ predefined-parameters: |
+ BRANCH=${GIT_BRANCH}
+ FORCE=True