From 38557ab273504d39bed6a282ebb7d91d53811460 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 8 Oct 2019 15:51:46 +0200 Subject: [PATCH] ceph-ansible: remove pipeline The current pipeline is time consuming, it takes ~3h to complete all phases. Signed-off-by: Guillaume Abrioux --- ceph-ansible-pipeline/config/JENKINS_URL | 1 - .../definitions/ceph-ansible-pipeline.yml | 936 ------------------ .../config/definitions/ceph-ansible-prs.yml | 330 +++--- scripts/build_utils.sh | 2 +- 4 files changed, 122 insertions(+), 1147 deletions(-) delete mode 100644 ceph-ansible-pipeline/config/JENKINS_URL delete mode 100644 ceph-ansible-pipeline/config/definitions/ceph-ansible-pipeline.yml diff --git a/ceph-ansible-pipeline/config/JENKINS_URL b/ceph-ansible-pipeline/config/JENKINS_URL deleted file mode 100644 index e97cf671..00000000 --- a/ceph-ansible-pipeline/config/JENKINS_URL +++ /dev/null @@ -1 +0,0 @@ -2.jenkins.ceph.com diff --git a/ceph-ansible-pipeline/config/definitions/ceph-ansible-pipeline.yml b/ceph-ansible-pipeline/config/definitions/ceph-ansible-pipeline.yml deleted file mode 100644 index 452ec97f..00000000 --- a/ceph-ansible-pipeline/config/definitions/ceph-ansible-pipeline.yml +++ /dev/null @@ -1,936 +0,0 @@ -- job: - name: ceph-ansible-pipeline - description: 'This is the main ceph-ansible job that triggers the linter, docs, and scenario jobs' - node: master - project-type: multijob - defaults: global - concurrent: true - display-name: 'ceph-ansible PR Pipeline Job' - block-downstream: false - block-upstream: false - properties: - - build-discarder: - days-to-keep: 90 - num-to-keep: -1 - artifact-days-to-keep: -1 - artifact-num-to-keep: -1 - - github: - url: https://github.com/ceph/ceph-ansible - - 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.*|.*\[skip ci\].*' - trigger-phrase: 'jenkins test pipeline' - only-trigger-phrase: false - github-hooks: true - permit-all: true - auto-close-on-fail: false - status-context: "Testing: ceph-ansible PR Pipeline" - started-status: "Running: ceph-ansible PR Pipeline" - success-status: "OK - ceph-ansible PR Pipeline" - failure-status: "FAIL - A sub-job in the Pipeline failed" - -# Surely there's a saner way to do this but it works... -# The 'included/excluded regions' parameters for the Git plugin could've been -# used in ceph-ansible-prs.yml but https://issues.jenkins-ci.org/browse/JENKINS-20607 - builders: - - multijob: - name: 'ceph-ansible docs and syntax check phase' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: ceph-ansible-docs-pull-requests - current-parameters: true - - name: ceph-ansible-pr-syntax-check - 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 - 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-centos-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-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: | - #!/bin/bash - set -x - # if the target branch is not stable-4.0 then we DON'T RUN these tests. - if [[ "$ghprbTargetBranch" != "stable-4.0" ]]; 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-nautilus-centos-non_container-all_daemons' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-container-all_daemons' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-non_container-lvm_osds' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-container-lvm_osds' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-ubuntu-non_container-all_daemons' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-ubuntu-container-all_daemons' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-container-podman' - current-parameters: true - - multijob: - name: 'ceph-ansible cluster second testing phase' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-nautilus-centos-non_container-purge' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-ubuntu-non_container-purge' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-container-purge' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-ubuntu-container-purge' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-non_container-switch_to_containers' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-non_container-update' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-container-update' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-non_container-storage_inventory' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-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-nautilus-centos-container-collocation' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-non_container-lvm_batch' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-container-lvm_batch' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-non_container-lvm_auto_discovery' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-container-lvm_auto_discovery' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is master 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: dont-run - steps: - - multijob: - name: 'ceph-ansible add_osds playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-dev-centos-non_container-add_osds' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-container-add_osds' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # 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: dont-run - steps: - - multijob: - name: 'ceph-ansible add_osds playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-luminous-centos-non_container-add_osds' - current-parameters: true - - name: 'ceph-ansible-prs-luminous-centos-container-add_osds' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is stable-4.0 we RUN these tests. - 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' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible add_osds playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-nautilus-centos-non_container-add_osds' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-container-add_osds' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is master 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-mon|tests/functional/add-mons' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible add_mons playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-dev-centos-non_container-add_mons' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-container-add_mons' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is stable-4.0 we RUN these tests. - 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' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible add_mons playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-nautilus-centos-non_container-add_mons' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-container-add_mons' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is master 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 'tests/functional/add-mgrs' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible add_mgrs playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-dev-centos-non_container-add_mgrs' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-container-add_mgrs' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is stable-4.0 we RUN these tests. - 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' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible add_mgrs playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-nautilus-centos-non_container-add_mgrs' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-container-add_mgrs' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is master 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-mon|tests/functional/add-mdss' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible add_mdss playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-dev-centos-non_container-add_mdss' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-container-add_mdss' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is master 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 'tests/functional/add-rgws' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible add_rgws playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-dev-centos-non_container-add_rgws' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-container-add_rgws' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is stable-4.0 we RUN these tests. - 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' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible add_rgws playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-nautilus-centos-non_container-add_rgws' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-container-add_rgws' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is master 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 'tests/functional/add-rbdmirrors' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible add_rbdmirrors playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-dev-centos-non_container-add_rbdmirrors' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-container-add_rbdmirrors' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is stable-4.0 we RUN these tests. - 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' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible add_rbdmirrors playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-nautilus-centos-non_container-add_rbdmirrors' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-container-add_rbdmirrors' - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is stable-3.2 or stable-4.0 or master we DON'T RUN these tests. - if [[ "$ghprbTargetBranch" =~ stable-3.2|stable-4.0|master ]]; then - exit 1 - fi - git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep 'infrastructure-playbooks/purge' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible purge playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-luminous-purge_bluestore_osds_non_container' - current-parameters: true - - name: 'ceph-ansible-prs-luminous-purge_cluster_container' - current-parameters: true - - name: 'ceph-ansible-prs-luminous-purge_cluster_non_container' - current-parameters: true - - name: 'ceph-ansible-prs-luminous-purge_filestore_osds_container' - 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 master or stable-4.0 then we DON'T 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 '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-luminous-centos-container-purge' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is master or stable-4.0 then we DON'T 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 '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-luminous-centos-non_container-purge' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is master or stable-4.0 then we DON'T 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 '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-centos-non_container-update' - current-parameters: true - - name: 'ceph-ansible-prs-luminous-centos-container-update' - 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: - - multijob: - name: 'ceph-ansible shrink_mon playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-dev-centos-non_container-shrink_mon' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-container-shrink_mon' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is master or stable-4.0 then we DON'T 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 '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-centos-non_container-shrink_mon' - current-parameters: true - - name: 'ceph-ansible-prs-luminous-centos-container-shrink_mon' - 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: - name: 'ceph-ansible shrink_osd playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-dev-centos-non_container-shrink_osd' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-container-shrink_osd' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is master or stable-4.0 then we DON'T 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/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-centos-non_container-shrink_osd' - 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/shrink-mgr' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible shrink_mgr playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-dev-centos-non_container-shrink_mgr' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-container-shrink_mgr' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is not stable-4.0 then we DON'T RUN these tests. - 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 'infrastructure-playbooks/shrink-mgr' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible shrink_mgr playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-nautilus-centos-non_container-shrink_mgr' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-container-shrink_mgr' - 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-mds' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible shrink_mds playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-dev-centos-non_container-shrink_mds' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-container-shrink_mds' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is not stable-4.0 then we DON'T RUN these tests. - 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 'infrastructure-playbooks/shrink-mds' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible shrink_mds playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-nautilus-centos-non_container-shrink_mds' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-container-shrink_mds' - 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-rbdmirror' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible shrink_rbdmirror playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-dev-centos-non_container-shrink_rbdmirror' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-container-shrink_rbdmirror' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is not stable-4.0 then we DON'T RUN these tests. - 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 'infrastructure-playbooks/shrink-rbdmirror' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible shrink_rbdmirror playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-nautilus-centos-non_container-shrink_rbdmirror' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-container-shrink_rbdmirror' - 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-rgw' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible shrink_rgw playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-dev-centos-non_container-shrink_rgw' - current-parameters: true - - name: 'ceph-ansible-prs-dev-centos-container-shrink_rgw' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is not stable-4.0 then we DON'T RUN these tests. - 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 'infrastructure-playbooks/shrink-rgw' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible shrink_rgw playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-nautilus-centos-non_container-shrink_rgw' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-container-shrink_rgw' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is master or stable-4.0 then we DON'T 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 '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-centos-non_container-switch_to_containers' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is master or stable-3.2 or stable-4.0 then we DON'T RUN these tests - if [[ "$ghprbTargetBranch" =~ stable-3.2|stable-4.0|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' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible osd scenarios playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-luminous-bluestore_osds_container' - current-parameters: true - - name: 'ceph-ansible-prs-luminous-bluestore_osds_non_container' - current-parameters: true - - name: 'ceph-ansible-prs-luminous-filestore_osds_container' - current-parameters: true - - name: 'ceph-ansible-prs-luminous-filestore_osds_non_container' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # 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|tests/functional/centos/7/rgw-multisite' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible rgw multisite scenarios playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-luminous-centos-non_container-rgw_multisite' - current-parameters: true - - name: 'ceph-ansible-prs-luminous-centos-container-rgw_multisite' - current-parameters: true - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - # if the target branch is stable-4.0 then we RUN these tests. - 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' - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'ceph-ansible rgw multisite scenarios playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-nautilus-centos-non_container-rgw_multisite' - current-parameters: true - - name: 'ceph-ansible-prs-nautilus-centos-container-rgw_multisite' - 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: dont-run - steps: - - multijob: - name: 'ceph-ansible rgw multisite scenarios playbook testing' - condition: SUCCESSFUL - execution-type: PARALLEL - projects: - - name: 'ceph-ansible-prs-dev-centos-non_container-rgw_multisite' - 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 master or stable-4.0 then we DON'T RUN these tests. - if [[ "$ghprbTargetBranch" != "stable-3.2" ]]; 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-centos-non_container-all_daemons' - current-parameters: true - - name: 'ceph-ansible-prs-luminous-centos-container-all_daemons' - current-parameters: true - - name: 'ceph-ansible-prs-luminous-centos-container-collocation' - current-parameters: true - - name: 'ceph-ansible-prs-luminous-centos-container-ooo_collocation' - current-parameters: true - scm: - - git: - url: https://github.com/ceph/ceph-ansible.git - branches: - - ${sha1} - refspec: +refs/pull/*:refs/remotes/origin/pr/* - browser: auto - timeout: 60 - skip-tag: true - wipe-workspace: false - - wrappers: - - inject-passwords: - global: true - mask-password-params: true diff --git a/ceph-ansible-prs/config/definitions/ceph-ansible-prs.yml b/ceph-ansible-prs/config/definitions/ceph-ansible-prs.yml index bb9af305..cf9e45e7 100644 --- a/ceph-ansible-prs/config/definitions/ceph-ansible-prs.yml +++ b/ceph-ansible-prs/config/definitions/ceph-ansible-prs.yml @@ -1,9 +1,6 @@ -# master - project: - name: ceph-ansible-prs-master-pipeline - slave_labels: 'vagrant && libvirt && centos7' - release: - - dev + name: ceph-ansible-prs + slave_labels: 'vagrant && libvirt && (smithi || centos7)' distribution: - centos deployment: @@ -11,244 +8,164 @@ - non_container scenario: - all_daemons - - cluster - - collocation - - update - lvm_osds - - shrink_mon - - shrink_osd - - shrink_mgr - - shrink_mds - - shrink_rbdmirror - - shrink_rgw - - lvm_batch - - add_osds - - add_mons - - add_mgrs - - add_mdss - - add_rgws - - add_rbdmirrors - - rgw_multisite + - update - purge - - lvm_auto_discovery + - collocation + - lvm_batch jobs: - - 'ceph-ansible-prs-pipeline' + - 'ceph-ansible-prs-auto' - project: - name: ceph-ansible-prs-master-pipeline-ubuntu - slave_labels: 'vagrant && libvirt && centos7' - release: - - dev + name: ceph-ansible-prs-podman + slave_labels: 'vagrant && libvirt && (smithi || centos7)' distribution: - - ubuntu + - centos deployment: - container - - non_container scenario: - - all_daemons + - podman jobs: - - 'ceph-ansible-prs-pipeline' + - 'ceph-ansible-prs-auto' - project: - name: ceph-ansible-prs-master-non_container-pipeline - slave_labels: 'vagrant && libvirt && centos7' - release: - - dev + name: ceph-ansible-prs-auto-switch_to_container + slave_labels: 'vagrant && libvirt && (smithi || centos7)' distribution: - centos - - ubuntu deployment: - non_container scenario: - switch_to_containers jobs: - - 'ceph-ansible-prs-pipeline' + - 'ceph-ansible-prs-auto' - project: - name: ceph-ansible-prs-master-ooo-pipeline - slave_labels: 'vagrant && libvirt && centos7' - release: - - dev + name: ceph-ansible-prs-ubuntu-trigger + slave_labels: 'vagrant && libvirt && (smithi || centos7)' distribution: - - centos - deployment: - - container - scenario: - - ooo_collocation - - podman - jobs: - - 'ceph-ansible-prs-pipeline' - -# nautilus -- project: - name: ceph-ansible-prs-nautilus-pipeline - slave_labels: 'vagrant && libvirt && centos7' - release: - - nautilus - distribution: - - centos + - ubuntu deployment: - container - non_container scenario: - all_daemons - - cluster - - collocation - update + - purge - lvm_osds + - lvm_batch + - collocation - shrink_mon - - shrink_osd - shrink_mgr + - shrink_osd + - shrink_rgw - shrink_mds - shrink_rbdmirror - - shrink_rgw - - lvm_batch - - add_osds - - add_mons - - add_mgrs - - add_mdss - - add_rgws - - add_rbdmirrors - - rgw_multisite - - purge - - lvm_auto_discovery - jobs: - - 'ceph-ansible-prs-pipeline' - -- project: - name: ceph-ansible-prs-nautilus-pipeline-ubuntu - slave_labels: 'vagrant && libvirt && centos7' - release: - - nautilus - distribution: - - ubuntu - deployment: - - container - - non_container - scenario: - - all_daemons jobs: - - 'ceph-ansible-prs-pipeline' + - 'ceph-ansible-prs-ubuntu-trigger' -- project: - name: ceph-ansible-prs-nautilus-non_container-pipeline - slave_labels: 'vagrant && libvirt && centos7' - release: - - nautilus - distribution: - - centos - - ubuntu - deployment: - - non_container - scenario: - - switch_to_containers - jobs: - - 'ceph-ansible-prs-pipeline' +- job-template: + name: 'ceph-ansible-prs-{distribution}-{deployment}-{scenario}' + id: 'ceph-ansible-prs-auto' + node: '{slave_labels}' + concurrent: true + defaults: global + display-name: 'ceph-ansible: Pull Requests [{distribution}-{deployment}-{scenario}]' + quiet-period: 5 + block-downstream: false + block-upstream: false + retry-count: 3 + properties: + - github: + url: https://github.com/ceph/ceph-ansible + - build-discarder: + days-to-keep: 90 + num-to-keep: -1 + artifact-days-to-keep: -1 + artifact-num-to-keep: -1 -- project: - name: ceph-ansible-prs-nautilus-ooo-pipeline - slave_labels: 'vagrant && libvirt && centos7' - release: - - nautilus - distribution: - - centos - deployment: - - container - scenario: - - ooo_collocation - - podman - jobs: - - 'ceph-ansible-prs-pipeline' + parameters: + - string: + name: sha1 + description: "A pull request ID, like 'origin/pr/72/head'" -# luminous, stable-3.2, stable 3.1 -- project: - name: ceph-ansible-prs-luminous-ubuntu-pipeline - slave_labels: 'vagrant && libvirt && smithi' - release: - - luminous - distribution: - - ubuntu - deployment: - - container - - non_container - scenario: -# stable-3.2 / stable-3.1 - - all_daemons - jobs: - - 'ceph-ansible-prs-pipeline' + 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.*|.*\[skip ci\].*' + trigger-phrase: '^jenkins test {distribution}-{deployment}-{scenario}|jenkins test all.*' + only-trigger-phrase: false + github-hooks: true + permit-all: true + auto-close-on-fail: false + status-context: "Testing: {distribution}-{deployment}-{scenario}" + started-status: "Running: {distribution}-{deployment}-{scenario}" + success-status: "OK - {distribution}-{deployment}-{scenario}" + failure-status: "FAIL - {distribution}-{deployment}-{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 -# luminous, stable-3.2, stable 3.1 -- project: - name: ceph-ansible-prs-luminous-centos-pipeline - slave_labels: 'vagrant && libvirt && smithi' - release: - - luminous - distribution: - - centos - deployment: - - container - - non_container - scenario: -# stable-3.2 / stable-3.1 - - all_daemons - - collocation - - update - - lvm_osds - - shrink_mon - - shrink_osd - - shrink_mgr - - shrink_mds - - shrink_rbdmirror - - shrink_rgw - - lvm_batch - - add_osds - - rgw_multisite - - purge -# stable-3.1 - - filestore_osds - - purge_filestore - - bluestore_osds - - purge_bluestore - jobs: - - 'ceph-ansible-prs-pipeline' + builders: + - inject: + properties-content: | + DISTRIBUTION={distribution} + DEPLOYMENT={deployment} + SCENARIO={scenario} + - conditional-step: + condition-kind: shell + condition-command: | + #!/bin/bash + # Returns 1 if only .rst and README files were modified + echo "Checking if only rst and READMEs were modified" + git diff --name-only $(git show HEAD | grep Merge | head -n 1 | cut -d ':' -f2) | grep -v '\.rst\|README' + if [ $? -eq 1 ]; then + echo "Only docs were modified. Skipping the rest of the job." + exit 1 + fi + on-evaluation-failure: dont-run + steps: + - shell: + !include-raw-escape: + - ../../../scripts/build_utils.sh + - ../../build/build -- project: - name: ceph-ansible-prs-stable-ooo-pipeline - slave_labels: 'vagrant && libvirt && smithi' - release: - - luminous - distribution: - - centos - deployment: - - container - scenario: - - ooo_collocation - jobs: - - 'ceph-ansible-prs-pipeline' + publishers: + - postbuildscript: + builders: + - role: SLAVE + build-on: + - FAILURE + - ABORTED + build-steps: + - shell: + !include-raw-escape: + - ../../../scripts/build_utils.sh + - ../../build/teardown -- project: - name: ceph-ansible-prs-stable-non_container-pipeline - slave_labels: 'vagrant && libvirt && smithi' - release: - - luminous - distribution: - - centos - - ubuntu - deployment: - - non_container - scenario: - - switch_to_containers - jobs: - - 'ceph-ansible-prs-pipeline' + - archive: + artifacts: 'logs/**' + allow-empty: true + latest-only: false - job-template: - name: 'ceph-ansible-prs-{release}-{distribution}-{deployment}-{scenario}' - id: 'ceph-ansible-prs-pipeline' + name: 'ceph-ansible-prs-{distribution}-{deployment}-{scenario}' + id: 'ceph-ansible-prs-ubuntu-trigger' node: '{slave_labels}' concurrent: true defaults: global - display-name: 'ceph-ansible: Pull Requests [{release}-{distribution}-{deployment}-{scenario}]' + display-name: 'ceph-ansible: Pull Requests [{distribution}-{deployment}-{scenario}]' quiet-period: 5 block-downstream: false block-upstream: false @@ -274,15 +191,15 @@ org-list: - ceph skip-build-phrase: '^jenkins do not test.*|.*\[skip ci\].*' - trigger-phrase: '^jenkins test {release}-{distribution}-{deployment}-{scenario}|jenkins test all.*' + trigger-phrase: '^jenkins test {distribution}-{deployment}-{scenario}|jenkins test all.*' only-trigger-phrase: true github-hooks: true permit-all: true auto-close-on-fail: false - status-context: "Testing: {release}-{distribution}-{deployment}-{scenario}" - started-status: "Running: {release}-{distribution}-{deployment}-{scenario}" - success-status: "OK - {release}-{distribution}-{deployment}-{scenario}" - failure-status: "FAIL - {release}-{distribution}-{deployment}-{scenario}" + status-context: "Testing: {distribution}-{deployment}-{scenario}" + started-status: "Running: {distribution}-{deployment}-{scenario}" + success-status: "OK - {distribution}-{deployment}-{scenario}" + failure-status: "FAIL - {distribution}-{deployment}-{scenario}" scm: - git: @@ -298,10 +215,9 @@ builders: - inject: properties-content: | - SCENARIO={scenario} - DEPLOYMENT={deployment} DISTRIBUTION={distribution} - RELEASE={release} + DEPLOYMENT={deployment} + SCENARIO={scenario} - conditional-step: condition-kind: shell condition-command: | @@ -321,10 +237,6 @@ - ../../build/build publishers: - - naginator: - max-failed-builds: 3 - regular-expression: "Failure talking to yum|Call to virDomainLookupByUUID failed" - - postbuildscript: builders: - role: SLAVE diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index eaef1b8a..90000fcd 100644 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -831,7 +831,7 @@ function build_job_name() { } # shellcheck disable=SC2153 -ENV_NAME="$(build_job_name "$RELEASE" "$DISTRIBUTION" "$DEPLOYMENT" "$SCENARIO")" +ENV_NAME="$(build_job_name "$DISTRIBUTION" "$DEPLOYMENT" "$SCENARIO")" case $SCENARIO in update) -- 2.47.3