From: Jason Dillaman Date: Sun, 4 Nov 2018 13:06:55 +0000 (-0500) Subject: ceph-iscsi: new PR tox and branch trigger builders X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=4138460e0a1587e839eed34f8557c64d6f0ed22e;p=ceph-build.git ceph-iscsi: new PR tox and branch trigger builders Signed-off-by: Jason Dillaman --- diff --git a/ceph-iscsi-tox/build/build b/ceph-iscsi-tox/build/build new file mode 100644 index 00000000..8a97583d --- /dev/null +++ b/ceph-iscsi-tox/build/build @@ -0,0 +1,9 @@ +#!/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 diff --git a/ceph-iscsi-tox/config/definitions/ceph-iscsi-tox.yml b/ceph-iscsi-tox/config/definitions/ceph-iscsi-tox.yml new file mode 100644 index 00000000..61c19def --- /dev/null +++ b/ceph-iscsi-tox/config/definitions/ceph-iscsi-tox.yml @@ -0,0 +1,61 @@ +- 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 diff --git a/ceph-iscsi-trigger/config/definitions/ceph-iscsi-trigger.yml b/ceph-iscsi-trigger/config/definitions/ceph-iscsi-trigger.yml new file mode 100644 index 00000000..e738b1ac --- /dev/null +++ b/ceph-iscsi-trigger/config/definitions/ceph-iscsi-trigger.yml @@ -0,0 +1,37 @@ +- 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