]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-*-trigger: do not build new branches on trusty 931/head
authorKefu Chai <kchai@redhat.com>
Thu, 7 Dec 2017 10:32:21 +0000 (18:32 +0800)
committerKefu Chai <tchaikov@gmail.com>
Fri, 8 Dec 2017 03:06:10 +0000 (11:06 +0800)
by "new branches", i mean any branch whose name does not contain
"jewel" or "luminous".

see
https://docs.openstack.org/infra/jenkins-job-builder/builders.html#builders.conditional-step
and https://wiki.jenkins.io/display/JENKINS/Conditional+BuildStep+Plugin

Signed-off-by: Kefu Chai <kchai@redhat.com>
ceph-dev-new-trigger/config/definitions/ceph-dev-new-trigger.yml
ceph-dev-trigger/config/definitions/ceph-dev-trigger.yml

index 98d58c46a481790518ba9d134642f8fbc7c03b71..951b9b10ae6fd2b4bf145571a384f3211d5e0f7b 100644 (file)
           wipe-workspace: true
 
     builders:
-      - shell:
-          !include-raw:
-            - ../../../scripts/build_utils.sh
-            - ../../build/notify
-      - trigger-builds:
-        - project: 'ceph-dev-new'
-          predefined-parameters: |
-            BRANCH=${GIT_BRANCH}
-            FORCE=True
-        - project: 'ceph-dev-new'
-          predefined-parameters: |
-            BRANCH=${GIT_BRANCH}
-            FORCE=True
-            FLAVOR=notcmalloc
+      - conditional-step:
+          condition-kind: regex-match
+          regex: .*(jewel|luminous).*
+          label: '${GIT_BRANCH}'
+          on-evaluation-failure: dont-run
+          steps:
+            - shell:
+                !include-raw:
+                - ../../../scripts/build_utils.sh
+                - ../../build/notify
+            - trigger-builds:
+                - project: 'ceph-dev-new'
+                  predefined-parameters: |
+                    BRANCH=${GIT_BRANCH}
+                    FORCE=True
+                - project: 'ceph-dev-new'
+                  predefined-parameters: |
+                    BRANCH=${GIT_BRANCH}
+                    FORCE=True
+      - conditional-step:
+          condition-kind: shell
+          condition-command: |
+            echo "${GIT_BRANCH}" | grep -v '\(jewel\|luminous\)'
+          on-evaluation-failure: dont-run
+          steps:
+            - shell:
+                !include-raw:
+                - ../../../scripts/build_utils.sh
+                - ../../build/notify
+            - trigger-builds:
+                - project: 'ceph-dev-new'
+                  predefined-parameters: |
+                    BRANCH=${GIT_BRANCH}
+                    FORCE=True
+                    DISTROS="xenial centos7"
+                - project: 'ceph-dev-new'
+                  predefined-parameters: |
+                    BRANCH=${GIT_BRANCH}
+                    FORCE=True
+                    DISTROS="xenial centos7"
+                    FLAVOR=notcmalloc
 
     wrappers:
       - inject-passwords:
index 43f17381e05d9717e1bcb8b83d712ecc189a0245..b6a73698dc3d774e692e9b9cf2652d8e152ccd90 100644 (file)
           wipe-workspace: true
 
     builders:
-      - shell:
-          !include-raw:
-            - ../../../scripts/build_utils.sh
-            - ../../build/notify
-      - trigger-builds:
-        - project: 'ceph-dev'
-          predefined-parameters: |
-            BRANCH=${GIT_BRANCH}
-            FORCE=True
-        - project: 'ceph-dev'
-          predefined-parameters: |
-            BRANCH=${GIT_BRANCH}
-            FORCE=True
-            FLAVOR=notcmalloc
+      - conditional-step:
+          condition-kind: regex-match
+          regex: .*(jewel|luminous).*
+          label: '${GIT_BRANCH}'
+          on-evaluation-failure: dont-run
+          steps:
+            - shell:
+                !include-raw:
+                - ../../../scripts/build_utils.sh
+                - ../../build/notify
+            - trigger-builds:
+                - project: 'ceph-dev'
+                  predefined-parameters: |
+                    BRANCH=${GIT_BRANCH}
+                    FORCE=True
+                - project: 'ceph-dev'
+                  predefined-parameters: |
+                    BRANCH=${GIT_BRANCH}
+                    FORCE=True
+      - conditional-step:
+          condition-kind: shell
+          condition-command: |
+            echo "${GIT_BRANCH}" | grep -v '\(jewel\|luminous\)'
+          on-evaluation-failure: dont-run
+          steps:
+            - shell:
+                !include-raw:
+                - ../../../scripts/build_utils.sh
+                - ../../build/notify
+            - trigger-builds:
+                - project: 'ceph-dev'
+                  predefined-parameters: |
+                    BRANCH=${GIT_BRANCH}
+                    FORCE=True
+                    DISTROS="xenial centos7"
+                - project: 'ceph-dev'
+                  predefined-parameters: |
+                    BRANCH=${GIT_BRANCH}
+                    FORCE=True
+                    DISTROS="xenial centos7"
+                    FLAVOR=notcmalloc
 
     wrappers:
       - inject-passwords: