]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-iscsi: new PR tox and branch trigger builders 1192/head
authorJason Dillaman <dillaman@redhat.com>
Sun, 4 Nov 2018 13:06:55 +0000 (08:06 -0500)
committerJason Dillaman <dillaman@redhat.com>
Sun, 4 Nov 2018 13:09:47 +0000 (08:09 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
ceph-iscsi-tox/build/build [new file with mode: 0644]
ceph-iscsi-tox/config/definitions/ceph-iscsi-tox.yml [new file with mode: 0644]
ceph-iscsi-trigger/config/definitions/ceph-iscsi-trigger.yml [new file with mode: 0644]

diff --git a/ceph-iscsi-tox/build/build b/ceph-iscsi-tox/build/build
new file mode 100644 (file)
index 0000000..8a97583
--- /dev/null
@@ -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 (file)
index 0000000..61c19de
--- /dev/null
@@ -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 (file)
index 0000000..e738b1a
--- /dev/null
@@ -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