]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-ansible-prs: add testing for stable-2.2 915/head
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 14 Nov 2017 16:17:39 +0000 (17:17 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Wed, 15 Nov 2017 04:29:34 +0000 (05:29 +0100)
When submitting a backport PR to stable-2.2 branch, the jobs that are
auto triggered don't exist in job templates because they have changed
between `stable-2.2` and `stable-3.0`

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
ceph-ansible-prs/config/definitions/ceph-ansible-prs.yml

index 9d18b9987860c8a920d6effc6f15afc5edafb7f9..1718f255f9272e3cbb33e8f750628469c37c5ea2 100644 (file)
     jobs:
         - 'ceph-ansible-prs-auto'
 
+- project:
+    name: ceph-ansible-2.2-prs
+    slave_labels: 'vagrant && libvirt && smithi'
+    release:
+      - jewel
+    ansible_version:
+      - ansible2.4
+    scenario:
+      - centos7_cluster
+      - xenial_cluster
+      - docker_cluster
+    jobs:
+        - 'ceph-ansible-2.2-prs'
+
 # tests that will not auto start when a PR is created, but
 # they can be requested with a trigger phrase. Run on smithi.
 - project:
     jobs:
       - 'ceph-ansible-prs-trigger'
 
+- job-template:
+    name: 'ceph-ansible-prs-{release}-{ansible_version}-{scenario}'
+    id: 'ceph-ansible-2.2-prs'
+    node: '{slave_labels}'
+    concurrent: true
+    defaults: global
+    display-name: 'ceph-ansible: Pull Requests [{release}-{ansible_version}-{scenario}]'
+    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: -1
+      artifactDaysToKeep: -1
+      artifactNumToKeep: -1
+
+    parameters:
+      - string:
+          name: sha1
+          description: "A pull request ID, like 'origin/pr/72/head'"
+
+    triggers:
+      - github-pull-request:
+          cancel-builds-on-update: true
+          allow-whitelist-orgs-as-admins: true
+          org-list:
+            - ceph
+          skip-build-phrase: '^jenkins do not test.*'
+          trigger-phrase: '^jenkins test stable-2.2 {release}-{ansible_version}-{scenario}|jenkins test all stable-2.2.*'
+          only-trigger-phrase: true
+          github-hooks: false
+          permit-all: true
+          auto-close-on-fail: false
+          status-context: "Testing: {release}-{ansible_version}-{scenario}"
+          started-status: "Running: {release}-{ansible_version}-{scenario}"
+          success-status: "OK - {release}-{ansible_version}-{scenario}"
+          failure-status: "FAIL - {release}-{ansible_version}-{scenario}"
+
+    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:
+      - inject:
+          properties-content: |
+            SCENARIO={scenario}
+            RELEASE={release}
+            ANSIBLE_VERSION={ansible_version}
+      - shell:
+          !include-raw-escape:
+            - ../../../scripts/build_utils.sh
+            - ../../build/build
+
+    publishers:
+      - postbuildscript:
+          script-only-if-succeeded: False
+          script-only-if-failed: True
+          builders:
+            - shell: !include-raw ../../build/teardown
+
 - job-template:
     name: 'ceph-ansible-prs-{release}-{ansible_version}-{scenario}'
     id: 'ceph-ansible-prs-auto'