From: Guillaume Abrioux Date: Wed, 4 Sep 2024 15:24:17 +0000 (+0200) Subject: ceph-volume: functional testing refactor X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=61a6eba59bf17f00a58d8a8ab79c0b4b26f7ed4a;p=ceph-build.git ceph-volume: functional testing refactor See corresponding ceph/ceph PR: ceph/ceph#59606 for details. Signed-off-by: Guillaume Abrioux --- diff --git a/ceph-volume-ansible-prs/build/build b/ceph-volume-ansible-prs/build/build deleted file mode 100644 index c4f71ce9..00000000 --- a/ceph-volume-ansible-prs/build/build +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -set -ex -env -WORKDIR=$(mktemp -td tox.XXXXXXXXXX) - -# set up variables needed for -# githubstatus to report back to the github PR -# if this project was started manually -github_status_setup - -# the following two methods exist in scripts/build_utils.sh -pkgs=( "tox" "github-status>0.0.3" ) -TEMPVENV=$(create_venv_dir) -VENV=${TEMPVENV}/bin -set_centos_python3_version "python3.9" -install_python_packages $TEMPVENV "pkgs[@]" "pip==22.0.4" - -GITHUB_STATUS_STATE="pending" $VENV/github-status create - -prune_stale_vagrant_vms $WORKSPACE/../**/tests -delete_libvirt_vms -clear_libvirt_networks -restart_libvirt_services -update_vagrant_boxes - -cd src/ceph-volume/ceph_volume/tests/functional/$SUBCOMMAND - -if [[ "$ghprbTargetBranch" == "luminous" ]]; then - CEPH_ANSIBLE_BRANCH="stable-3.2" -elif [[ "$ghprbTargetBranch" == "mimic" ]]; then - CEPH_ANSIBLE_BRANCH="stable-3.2" -elif [[ "$ghprbTargetBranch" == "nautilus" ]]; then - CEPH_ANSIBLE_BRANCH="stable-4.0" -elif [[ "$ghprbTargetBranch" == "octopus" ]]; then - CEPH_ANSIBLE_BRANCH="stable-5.0" -elif [[ "$ghprbTargetBranch" == "pacific" ]]; then - CEPH_ANSIBLE_BRANCH="stable-6.0" -elif [[ "$ghprbTargetBranch" == "quincy" ]]; then - CEPH_ANSIBLE_BRANCH="stable-7.0" -elif [[ "$ghprbTargetBranch" == "reef" ]]; then - CEPH_ANSIBLE_BRANCH="stable-8.0" -else - CEPH_ANSIBLE_BRANCH="main" -fi - -if [[ "$ghprbTargetBranch" == "nautilus" ]]; then - DISTRO="centos7" -fi - -CEPH_ANSIBLE_BRANCH=$CEPH_ANSIBLE_BRANCH CEPH_DEV_BRANCH=$ghprbTargetBranch $VENV/tox --workdir=$WORKDIR -vre $DISTRO-$OBJECTSTORE-$SCENARIO -- --provider=libvirt - -GITHUB_STATUS_STATE="success" $VENV/github-status create diff --git a/ceph-volume-ansible-prs/build/teardown b/ceph-volume-ansible-prs/build/teardown deleted file mode 100644 index 11e3bbcf..00000000 --- a/ceph-volume-ansible-prs/build/teardown +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# There has to be a better way to do this than this script which just looks -# for every Vagrantfile in scenarios and then just destroys whatever is left. - -# the following two methods exist in scripts/build_utils.sh -pkgs=( "tox" "github-status>0.0.3" ) -TEMPVENV=$(create_venv_dir) -VENV=${TEMPVENV}/bin -install_python_packages $TEMPVENV "pkgs[@]" - -GITHUB_STATUS_STATE="failure" $VENV/github-status create - -cd $WORKSPACE/src/ceph-volume/ceph_volume/tests/functional - -# the method exists in scripts/build_utils.sh -teardown_vagrant_tests $VENV diff --git a/ceph-volume-ansible-prs/config/definitions/ceph-volume-pr.yml b/ceph-volume-ansible-prs/config/definitions/ceph-volume-pr.yml deleted file mode 100644 index 02daae02..00000000 --- a/ceph-volume-ansible-prs/config/definitions/ceph-volume-pr.yml +++ /dev/null @@ -1,153 +0,0 @@ - -- project: - name: ceph-volume-ansible-prs-lvm - distro: - - centos - objectstore: - - bluestore - scenario: - - create - - dmcrypt - subcommand: - - lvm - - jobs: - - 'ceph-volume-prs-{subcommand}-{distro}-{objectstore}-{scenario}' - -- project: - name: ceph-volume-ansible-prs-batch - distro: - - centos - objectstore: - - bluestore - scenario: - - single_type - - single_type_dmcrypt - subcommand: - - batch - - jobs: - - 'ceph-volume-prs-{subcommand}-{distro}-{objectstore}-{scenario}' - -- project: - name: ceph-volume-ansible-prs-batch-mixed - distro: - - centos - objectstore: - - bluestore - scenario: - - mixed_type - - mixed_type_dmcrypt - - mixed_type_explicit - - mixed_type_dmcrypt_explicit - subcommand: - - batch - - jobs: - - 'ceph-volume-prs-{subcommand}-{distro}-{objectstore}-{scenario}' - -- job-template: - name: 'ceph-volume-prs-{subcommand}-{distro}-{objectstore}-{scenario}' - display-name: 'ceph-volume {subcommand}: Pull Request [{distro}-{objectstore}-{scenario}]' - node: vagrant&&libvirt&¢os9 - concurrent: true - project-type: freestyle - defaults: global - quiet-period: 5 - block-downstream: false - block-upstream: false - properties: - - github: - url: https://github.com/ceph/ceph - - build-discarder: - days-to-keep: 30 - discard-old-builds: true - - parameters: - - string: - name: sha1 - description: "A pull request ID, like 'origin/pr/72/head'" - - # this is injected by the ghprb plugin, and is fully optional but may help in manually triggering - # a job that can end up updating a PR - - string: - name: ghprbSourceBranch - description: "When manually triggered, and the remote PR isn't a branch in the ceph.git repo This can be specified to determine the actual branch." - - string: - name: ghprbTargetBranch - description: 'Required when manually triggered, the targeted branch needs to be set (e.g. "luminous" or "main")' - - string: - name: GITHUB_SHA - description: "The tip (last commit) in the PR, a sha1 like 7d787849556788961155534039886aedfcdb2a88 (if set, will report status to Github)" - - password: - name: GITHUB_OAUTH_TOKEN - description: "Secret API Token to set status. Only needed when manually triggering a PR test" - - - triggers: - - github-pull-request: - cancel-builds-on-update: true - allow-whitelist-orgs-as-admins: true - org-list: - - ceph - only-trigger-phrase: true - trigger-phrase: '^jenkins test ceph-volume {subcommand} {distro}-{objectstore}-{scenario}|jenkins test ceph-volume all.*|jenkins test ceph-volume {subcommand} all.*|jenkins test ceph-volume {subcommand} {scenario}.*' - github-hooks: true - permit-all: true - auto-close-on-fail: false - status-context: "ceph-volume {subcommand} testing {distro}-{objectstore}-{scenario}" - started-status: "ceph-volume {subcommand} running {distro}-{objectstore}-{scenario}" - success-status: "ceph-volume {subcommand} {distro}-{objectstore}-{scenario} OK" - failure-status: "ceph-volume {subcommand} {distro}-{objectstore}-{scenario} failed" - - scm: - - git: - url: https://github.com/ceph/ceph.git - branches: - - ${{sha1}} - refspec: +refs/pull/*:refs/remotes/origin/pr/* - browser: auto - timeout: 20 - skip-tag: true - wipe-workspace: true - - builders: - - inject: - properties-content: | - SCENARIO={scenario} - DISTRO={distro} - OBJECTSTORE={objectstore} - SUBCOMMAND={subcommand} - GITHUB_REPOSITORY="ceph/ceph" - GITHUB_STATUS_CONTEXT="ceph-volume {subcommand} testing {distro}-{objectstore}-{scenario}" - GITHUB_STATUS_STARTED="running" - GITHUB_STATUS_SUCCESS="OK" - GITHUB_STATUS_FAILURE="failed" - GITHUB_STATUS_ERROR="completed with errors" - - shell: - !include-raw-escape: - - ../../../scripts/build_utils.sh - - ../../build/build - - wrappers: - - inject-passwords: - global: true - mask-password-params: true - - publishers: - - postbuildscript: - builders: - - role: SLAVE - build-on: - - FAILURE - - ABORTED - build-steps: - - shell: - !include-raw-escape: - - ../../../scripts/build_utils.sh - - ../../build/teardown - - - archive: - artifacts: 'logs/**' - allow-empty: true - latest-only: false diff --git a/ceph-volume-cephadm-prs/build/build b/ceph-volume-cephadm-prs/build/build new file mode 100644 index 00000000..820c8ed1 --- /dev/null +++ b/ceph-volume-cephadm-prs/build/build @@ -0,0 +1,30 @@ +#!/bin/bash +set -ex +env +WORKDIR=$(mktemp -td tox.XXXXXXXXXX) + +# set up variables needed for +# githubstatus to report back to the github PR +# if this project was started manually +github_status_setup + +# the following two methods exist in scripts/build_utils.sh +pkgs=( "tox" "github-status>0.0.3" ) +TEMPVENV=$(create_venv_dir) +VENV=${TEMPVENV}/bin +set_centos_python3_version "python3.9" +install_python_packages $TEMPVENV "pkgs[@]" "pip==22.0.4" + +GITHUB_STATUS_STATE="pending" $VENV/github-status create + +prune_stale_vagrant_vms $WORKSPACE/../**/tests +delete_libvirt_vms +clear_libvirt_networks +restart_libvirt_services +update_vagrant_boxes + +cd src/ceph-volume/ceph_volume/tests/functional/${DISTRO}/${OBJECTSTORE}/${METHOD}/${SCENARIO} + +CEPH_DEV_BRANCH=$ghprbTargetBranch $VENV/tox --workdir=$WORKDIR -vre ${DISTRO}-${OBJECTSTORE}-${METHOD}-${SCENARIO} -- --provider=libvirt + +GITHUB_STATUS_STATE="success" $VENV/github-status create diff --git a/ceph-volume-cephadm-prs/build/teardown b/ceph-volume-cephadm-prs/build/teardown new file mode 100644 index 00000000..11e3bbcf --- /dev/null +++ b/ceph-volume-cephadm-prs/build/teardown @@ -0,0 +1,16 @@ +#!/bin/bash +# There has to be a better way to do this than this script which just looks +# for every Vagrantfile in scenarios and then just destroys whatever is left. + +# the following two methods exist in scripts/build_utils.sh +pkgs=( "tox" "github-status>0.0.3" ) +TEMPVENV=$(create_venv_dir) +VENV=${TEMPVENV}/bin +install_python_packages $TEMPVENV "pkgs[@]" + +GITHUB_STATUS_STATE="failure" $VENV/github-status create + +cd $WORKSPACE/src/ceph-volume/ceph_volume/tests/functional + +# the method exists in scripts/build_utils.sh +teardown_vagrant_tests $VENV diff --git a/ceph-volume-cephadm-prs/config/definitions/ceph-volume-pr.yml b/ceph-volume-cephadm-prs/config/definitions/ceph-volume-pr.yml new file mode 100644 index 00000000..96070d72 --- /dev/null +++ b/ceph-volume-cephadm-prs/config/definitions/ceph-volume-pr.yml @@ -0,0 +1,122 @@ + +- project: + name: ceph-volume-cephadm-prs + distro: + - centos + objectstore: + - bluestore + method: + - lvm + - raw + scenario: + - unencrypted + - dmcrypt + + jobs: + - 'ceph-volume-prs-{distro}-{objectstore}-{method}-{scenario}' + +- job-template: + name: 'ceph-volume-prs-{distro}-{objectstore}-{method}-{scenario}' + display-name: 'ceph-volume {method}: Pull Request [{distro}-{objectstore}-{scenario}]' + node: vagrant&&libvirt&¢os9 + concurrent: true + project-type: freestyle + defaults: global + quiet-period: 5 + block-downstream: false + block-upstream: false + properties: + - github: + url: https://github.com/ceph/ceph + - build-discarder: + days-to-keep: 30 + discard-old-builds: true + + parameters: + - string: + name: sha1 + description: "A pull request ID, like 'origin/pr/72/head'" + + # this is injected by the ghprb plugin, and is fully optional but may help in manually triggering + # a job that can end up updating a PR + - string: + name: ghprbSourceBranch + description: "When manually triggered, and the remote PR isn't a branch in the ceph.git repo This can be specified to determine the actual branch." + - string: + name: ghprbTargetBranch + description: 'Required when manually triggered, the targeted branch needs to be set (e.g. "luminous" or "main")' + - string: + name: GITHUB_SHA + description: "The tip (last commit) in the PR, a sha1 like 7d787849556788961155534039886aedfcdb2a88 (if set, will report status to Github)" + - password: + name: GITHUB_OAUTH_TOKEN + description: "Secret API Token to set status. Only needed when manually triggering a PR test" + + + triggers: + - github-pull-request: + cancel-builds-on-update: true + allow-whitelist-orgs-as-admins: true + org-list: + - ceph + only-trigger-phrase: true + trigger-phrase: '^jenkins test ceph-volume {distro} {objectstore}-{method}-{scenario}|jenkins test ceph-volume all.*|jenkins test ceph-volume {distro} all.*' + github-hooks: true + permit-all: true + auto-close-on-fail: false + status-context: "ceph-volume {method} testing {distro}-{objectstore}-{scenario}" + started-status: "ceph-volume {method} running {distro}-{objectstore}-{scenario}" + success-status: "ceph-volume {method} {distro}-{objectstore}-{scenario} OK" + failure-status: "ceph-volume {method} {distro}-{objectstore}-{scenario} failed" + + scm: + - git: + url: https://github.com/ceph/ceph.git + branches: + - ${{sha1}} + refspec: +refs/pull/*:refs/remotes/origin/pr/* + browser: auto + timeout: 20 + skip-tag: true + wipe-workspace: true + + builders: + - inject: + properties-content: | + DISTRO={distro} + OBJECTSTORE={objectstore} + METHOD={method} + SCENARIO={scenario} + GITHUB_REPOSITORY="ceph/ceph" + GITHUB_STATUS_CONTEXT="ceph-volume testing {distro}-{objectstore}-{method}-{scenario}" + GITHUB_STATUS_STARTED="running" + GITHUB_STATUS_SUCCESS="OK" + GITHUB_STATUS_FAILURE="failed" + GITHUB_STATUS_ERROR="completed with errors" + - shell: + !include-raw-escape: + - ../../../scripts/build_utils.sh + - ../../build/build + + wrappers: + - inject-passwords: + global: true + mask-password-params: true + + publishers: + - postbuildscript: + builders: + - role: SLAVE + build-on: + - FAILURE + - ABORTED + build-steps: + - shell: + !include-raw-escape: + - ../../../scripts/build_utils.sh + - ../../build/teardown + + - archive: + artifacts: 'logs/**' + allow-empty: true + latest-only: false diff --git a/ceph-volume-linter/build/build b/ceph-volume-linter/build/build new file mode 100644 index 00000000..d46f5660 --- /dev/null +++ b/ceph-volume-linter/build/build @@ -0,0 +1,21 @@ +#!/bin/bash +set -ex + +# set up variables needed for +# githubstatus to report back to the github PR +# if this project was started manually +github_status_setup + +# the following two methods exist in scripts/build_utils.sh +pkgs=( "tox" "github-status>0.0.3") +TEMPVENV=$(create_venv_dir) +VENV=${TEMPVENV}/bin +install_python_packages $TEMPVENV "pkgs[@]" + +cd src/ceph-volume + +GITHUB_STATUS_STATE="pending" $VENV/github-status create + +$VENV/tox -vr + +GITHUB_STATUS_STATE="success" $VENV/github-status create diff --git a/ceph-volume-linter/build/teardown b/ceph-volume-linter/build/teardown new file mode 100644 index 00000000..32379faa --- /dev/null +++ b/ceph-volume-linter/build/teardown @@ -0,0 +1,11 @@ +#!/bin/bash +# There has to be a better way to do this than this script which just looks +# for every Vagrantfile in scenarios and then just destroys whatever is left. + +# the following two methods exist in scripts/build_utils.sh +pkgs=( "github-status>0.0.3" ) +TEMPVENV=$(create_venv_dir) +VENV=${TEMPVENV}/bin +install_python_packages $TEMPVENV "pkgs[@]" + +GITHUB_STATUS_STATE="failure" $VENV/github-status create diff --git a/ceph-volume-linter/config/definitions/ceph-volume-pr.yml b/ceph-volume-linter/config/definitions/ceph-volume-pr.yml new file mode 100644 index 00000000..4924fa83 --- /dev/null +++ b/ceph-volume-linter/config/definitions/ceph-volume-pr.yml @@ -0,0 +1,91 @@ +- job: + name: ceph-volume-linter + display-name: 'ceph-volume: Pull Request linter tests' + node: small && centos9 + project-type: freestyle + defaults: global + quiet-period: 5 + block-downstream: false + block-upstream: false + properties: + - github: + url: https://github.com/ceph/ceph + - build-discarder: + days-to-keep: 14 + discard-old-builds: true + + parameters: + - string: + name: sha1 + description: "A pull request ID, like 'origin/pr/72/head'" + + # this is injected by the ghprb plugin, and is fully optional but may help in manually triggering + # a job that can end up updating a PR + - string: + name: ghprbSourceBranch + description: "When manually triggered, and the remote PR isn't a branch in the ceph.git repo This can be specified to determine the actual branch." + - string: + name: ghprbTargetBranch + description: 'Required when manually triggered, the targeted branch needs to be set (e.g. "luminous" or "main")' + - string: + name: GITHUB_SHA + description: "The tip (last commit) in the PR, a sha1 like 7d787849556788961155534039886aedfcdb2a88 (if set, will report status to Github)" + - password: + name: GITHUB_OAUTH_TOKEN + description: "Secret API Token to set status. Only needed when manually triggering a PR test" + + triggers: + - github-pull-request: + cancel-builds-on-update: true + only-trigger-phrase: true + trigger-phrase: 'jenkins test ceph-volume linter' + github-hooks: true + permit-all: true + auto-close-on-fail: false + status-context: "ceph-volume tox testing" + started-status: "ceph-volume tox running" + success-status: "ceph-volume tox OK" + failure-status: "ceph-volume tox failed" + + scm: + - git: + url: https://github.com/ceph/ceph + browser: auto + branches: + - ${sha1} + refspec: +refs/pull/*:refs/remotes/origin/pr/* + skip-tag: true + timeout: 20 + wipe-workspace: true + + builders: + - inject: + properties-content: | + GITHUB_REPOSITORY="ceph/ceph" + GITHUB_STATUS_CONTEXT="ceph-volume linter tests" + GITHUB_STATUS_STARTED="running" + GITHUB_STATUS_SUCCESS="OK" + GITHUB_STATUS_FAILURE="failed" + GITHUB_STATUS_ERROR="completed with errors" + - shell: + !include-raw: + - ../../../scripts/build_utils.sh + - ../../build/build + + wrappers: + - inject-passwords: + global: true + mask-password-params: true + + publishers: + - postbuildscript: + builders: + - role: SLAVE + build-on: + - FAILURE + - ABORTED + build-steps: + - shell: + !include-raw: + - ../../../scripts/build_utils.sh + - ../../build/teardown diff --git a/ceph-volume-nightly/config/definitions/ceph-volume-nightly.yml b/ceph-volume-nightly/config/definitions/ceph-volume-nightly.yml index 215f13e2..b092c48f 100644 --- a/ceph-volume-nightly/config/definitions/ceph-volume-nightly.yml +++ b/ceph-volume-nightly/config/definitions/ceph-volume-nightly.yml @@ -4,63 +4,23 @@ - centos objectstore: - bluestore - scenario: - - create - - dmcrypt - subcommand: + method: - lvm - ceph_branch: - - main - - reef - - quincy - - jobs: - - 'ceph-volume-nightly-{ceph_branch}-{subcommand}-{distro}-{objectstore}-{scenario}' - -- project: - name: ceph-volume-nightly-batch - distro: - - centos - objectstore: - - bluestore + - raw scenario: - - single_type - - single_type_dmcrypt - subcommand: - - batch - ceph_branch: - - main - - reef - - quincy - - jobs: - - 'ceph-volume-nightly-{ceph_branch}-{subcommand}-{distro}-{objectstore}-{scenario}' - -- project: - name: ceph-volume-nightly-batch-mixed - distro: - - centos - objectstore: - - bluestore - scenario: - - mixed_type - - mixed_type_dmcrypt - - mixed_type_explicit - - mixed_type_dmcrypt_explicit - subcommand: - - batch + - unencrypted + - dmcrypt ceph_branch: - main + - squid - reef - - quincy jobs: - - 'ceph-volume-nightly-{ceph_branch}-{subcommand}-{distro}-{objectstore}-{scenario}' - + - 'ceph-volume-nightly-{ceph_branch}-{distro}-{objectstore}-{method}-{scenario}' - job-template: - name: 'ceph-volume-nightly-{ceph_branch}-{subcommand}-{distro}-{objectstore}-{scenario}' - display-name: 'ceph-volume {ceph_branch} {subcommand}: [{distro}-{objectstore}-{scenario}]' + name: 'ceph-volume-nightly-{ceph_branch}-{distro}-{objectstore}-{method}-{scenario}' + display-name: 'ceph-volume {ceph_branch}: [{distro}-{objectstore}-{method}-{scenario}]' node: vagrant&&libvirt&¢os9 concurrent: true project-type: freestyle @@ -91,10 +51,10 @@ builders: - inject: properties-content: | - SCENARIO={scenario} DISTRO={distro} OBJECTSTORE={objectstore} - SUBCOMMAND={subcommand} + METHOD={method} + SCENARIO={scenario} CEPH_BRANCH={ceph_branch} - shell: !include-raw-escape: @@ -125,4 +85,4 @@ latest-only: false - email: - recipients: aschoen@redhat.com gabrioux@redhat.com + recipients: gabrioux@ibm.com diff --git a/ceph-volume-pr/build/build b/ceph-volume-pr/build/build deleted file mode 100644 index d46f5660..00000000 --- a/ceph-volume-pr/build/build +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -set -ex - -# set up variables needed for -# githubstatus to report back to the github PR -# if this project was started manually -github_status_setup - -# the following two methods exist in scripts/build_utils.sh -pkgs=( "tox" "github-status>0.0.3") -TEMPVENV=$(create_venv_dir) -VENV=${TEMPVENV}/bin -install_python_packages $TEMPVENV "pkgs[@]" - -cd src/ceph-volume - -GITHUB_STATUS_STATE="pending" $VENV/github-status create - -$VENV/tox -vr - -GITHUB_STATUS_STATE="success" $VENV/github-status create diff --git a/ceph-volume-pr/build/teardown b/ceph-volume-pr/build/teardown deleted file mode 100644 index 32379faa..00000000 --- a/ceph-volume-pr/build/teardown +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -# There has to be a better way to do this than this script which just looks -# for every Vagrantfile in scenarios and then just destroys whatever is left. - -# the following two methods exist in scripts/build_utils.sh -pkgs=( "github-status>0.0.3" ) -TEMPVENV=$(create_venv_dir) -VENV=${TEMPVENV}/bin -install_python_packages $TEMPVENV "pkgs[@]" - -GITHUB_STATUS_STATE="failure" $VENV/github-status create diff --git a/ceph-volume-pr/config/definitions/ceph-volume-pr.yml b/ceph-volume-pr/config/definitions/ceph-volume-pr.yml deleted file mode 100644 index 84c80f46..00000000 --- a/ceph-volume-pr/config/definitions/ceph-volume-pr.yml +++ /dev/null @@ -1,91 +0,0 @@ -- job: - name: ceph-volume-pr - display-name: 'ceph-volume: Pull Request tox tests' - node: small && centos9 - project-type: freestyle - defaults: global - quiet-period: 5 - block-downstream: false - block-upstream: false - properties: - - github: - url: https://github.com/ceph/ceph - - build-discarder: - days-to-keep: 14 - discard-old-builds: true - - parameters: - - string: - name: sha1 - description: "A pull request ID, like 'origin/pr/72/head'" - - # this is injected by the ghprb plugin, and is fully optional but may help in manually triggering - # a job that can end up updating a PR - - string: - name: ghprbSourceBranch - description: "When manually triggered, and the remote PR isn't a branch in the ceph.git repo This can be specified to determine the actual branch." - - string: - name: ghprbTargetBranch - description: 'Required when manually triggered, the targeted branch needs to be set (e.g. "luminous" or "main")' - - string: - name: GITHUB_SHA - description: "The tip (last commit) in the PR, a sha1 like 7d787849556788961155534039886aedfcdb2a88 (if set, will report status to Github)" - - password: - name: GITHUB_OAUTH_TOKEN - description: "Secret API Token to set status. Only needed when manually triggering a PR test" - - triggers: - - github-pull-request: - cancel-builds-on-update: true - only-trigger-phrase: true - trigger-phrase: 'jenkins test ceph-volume tox' - github-hooks: true - permit-all: true - auto-close-on-fail: false - status-context: "ceph-volume tox testing" - started-status: "ceph-volume tox running" - success-status: "ceph-volume tox OK" - failure-status: "ceph-volume tox failed" - - scm: - - git: - url: https://github.com/ceph/ceph - browser: auto - branches: - - ${sha1} - refspec: +refs/pull/*:refs/remotes/origin/pr/* - skip-tag: true - timeout: 20 - wipe-workspace: true - - builders: - - inject: - properties-content: | - GITHUB_REPOSITORY="ceph/ceph" - GITHUB_STATUS_CONTEXT="ceph-volume tox tests" - GITHUB_STATUS_STARTED="running" - GITHUB_STATUS_SUCCESS="OK" - GITHUB_STATUS_FAILURE="failed" - GITHUB_STATUS_ERROR="completed with errors" - - shell: - !include-raw: - - ../../../scripts/build_utils.sh - - ../../build/build - - wrappers: - - inject-passwords: - global: true - mask-password-params: true - - publishers: - - postbuildscript: - builders: - - role: SLAVE - build-on: - - FAILURE - - ABORTED - build-steps: - - shell: - !include-raw: - - ../../../scripts/build_utils.sh - - ../../build/teardown diff --git a/ceph-volume-scenario/build/build b/ceph-volume-scenario/build/build index 18e464c1..cf43bed1 100644 --- a/ceph-volume-scenario/build/build +++ b/ceph-volume-scenario/build/build @@ -14,6 +14,6 @@ clear_libvirt_networks restart_libvirt_services update_vagrant_boxes -cd src/ceph-volume/ceph_volume/tests/functional/$SUBCOMMAND +cd src/ceph-volume/ceph_volume/tests/functional/${DISTRO}/${OBJECTSTORE}/${METHOD}/${SCENARIO} -CEPH_DEV_BRANCH=$CEPH_BRANCH CEPH_DEV_SHA1=$CEPH_SHA1 CEPH_ANSIBLE_BRANCH=$CEPH_ANSIBLE_BRANCH $VENV/tox --workdir=$WORKDIR -vre $SCENARIO -- --provider=libvirt +CEPH_DEV_BRANCH=$CEPH_BRANCH CEPH_DEV_SHA1=$CEPH_SHA1 $VENV/tox --workdir=$WORKDIR -vre ${DISTRO}-${OBJECTSTORE}-${METHOD}-${OBJECTSTORE}-${SCENARIO} -- --provider=libvirt diff --git a/ceph-volume-scenario/config/definitions/ceph-volume-scenario.yml b/ceph-volume-scenario/config/definitions/ceph-volume-scenario.yml index e88bb9c3..1b610bc0 100644 --- a/ceph-volume-scenario/config/definitions/ceph-volume-scenario.yml +++ b/ceph-volume-scenario/config/definitions/ceph-volume-scenario.yml @@ -18,12 +18,17 @@ parameters: - string: - name: SUBCOMMAND - description: "The subcommand in ceph-volume we are testing. (lvm or simple)" + name: DISTRO + description: "The host OS to use." + default: "centos" + - string: + name: METHOD + description: "The subcommand in ceph-volume we are testing. (lvm or raw)" default: "lvm" - string: name: SCENARIO - description: "A full scenario name for ceph-volume testing, like xenial-bluestore-create" + description: "unencrypted or dmcrypt OSDs" + default: "unencrypted" - string: name: CEPH_BRANCH description: "The ceph branch to test against" @@ -32,10 +37,6 @@ name: CEPH_SHA1 description: "The ceph sha1 to test against" default: "latest" - - string: - name: CEPH_ANSIBLE_BRANCH - description: "The ceph-ansible branch to test against" - default: "main" - string: name: CEPH_REPO_URL description: "The full https url to clone from" diff --git a/ceph-volume-test/config/definitions/ceph-volume-test.yml b/ceph-volume-test/config/definitions/ceph-volume-test.yml index ded366c7..c6973392 100644 --- a/ceph-volume-test/config/definitions/ceph-volume-test.yml +++ b/ceph-volume-test/config/definitions/ceph-volume-test.yml @@ -23,131 +23,41 @@ name: CEPH_SHA1 description: "The ceph sha1 to test against" default: "latest" - - string: - name: CEPH_ANSIBLE_BRANCH - description: "The ceph-ansible branch to test against" - default: "main" - string: name: CEPH_REPO_URL description: "The full https url to clone from" default: "https://github.com/ceph/ceph.git" builders: - # centos8 based jobs for pacific & quincy - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - if [[ ! "$CEPH_BRANCH" =~ pacific|quincy ]]; then - exit 1 - fi - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'testing ceph-volume lvm - filestore' - condition: SUCCESSFUL - projects: - - name: ceph-volume-scenario - current-parameters: true - predefined-parameters: | - SCENARIO=centos8-filestore-create - SUBCOMMAND=lvm - - name: ceph-volume-scenario - current-parameters: true - predefined-parameters: | - SCENARIO=centos8-filestore-dmcrypt - SUBCOMMAND=lvm - - multijob: - name: 'testing ceph-volume batch - filestore' - condition: SUCCESSFUL - projects: - - name: ceph-volume-scenario - current-parameters: true - predefined-parameters: | - SCENARIO=centos8-filestore-single_type - SUBCOMMAND=batch - - name: ceph-volume-scenario - current-parameters: true - predefined-parameters: | - SCENARIO=centos8-filestore-single_type_dmcrypt - SUBCOMMAND=batch - - name: ceph-volume-scenario - current-parameters: true - predefined-parameters: | - SCENARIO=centos8-filestore-mixed_type_dmcrypt - SUBCOMMAND=batch - - name: ceph-volume-scenario - current-parameters: true - predefined-parameters: | - SCENARIO=centos8-filestore-mixed_type - SUBCOMMAND=batch - - name: ceph-volume-scenario - current-parameters: true - predefined-parameters: | - SCENARIO=centos8-filestore-mixed_type_dmcrypt_explicit - SUBCOMMAND=batch - - name: ceph-volume-scenario - current-parameters: true - predefined-parameters: | - SCENARIO=centos8-filestore-mixed_type_explicit - SUBCOMMAND=batch - # centos8 based jobs for pacific onward - - conditional-step: - condition-kind: shell - condition-command: | - #!/bin/bash - set -x - if [[ ! "$CEPH_BRANCH" =~ main|squid|reef|quincy|pacific ]]; then - exit 1 - fi - on-evaluation-failure: dont-run - steps: - - multijob: - name: 'testing ceph-volume lvm - bluestore' - condition: SUCCESSFUL - projects: - - name: ceph-volume-scenario - current-parameters: true - predefined-parameters: | - SCENARIO=centos-bluestore-create - SUBCOMMAND=lvm - - name: ceph-volume-scenario - current-parameters: true - predefined-parameters: | - SCENARIO=centos-bluestore-dmcrypt - SUBCOMMAND=lvm - - multijob: - name: 'testing ceph-volume batch - bluestore' - condition: SUCCESSFUL - projects: - - name: ceph-volume-scenario - current-parameters: true - predefined-parameters: | - SCENARIO=centos-bluestore-single_type - SUBCOMMAND=batch - - name: ceph-volume-scenario - current-parameters: true - predefined-parameters: | - SCENARIO=centos-bluestore-single_type_dmcrypt - SUBCOMMAND=batch - - name: ceph-volume-scenario - current-parameters: true - predefined-parameters: | - SCENARIO=centos-bluestore-mixed_type - SUBCOMMAND=batch - - name: ceph-volume-scenario - current-parameters: true - predefined-parameters: | - SCENARIO=centos-bluestore-mixed_type_dmcrypt - SUBCOMMAND=batch - - name: ceph-volume-scenario - current-parameters: true - predefined-parameters: | - SCENARIO=centos-bluestore-mixed_type_explicit - SUBCOMMAND=batch - - name: ceph-volume-scenario - current-parameters: true - predefined-parameters: | - SCENARIO=centos-bluestore-mixed_type_dmcrypt_explicit - SUBCOMMAND=batch + - multijob: + name: 'testing ceph-volume' + condition: SUCCESSFUL + projects: + - name: ceph-volume-scenario + current-parameters: true + predefined-parameters: | + DISTRO=centos + OBJECTSTORE=bluestore + METHOD=lvm + SCENARIO=unencrypted + - name: ceph-volume-scenario + current-parameters: true + predefined-parameters: | + DISTRO=centos + OBJECTSTORE=bluestore + METHOD=lvm + SCENARIO=dmcrypt + - name: ceph-volume-scenario + current-parameters: true + predefined-parameters: | + DISTRO=centos + OBJECTSTORE=bluestore + METHOD=raw + SCENARIO=unencrypted + - name: ceph-volume-scenario + current-parameters: true + predefined-parameters: | + DISTRO=centos + OBJECTSTORE=bluestore + METHOD=raw + SCENARIO=dmcrypt