]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
Adds the ceph-ansible-prs-centos7-cluster job
authorAndrew Schoen <aschoen@redhat.com>
Tue, 22 Nov 2016 20:20:42 +0000 (14:20 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Tue, 22 Nov 2016 20:20:42 +0000 (14:20 -0600)
This runs the centos7-cluster functional testing scenario.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
ceph-ansible-prs-centos7-cluster/build/build [new file with mode: 0644]
ceph-ansible-prs-centos7-cluster/build/teardown [new file with mode: 0644]
ceph-ansible-prs-centos7-cluster/config/definitions/ceph-ansible-prs-centos7-cluster.yml [new file with mode: 0644]

diff --git a/ceph-ansible-prs-centos7-cluster/build/build b/ceph-ansible-prs-centos7-cluster/build/build
new file mode 100644 (file)
index 0000000..38c85a8
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# the following two methods exist in scripts/build_utils.sh
+pkgs=( "tox" )
+install_python_packages "pkgs[@]"
+
+# XXX this might not be needed
+source $VENV/activate
+
+$VENV/tox -rv -e=ansible2.2-centos7-cluster -- --provider=libvirt
diff --git a/ceph-ansible-prs-centos7-cluster/build/teardown b/ceph-ansible-prs-centos7-cluster/build/teardown
new file mode 100644 (file)
index 0000000..71026e6
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+# There has to be a better way to do this than this script which just looks
+# for every Vagrantfile in scenarios and then just destroys whatever is left.
+
+cd $WORKSPACE/tests
+
+scenarios=$(find . | grep Vagrantfile | xargs dirname)
+
+for scenario in $scenarios; do
+    cd $scenario
+    vagrant destroy -f
+    cd -
+done
diff --git a/ceph-ansible-prs-centos7-cluster/config/definitions/ceph-ansible-prs-centos7-cluster.yml b/ceph-ansible-prs-centos7-cluster/config/definitions/ceph-ansible-prs-centos7-cluster.yml
new file mode 100644 (file)
index 0000000..be9e16f
--- /dev/null
@@ -0,0 +1,62 @@
+- job:
+    name: ceph-ansible-prs-centos7-cluster
+    node: vagrant&&ceph-ansible
+    concurrent: true
+    defaults: global
+    display-name: 'ceph-ansible: Pull Requests [centos7-cluster]'
+    quiet-period: 5
+    block-downstream: false
+    block-upstream: false
+    retry-count: 3
+    properties:
+      - github:
+          url: https://github.com/ceph/ceph-ansible
+    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:
+          allow-whitelist-orgs-as-admins: true
+          org-list:
+            - ceph
+          trigger-phrase: 'jenkins test centos7-cluster'
+          only-trigger-phrase: false
+          github-hooks: true
+          permit-all: true
+          auto-close-on-fail: false
+          status-context: "Testing: centos7-cluster"
+          started-status: "Running: centos7-cluster"
+          success-status: "OK - centos7-cluster"
+          failure-status: "FAIL - centos7-cluster"
+
+    scm:
+      - git:
+          url: https://github.com/ceph/ceph-ansible.git
+          branches:
+            - ${sha1}
+          refspec: +refs/pull/*:refs/remotes/origin/pr/*
+          browser: auto
+          timeout: 20
+          skip-tag: true
+          wipe-workspace: false
+
+    builders:
+      - shell:
+          !include-raw:
+            - ../../../scripts/build_utils.sh
+            - ../../build/build
+
+    publishers:
+      - postbuildscript:
+          script-only-if-succeeded: False
+          script-only-if-failed: True
+          builders:
+            - shell: !include-raw ../../build/teardown