Skip to content

Commit

Permalink
ceph-volume: functional testing refactor
Browse files Browse the repository at this point in the history
See corresponding ceph/ceph PR: ceph/ceph#59606 for details.

Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
  • Loading branch information
guits committed Sep 10, 2024
1 parent b99fcd4 commit 61a6eba
Show file tree
Hide file tree
Showing 11 changed files with 103 additions and 285 deletions.
52 changes: 0 additions & 52 deletions ceph-volume-ansible-prs/build/build

This file was deleted.

30 changes: 30 additions & 0 deletions ceph-volume-cephadm-prs/build/build
Original file line number Diff line number Diff line change
@@ -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
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,54 +1,23 @@

- project:
name: ceph-volume-ansible-prs-lvm
name: ceph-volume-cephadm-prs
distro:
- centos
objectstore:
- bluestore
scenario:
- create
- dmcrypt
subcommand:
method:
- 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
- raw
scenario:
- mixed_type
- mixed_type_dmcrypt
- mixed_type_explicit
- mixed_type_dmcrypt_explicit
subcommand:
- batch
- unencrypted
- dmcrypt

jobs:
- 'ceph-volume-prs-{subcommand}-{distro}-{objectstore}-{scenario}'
- 'ceph-volume-prs-{distro}-{objectstore}-{method}-{scenario}'

- job-template:
name: 'ceph-volume-prs-{subcommand}-{distro}-{objectstore}-{scenario}'
display-name: 'ceph-volume {subcommand}: Pull Request [{distro}-{objectstore}-{scenario}]'
name: 'ceph-volume-prs-{distro}-{objectstore}-{method}-{scenario}'
display-name: 'ceph-volume {method}: Pull Request [{distro}-{objectstore}-{scenario}]'
node: vagrant&&libvirt&&centos9
concurrent: true
project-type: freestyle
Expand Down Expand Up @@ -91,14 +60,14 @@
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}.*'
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 {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"
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:
Expand All @@ -114,12 +83,12 @@
builders:
- inject:
properties-content: |
SCENARIO={scenario}
DISTRO={distro}
OBJECTSTORE={objectstore}
SUBCOMMAND={subcommand}
METHOD={method}
SCENARIO={scenario}
GITHUB_REPOSITORY="ceph/ceph"
GITHUB_STATUS_CONTEXT="ceph-volume {subcommand} testing {distro}-{objectstore}-{scenario}"
GITHUB_STATUS_CONTEXT="ceph-volume testing {distro}-{objectstore}-{method}-{scenario}"
GITHUB_STATUS_STARTED="running"
GITHUB_STATUS_SUCCESS="OK"
GITHUB_STATUS_FAILURE="failed"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- job:
name: ceph-volume-pr
display-name: 'ceph-volume: Pull Request tox tests'
name: ceph-volume-linter
display-name: 'ceph-volume: Pull Request linter tests'
node: small && centos9
project-type: freestyle
defaults: global
Expand Down Expand Up @@ -38,7 +38,7 @@
- github-pull-request:
cancel-builds-on-update: true
only-trigger-phrase: true
trigger-phrase: 'jenkins test ceph-volume tox'
trigger-phrase: 'jenkins test ceph-volume linter'
github-hooks: true
permit-all: true
auto-close-on-fail: false
Expand All @@ -62,7 +62,7 @@
- inject:
properties-content: |
GITHUB_REPOSITORY="ceph/ceph"
GITHUB_STATUS_CONTEXT="ceph-volume tox tests"
GITHUB_STATUS_CONTEXT="ceph-volume linter tests"
GITHUB_STATUS_STARTED="running"
GITHUB_STATUS_SUCCESS="OK"
GITHUB_STATUS_FAILURE="failed"
Expand Down
62 changes: 11 additions & 51 deletions ceph-volume-nightly/config/definitions/ceph-volume-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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&&centos9
concurrent: true
project-type: freestyle
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -125,4 +85,4 @@
latest-only: false

- email:
recipients: aschoen@redhat.com gabrioux@redhat.com
recipients: gabrioux@ibm.com
4 changes: 2 additions & 2 deletions ceph-volume-scenario/build/build
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 8 additions & 7 deletions ceph-volume-scenario/config/definitions/ceph-volume-scenario.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
Loading

0 comments on commit 61a6eba

Please sign in to comment.