From f9264ceef7d49044b39c9dd92b4881ec84def7bf Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Mon, 22 Jun 2015 15:27:56 -0500 Subject: [PATCH] Ports the teuthology-pull-requests job to JJB Signed-off-by: Andrew Schoen --- teuthology-pull-requests/build/build | 23 ++++++ .../definitions/teuthology-pull-requests.yml | 72 +++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 teuthology-pull-requests/build/build create mode 100644 teuthology-pull-requests/config/definitions/teuthology-pull-requests.yml diff --git a/teuthology-pull-requests/build/build b/teuthology-pull-requests/build/build new file mode 100644 index 00000000..061e65bc --- /dev/null +++ b/teuthology-pull-requests/build/build @@ -0,0 +1,23 @@ +#!/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 +tox -rv diff --git a/teuthology-pull-requests/config/definitions/teuthology-pull-requests.yml b/teuthology-pull-requests/config/definitions/teuthology-pull-requests.yml new file mode 100644 index 00000000..030b2bd3 --- /dev/null +++ b/teuthology-pull-requests/config/definitions/teuthology-pull-requests.yml @@ -0,0 +1,72 @@ +- job: + name: teuthology-pull-requests + node: trusty + project-type: freestyle + defaults: global + disabled: false + display-name: 'Teuthology: Pull Requests' + concurrent: false + quiet-period: 5 + block-downstream: false + block-upstream: false + retry-count: 3 + properties: + - github: + url: https://github.com/ceph/teuthology/ + logrotate: + daysToKeep: 15 + numToKeep: 30 + artifactDaysToKeep: -1 + artifactNumToKeep: -1 + + parameters: + - string: + name: sha1 + description: "A pull request ID, like 'origin/pr/72/head'" + + triggers: + - github-pull-request: + cron: '* * * * *' + admin-list: + - alfredodeza + - ktdreyer + - trhoden + - zmc + - andrewschoen + - dmick + org-list: + - ceph + white-list: + - jcsp + - gregsfortytwo + - GregMeno + - dzafman + - dillaman + - dachary + - liewegas + - idryomov + - vasukulkarni + trigger-phrase: '' + only-trigger-phrase: false + github-hooks: true + permit-all: false + auto-close-on-fail: false + + scm: + - git: + url: https://github.com/ceph/teuthology.git + branches: + - ${sha1} + refspec: +refs/pull/*:refs/remotes/origin/pr/* + browser: githubweb + browser-url: https://github.com/ceph/teuthology + timeout: 20 + skip-tag: true + wipe-workspace: false + + builders: + - shell: + !include-raw ../../build/build + + publishers: + - github-notifier -- 2.39.5