]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
initial take on ceph-qa-suite pull request support
authorAlfredo Deza <adeza@redhat.com>
Thu, 26 Feb 2015 18:10:59 +0000 (13:10 -0500)
committerAlfredo Deza <adeza@redhat.com>
Thu, 26 Feb 2015 18:10:59 +0000 (13:10 -0500)
Signed-off-by: Alfredo Deza <adeza@redhat.com>
ceph-qa-suite-pull-requests/build/build [new file with mode: 0644]
ceph-qa-suite-pull-requests/config/definitions/ceph-qa-suite-pull-requests.yml [new file with mode: 0644]

diff --git a/ceph-qa-suite-pull-requests/build/build b/ceph-qa-suite-pull-requests/build/build
new file mode 100644 (file)
index 0000000..5fba4e3
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+set -ex
+
+# Create the virtualenv
+virtualenv venv
+. venv/bin/activate
+
+# Define and ensure the PIP cache
+PIP_SDIST_INDEX="$HOME/.cache/pip"
+mkdir -p $PIP_SDIST_INDEX
+
+# Install the package by trying with the cache first, otherwise doing a download only, and then
+# trying to install from the cache again.
+if ! venv/bin/pip install --find-links="file://$PIP_SDIST_INDEX" --no-index tox; then
+    venv/bin/pip install --download-directory="$PIP_SDIST_INDEX" tox
+    venv/bin/pip install --find-links="file://$PIP_SDIST_INDEX" --no-index tox
+fi
+
+
+# run tox by recreating the environment and in verbose mode
+# by default this will run all environments defined, although currently
+# it is just flake8
+tox -rv
diff --git a/ceph-qa-suite-pull-requests/config/definitions/ceph-qa-suite-pull-requests.yml b/ceph-qa-suite-pull-requests/config/definitions/ceph-qa-suite-pull-requests.yml
new file mode 100644 (file)
index 0000000..d2c5091
--- /dev/null
@@ -0,0 +1,56 @@
+- job:
+    name: ceph-qa-suite-pull-requests
+    node: gitbuilder-cdep-deb-cloud-precise-amd64-basic
+    project-type: freestyle
+    defaults: global
+    disabled: false
+    display-name: 'ceph-qa-suite: Pull Requests'
+    concurrent: false
+    quiet-period: 5
+    block-downstream: false
+    block-upstream: false
+    retry-count: 3
+    properties:
+      - github:
+          url: https://github.com/ceph/ceph-qa-suite/
+    logrotate:
+      daysToKeep: 15
+      numToKeep: 30
+      artifactDaysToKeep: -1
+      artifactNumToKeep: -1
+
+    parameters:
+      - string:
+          name: sha1
+          description: "A pull request ID, like 'origin/pr/72/head'"
+
+    triggers:
+      - pollscm: "*/1 * * * *"
+      - github-pull-request:
+          cron: '* * * * *'
+          org-list:
+            - ceph
+          trigger-phrase: ''
+          only-trigger-phrase: false
+          github-hooks: true
+          permit-all: false
+          auto-close-on-fail: false
+
+    scm:
+      - git:
+          url: https://github.com/ceph/ceph-qa-suite.git
+          branches:
+            - ${sha1}
+          refspec: +refs/pull/*:refs/remotes/origin/pr/*
+          browser: githubweb
+          browser-url: https://github.com/ceph/ceph-qa-suite
+          timeout: 20
+          skip-tag: true
+          wipe-workspace: false
+
+    builders:
+      - shell:
+          !include-raw ../../build/build
+
+    publishers:
+      - github-notifier