From b274fa7b7fed0d2557c5a66168ea1a6cbf5fa81e Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Thu, 8 Nov 2018 15:08:25 +0100 Subject: [PATCH] ceph-ansible-pipeline: update pipeline matrix We must test corresponding ceph release for each stable branch of ceph-ansible. Signed-off-by: Guillaume Abrioux --- .../definitions/ceph-ansible-pipeline.yml | 216 ++++++++++++++++-- 1 file changed, 197 insertions(+), 19 deletions(-) diff --git a/ceph-ansible-pipeline/config/definitions/ceph-ansible-pipeline.yml b/ceph-ansible-pipeline/config/definitions/ceph-ansible-pipeline.yml index ebab6329..93645486 100644 --- a/ceph-ansible-pipeline/config/definitions/ceph-ansible-pipeline.yml +++ b/ceph-ansible-pipeline/config/definitions/ceph-ansible-pipeline.yml @@ -57,11 +57,15 @@ condition-command: | #!/bin/bash set -x - git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep 'infrastructure-playbooks/add-osd' - on-evaluation-failure: dont-run + # if the target branch is stable-3.2 we RUN these tests. + 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' + on-evaluation-failure: run steps: - multijob: - name: 'ceph-ansible purge playbook testing' + name: 'ceph-ansible add_osds playbook testing' condition: SUCCESSFUL execution-type: PARALLEL projects: @@ -74,7 +78,28 @@ condition-command: | #!/bin/bash set -x - # if the current branch is master then we don't run these tests + # if the target branch is stable-3.2 we RUN these tests. + 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' + on-evaluation-failure: run + steps: + - multijob: + name: 'ceph-ansible add_osds playbook testing' + condition: SUCCESSFUL + execution-type: PARALLEL + projects: + - name: 'ceph-ansible-prs-luminous-add_osds' + current-parameters: true + - name: 'ceph-ansible-prs-luminous-add_osds_container' + current-parameters: true + - conditional-step: + condition-kind: shell + condition-command: | + #!/bin/bash + set -x + # if the target branch is master then we DON'T RUN these tests. if [[ "$ghprbTargetBranch" == "master" ]]; then exit 1 fi @@ -103,8 +128,8 @@ condition-command: | #!/bin/bash set -x - # if the current branch is stable-3.0 or stable-3.1 then we don't run these tests - if [[ "$ghprbTargetBranch" == "stable-3.1" ]] || [[ "$ghprbTargetBranch" == "stable-3.0" ]]; then + # if the target branch is not master then we DON'T RUN these tests. + if [[ "$ghprbTargetBranch" != "master" ]]; then exit 1 fi git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep 'infrastructure-playbooks/purge' @@ -122,6 +147,10 @@ condition-command: | #!/bin/bash set -x + # if the target branch is not master then we DON'T RUN these tests. + if [[ "$ghprbTargetBranch" != "master" ]]; then + exit 1 + fi git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep 'infrastructure-playbooks/rolling_update' on-evaluation-failure: dont-run steps: @@ -139,6 +168,31 @@ condition-command: | #!/bin/bash set -x + # if the target branch is master then we DON'T RUN these tests. + if [[ "$ghprbTargetBranch" == "master" ]]; then + exit 1 + fi + git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep 'infrastructure-playbooks/rolling_update' + on-evaluation-failure: dont-run + steps: + - multijob: + name: 'ceph-ansible rolling_update playbook testing' + condition: SUCCESSFUL + execution-type: PARALLEL + projects: + - name: 'ceph-ansible-prs-luminous-update_cluster' + current-parameters: true + - name: 'ceph-ansible-prs-luminous-update_docker_cluster' + current-parameters: true + - conditional-step: + condition-kind: shell + condition-command: | + #!/bin/bash + set -x + # if the target branch is not master then we DON'T RUN these tests. + if [[ "$ghprbTargetBranch" != "master" ]]; then + exit 1 + fi git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep 'infrastructure-playbooks/shrink-mon' on-evaluation-failure: dont-run steps: @@ -156,7 +210,32 @@ condition-command: | #!/bin/bash set -x - git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep 'infrastructure-playbooks/shrink-osd' + # if the target branch is master then we DON'T RUN these tests. + if [[ "$ghprbTargetBranch" == "master" ]]; then + exit 1 + fi + git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep 'infrastructure-playbooks/shrink-mon' + on-evaluation-failure: dont-run + steps: + - multijob: + name: 'ceph-ansible shrink_mon playbook testing' + condition: SUCCESSFUL + execution-type: PARALLEL + projects: + - name: 'ceph-ansible-prs-luminous-shrink_mon' + current-parameters: true + - name: 'ceph-ansible-prs-luminous-shrink_mon_container' + current-parameters: true + - conditional-step: + condition-kind: shell + condition-command: | + #!/bin/bash + set -x + # if the target branch is not master then we DON'T RUN these tests. + 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/shrink-osd|tests/functional/centos/7/shrink_osd' on-evaluation-failure: dont-run steps: - multijob: @@ -173,6 +252,31 @@ condition-command: | #!/bin/bash set -x + # if the target branch is master then we DON'T RUN these tests. + 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/shrink-osd|tests/functional/centos/7/shrink_osd' + on-evaluation-failure: dont-run + steps: + - multijob: + name: 'ceph-ansible shrink_osd playbook testing' + condition: SUCCESSFUL + execution-type: PARALLEL + projects: + - name: 'ceph-ansible-prs-luminous-shrink_osd' + current-parameters: true + - name: 'ceph-ansible-prs-luminous-shrink_osd_container' + current-parameters: true + - conditional-step: + condition-kind: shell + condition-command: | + #!/bin/bash + set -x + # if the target branch is not master then we DON'T RUN these tests. + if [[ "$ghprbTargetBranch" != "master" ]]; 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' on-evaluation-failure: dont-run steps: @@ -188,7 +292,26 @@ condition-command: | #!/bin/bash set -x - # if the current branch is master then we don't run these tests + # if the target branch is master then we DON'T RUN these tests. + if [[ "$ghprbTargetBranch" == "master" ]]; 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' + on-evaluation-failure: dont-run + steps: + - multijob: + name: 'ceph-ansible switch_to_containers playbook testing' + condition: SUCCESSFUL + execution-type: PARALLEL + projects: + - name: 'ceph-ansible-prs-luminous-switch_to_containers' + current-parameters: true + - conditional-step: + condition-kind: shell + condition-command: | + #!/bin/bash + set -x + # if the target branch is master then we DON'T RUN these tests if [[ "$ghprbTargetBranch" == "master" ]]; then exit 1 fi @@ -210,16 +333,13 @@ current-parameters: true - name: 'ceph-ansible-prs-luminous-filestore_osds_non_container' current-parameters: true - - name: 'ceph-ansible-prs-dev-lvm_osds' - current-parameters: true - - conditional-step: condition-kind: shell condition-command: | #!/bin/bash set -x - # if the current branch is stable-3.0 or stable-3.1 then we don't run these tests - if [[ "$ghprbTargetBranch" == "stable-3.1" ]] || [[ "$ghprbTargetBranch" == "stable-3.0" ]]; then + # if the target branch is not master then we DON'T RUN these tests. + 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-defaults/tasks/facts.yml|roles/ceph-osd|ceph-validate|library/ceph_volume.py' @@ -242,18 +362,38 @@ current-parameters: true - name: 'ceph-ansible-prs-dev-lvm_batch_container' current-parameters: true - - conditional-step: condition-kind: shell condition-command: | #!/bin/bash set -x - # if the current branch is stable-3.0 or stable-3.1 then we don't run these tests - if [[ "$ghprbTargetBranch" == "stable-3.1" ]] || [[ "$ghprbTargetBranch" == "stable-3.0" ]]; then + # if the target branch is stable-3.2 then we RUN these tests. + 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' - on-evaluation-failure: dont-run + 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' + on-evaluation-failure: run + steps: + - multijob: + name: 'ceph-ansible rgw multisite scenarios playbook testing' + condition: SUCCESSFUL + execution-type: PARALLEL + projects: + - name: 'ceph-ansible-prs-luminous-rgw_multisite' + current-parameters: true + - name: 'ceph-ansible-prs-luminous-rgw_multisite_container' + current-parameters: true + - conditional-step: + condition-kind: shell + condition-command: | + #!/bin/bash + set -x + # if the target branch is master then we RUN these tests. + 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' + on-evaluation-failure: run steps: - multijob: name: 'ceph-ansible rgw multisite scenarios playbook testing' @@ -264,7 +404,6 @@ current-parameters: true - name: 'ceph-ansible-prs-dev-rgw_multisite_container' current-parameters: true - - conditional-step: condition-kind: shell condition-command: | @@ -281,6 +420,10 @@ echo "ceph-osd role modified, nothing to test, the ceph-osd role test is handled by another pipeline job." exit 1 fi + # if the target branch is not master then we DON'T RUN these tests. + if [[ "$ghprbTargetBranch" != "master" ]]; then + exit 1 + fi on-evaluation-failure: dont-run steps: - multijob: @@ -296,6 +439,41 @@ current-parameters: true - name: 'ceph-ansible-prs-dev-ooo_collocation' current-parameters: true + - conditional-step: + condition-kind: shell + condition-command: | + #!/bin/bash + set -x + git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -v 'infrastructure-playbooks' + if [ $? -eq 1 ]; then + echo "Infra playbooks modified. Not testing remaining scenarios." + exit 1 + fi + # do not run if roles/ceph-osd has been touched since the task above play osds already + git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -E 'roles/ceph-osd' + if [ $? -eq 0 ]; then + echo "ceph-osd role modified, nothing to test, the ceph-osd role test is handled by another pipeline job." + exit 1 + fi + # if the target branch is master then we DON'T RUN these tests. + if [[ "$ghprbTargetBranch" == "master" ]]; then + exit 1 + fi + on-evaluation-failure: dont-run + steps: + - multijob: + name: 'ceph-ansible basic cluster testing phase' + condition: SUCCESSFUL + execution-type: PARALLEL + projects: + - name: 'ceph-ansible-prs-luminous-centos7_cluster' + current-parameters: true + - name: 'ceph-ansible-prs-luminous-docker_cluster' + current-parameters: true + - name: 'ceph-ansible-prs-luminous-docker_cluster_collocation' + current-parameters: true + - name: 'ceph-ansible-prs-luminous-ooo_collocation' + current-parameters: true scm: - git: url: https://github.com/ceph/ceph-ansible.git -- 2.39.5