From e1421cb025a50ff2e43a151b2432b6bca5c97658 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 26 Mar 2019 11:04:11 +0100 Subject: [PATCH] ceph-ansible-prs: run all jobs for all PRs ceph-ansible is missing a lot of coverage because we don't run all jobs on every PR. Signed-off-by: Guillaume Abrioux --- .../definitions/ceph-ansible-pipeline.yml | 224 ++++++------------ 1 file changed, 70 insertions(+), 154 deletions(-) diff --git a/ceph-ansible-pipeline/config/definitions/ceph-ansible-pipeline.yml b/ceph-ansible-pipeline/config/definitions/ceph-ansible-pipeline.yml index 21c50b88..c7e9580f 100644 --- a/ceph-ansible-pipeline/config/definitions/ceph-ansible-pipeline.yml +++ b/ceph-ansible-pipeline/config/definitions/ceph-ansible-pipeline.yml @@ -52,6 +52,76 @@ current-parameters: true - name: ceph-ansible-pr-syntax-check current-parameters: true + - conditional-step: + condition-kind: shell + condition-command: | + # 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: + name: 'ceph-ansible cluster first testing phase' + condition: SUCCESSFUL + execution-type: PARALLEL + projects: + - name: 'ceph-ansible-prs-dev-centos-non_container-all_daemons' + current-parameters: true + - name: 'ceph-ansible-prs-dev-centos-container-all_daemons' + current-parameters: true + - name: 'ceph-ansible-prs-dev-centos-non_container-lvm_osds' + current-parameters: true + - name: 'ceph-ansible-prs-dev-centos-container-lvm_osds' + current-parameters: true + - name: 'ceph-ansible-prs-dev-ubuntu-non_container-all_daemons' + current-parameters: true + - name: 'ceph-ansible-prs-dev-ubuntu-container-all_daemons' + current-parameters: true + - name: 'ceph-ansible-prs-dev-rhel-container-podman' + current-parameters: true + - multijob: + name: 'ceph-ansible cluster second testing phase' + condition: SUCCESSFUL + execution-type: PARALLEL + projects: + - name: 'ceph-ansible-prs-dev-centos-non_container-purge' + current-parameters: true + - name: 'ceph-ansible-prs-dev-ubuntu-non_container-purge' + current-parameters: true + - name: 'ceph-ansible-prs-dev-centos-container-purge' + current-parameters: true + - name: 'ceph-ansible-prs-dev-ubuntu-container-purge' + current-parameters: true + - name: 'ceph-ansible-prs-dev-centos-non_container-switch_to_containers' + current-parameters: true + - name: 'ceph-ansible-prs-dev-centos-non_container-update' + current-parameters: true + - name: 'ceph-ansible-prs-dev-centos-container-update' + current-parameters: true + - name: 'ceph-ansible-prs-dev-centos-non_container-storage_inventory' + current-parameters: true + - name: 'ceph-ansible-prs-dev-centos-container-storage_inventory' + current-parameters: true + - multijob: + name: 'ceph-ansible cluster third testing phase' + condition: SUCCESSFUL + execution-type: PARALLEL + projects: + - name: 'ceph-ansible-prs-dev-centos-container-collocation' + current-parameters: true + - name: 'ceph-ansible-prs-dev-centos-non_container-bluestore_lvm_osds' + current-parameters: true + - name: 'ceph-ansible-prs-dev-centos-container-bluestore_lvm_osds' + current-parameters: true + - name: 'ceph-ansible-prs-dev-centos-non_container-lvm_batch' + current-parameters: true + - name: 'ceph-ansible-prs-dev-centos-container-lvm_batch' + current-parameters: true + - name: 'ceph-ansible-prs-dev-centos-non_container-lvm_auto_discovery' + current-parameters: true + - name: 'ceph-ansible-prs-dev-centos-container-lvm_auto_discovery' + current-parameters: true - conditional-step: condition-kind: shell condition-command: | @@ -163,48 +233,6 @@ current-parameters: true - name: 'ceph-ansible-prs-luminous-purge_filestore_osds_non_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/purge-docker-cluster.yml' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible purge playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-dev-centos-container-purge' - current-parameters: true - - name: 'ceph-ansible-prs-dev-ubuntu-container-purge' - 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/purge-cluster.yml' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible purge playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-dev-centos-non_container-purge' - current-parameters: true - - name: 'ceph-ansible-prs-dev-ubuntu-non_container-purge' - current-parameters: true - conditional-step: condition-kind: shell condition-command: | @@ -243,27 +271,6 @@ projects: - name: 'ceph-ansible-prs-luminous-centos-non_container-purge' 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/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-dev-centos-non_container-update' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-container-update' - current-parameters: true - conditional-step: condition-kind: shell condition-command: | @@ -369,25 +376,6 @@ current-parameters: true - name: 'ceph-ansible-prs-luminous-centos-container-shrink_osd' 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: - - multijob: - name: 'ceph-ansible switch_to_containers playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-dev-centos-non_container-switch_to_containers' - current-parameters: true - conditional-step: condition-kind: shell condition-command: | @@ -453,39 +441,6 @@ current-parameters: true - name: 'ceph-ansible-prs-luminous-centos-container-bluestore_lvm_osds' 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 'roles/ceph-defaults/tasks/facts.yml|roles/ceph-osd|ceph-validate|library/ceph_volume.py' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible osd scenarios playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-dev-centos-non_container-lvm_osds' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-container-lvm_osds' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-non_container-bluestore_lvm_osds' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-container-bluestore_lvm_osds' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-non_container-lvm_batch' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-container-lvm_batch' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-non_container-lvm_auto_discovery' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-container-lvm_auto_discovery' - current-parameters: true - conditional-step: condition-kind: shell condition-command: | @@ -528,45 +483,6 @@ current-parameters: true - name: 'ceph-ansible-prs-dev-centos-container-rgw_multisite' 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 not 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-dev-centos-non_container-all_daemons' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-container-all_daemons' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-container-collocation' - current-parameters: true - - name: 'ceph-ansible-prs-dev-ubuntu-non_container-all_daemons' - current-parameters: true - - name: 'ceph-ansible-prs-dev-ubuntu-container-all_daemons' - current-parameters: true - - name: 'ceph-ansible-prs-dev-rhel-container-podman' - current-parameters: true - conditional-step: condition-kind: shell condition-command: | -- 2.39.5