]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-ansible: use a more meaning syntax on branch 1293/head
authorDimitri Savineau <dsavinea@redhat.com>
Thu, 2 May 2019 15:59:30 +0000 (11:59 -0400)
committerDimitri Savineau <dsavinea@redhat.com>
Thu, 2 May 2019 15:59:30 +0000 (11:59 -0400)
When doing condition on branch it's maybe easier to understand the
condition based on the branch name instead of a regex for excluding
all the other branches.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
ceph-ansible-pipeline/config/definitions/ceph-ansible-pipeline.yml

index 5cfd3dd33ef57b1356748fa9819cbc6910db383b..4d8fbcede604ae56c11719e673ec0fc85914231c 100644 (file)
             #!/bin/bash
             set -x
             # if the target branch is not stable-4.0 then we DON'T RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ stable-3.[0-2]|master ]]; then
+            if [[ "$ghprbTargetBranch" != "stable-4.0" ]]; then
               exit 1
             fi
           on-evaluation-failure: dont-run
             #!/bin/bash
             set -x
             # if the target branch is master we RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ "stable-" ]]; then
+            if [[ "$ghprbTargetBranch" != "master" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -E 'infrastructure-playbooks/add-osd|tests/functional/centos/7/add-osds'
             #!/bin/bash
             set -x
             # if the target branch is stable-3.2 we RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ stable-3.[0-1]|stable-4.0|master ]]; then
+            if [[ "$ghprbTargetBranch" != "stable-3.2" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -E 'infrastructure-playbooks/add-osd|tests/functional/centos/7/add-osds'
             #!/bin/bash
             set -x
             # if the target branch is stable-4.0 we RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ stable-3.[0-2]|master ]]; then
+            if [[ "$ghprbTargetBranch" != "stable-4.0" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -E 'infrastructure-playbooks/add-osd|tests/functional/centos/7/add-osds'
             #!/bin/bash
             set -x
             # if the target branch is master we RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ "stable-" ]]; then
+            if [[ "$ghprbTargetBranch" != "master" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -E 'infrastructure-playbooks/add-mon|tests/functional/add-mons'
             #!/bin/bash
             set -x
             # if the target branch is stable-4.0 we RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ stable-3.[0-2]|master ]]; then
+            if [[ "$ghprbTargetBranch" != "stable-4.0" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -E 'infrastructure-playbooks/add-mon|tests/functional/add-mons'
             #!/bin/bash
             set -x
             # if the target branch is master we RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ "stable-" ]]; then
+            if [[ "$ghprbTargetBranch" != "master" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -E 'tests/functional/add-mgrs'
             #!/bin/bash
             set -x
             # if the target branch is stable-4.0 we RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ stable-3.[0-2]|master ]]; then
+            if [[ "$ghprbTargetBranch" != "stable-4.0" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -E 'tests/functional/add-mgrs'
             #!/bin/bash
             set -x
             # if the target branch is master we RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ "stable-" ]]; then
+            if [[ "$ghprbTargetBranch" != "master" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -E 'infrastructure-playbooks/add-mon|tests/functional/add-mdss'
             #!/bin/bash
             set -x
             # if the target branch is master we RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ "stable-" ]]; then
+            if [[ "$ghprbTargetBranch" != "master" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -E 'tests/functional/add-rgws'
             #!/bin/bash
             set -x
             # if the target branch is stable-4.0 we RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ stable-3.[0-2]|master ]]; then
+            if [[ "$ghprbTargetBranch" != "stable-4.0" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -E 'tests/functional/add-rgws'
             #!/bin/bash
             set -x
             # if the target branch is master we RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ "stable-" ]]; then
+            if [[ "$ghprbTargetBranch" != "master" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -E 'tests/functional/add-rbdmirrors'
             #!/bin/bash
             set -x
             # if the target branch is stable-4.0 we RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ stable-3.[0-2]|master ]]; then
+            if [[ "$ghprbTargetBranch" != "stable-4.0" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -E 'tests/functional/add-rbdmirrors'
             #!/bin/bash
             set -x
             # if the target branch is master or stable-4.0 then we DON'T RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ stable-4.0|master ]]; then
+            if [[ "$ghprbTargetBranch" != "stable-3.2" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep 'infrastructure-playbooks/purge-docker-cluster.yml'
             #!/bin/bash
             set -x
             # if the target branch is master or stable-4.0 then we DON'T RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ stable-4.0|master ]]; then
+            if [[ "$ghprbTargetBranch" != "stable-3.2" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep 'infrastructure-playbooks/purge-cluster.yml'
             #!/bin/bash
             set -x
             # if the target branch is master or stable-4.0 then we DON'T RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ stable-4.0|master ]]; then
+            if [[ "$ghprbTargetBranch" != "stable-3.2" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep 'infrastructure-playbooks/rolling_update'
             #!/bin/bash
             set -x
             # if the target branch is master or stable-4.0 then we DON'T RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ stable-4.0|master ]]; then
+            if [[ "$ghprbTargetBranch" != "stable-3.2" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep 'infrastructure-playbooks/shrink-mon'
             #!/bin/bash
             set -x
             # if the target branch is master or stable-4.0 then we DON'T RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ stable-4.0|master ]]; then
+            if [[ "$ghprbTargetBranch" != "stable-3.2" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -E 'infrastructure-playbooks/shrink-osd|tests/functional/centos/7/shrink_osd'
             #!/bin/bash
             set -x
             # if the target branch is master or stable-4.0 then we DON'T RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ stable-4.0|master ]]; then
+            if [[ "$ghprbTargetBranch" != "stable-3.2" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep 'infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons'
             #!/bin/bash
             set -x
             # if the target branch is stable-3.2 then we RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ stable-3.[0-1]|stable-4.0|master ]]; then
+            if [[ "$ghprbTargetBranch" != "stable-3.2" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -E 'roles/ceph-rgw/tasks/multisite|tests/functional/centos/7/rgw-multisite'
             #!/bin/bash
             set -x
             # if the target branch is stable-4.0 then we RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ stable-3.[0-2]|master ]]; then
+            if [[ "$ghprbTargetBranch" != "stable-4.0" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -E 'roles/ceph-rgw/tasks/multisite|tests/functional/centos/7/rgw-multisite'
             #!/bin/bash
             set -x
             # if the target branch is master then we RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ "stable-" ]]; then
+            if [[ "$ghprbTargetBranch" != "master" ]]; then
               exit 1
             fi
             git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -E 'roles/ceph-rgw/tasks/multisite|tests/functional/centos/7/rgw-multisite'
               exit 1
             fi
             # if the target branch is master or stable-4.0 then we DON'T RUN these tests.
-            if [[ "$ghprbTargetBranch" =~ stable-4.0|master ]]; then
+            if [[ "$ghprbTargetBranch" != "stable-3.2" ]]; then
               exit 1
             fi
           on-evaluation-failure: dont-run