From 8bd00f0e5a3d21a5d811769455d9f33393c8a9a9 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Fri, 14 May 2021 13:57:59 +0200 Subject: [PATCH] cephadm-ansible: update scripts This updates the build and teardown scripts so the playbook in cephadm-ansible repository can be tested with the upstream ci. Signed-off-by: Guillaume Abrioux --- cephadm-ansible-prs/build/build | 19 +++++++++++++++++-- cephadm-ansible-prs/build/teardown | 9 +++++++-- ...nsible-prs.yml => cephadm-ansible-prs.yml} | 0 3 files changed, 24 insertions(+), 4 deletions(-) rename cephadm-ansible-prs/config/definitions/{ceph-ansible-prs.yml => cephadm-ansible-prs.yml} (100%) diff --git a/cephadm-ansible-prs/build/build b/cephadm-ansible-prs/build/build index fed5a944..a2edde82 100644 --- a/cephadm-ansible-prs/build/build +++ b/cephadm-ansible-prs/build/build @@ -1,4 +1,19 @@ #!/bin/bash -# placeholder for now -/bin/true +# the following two methods exist in scripts/build_utils.sh +pkgs=( "tox" ) +install_python_packages "pkgs[@]" + +# XXX this might not be needed +source $VENV/activate + +WORKDIR=$(mktemp -td tox.XXXXXXXXXX) + +delete_libvirt_vms +clear_libvirt_networks +restart_libvirt_services +update_vagrant_boxes + +rm -rf "${HOME}"/ansible/facts/* + +"${VENV}"/tox --workdir="${TEMPVENV}" -c tox.ini -r -v -- --provider=libvirt diff --git a/cephadm-ansible-prs/build/teardown b/cephadm-ansible-prs/build/teardown index fed5a944..9ce6137f 100644 --- a/cephadm-ansible-prs/build/teardown +++ b/cephadm-ansible-prs/build/teardown @@ -1,4 +1,9 @@ #!/bin/bash -# placeholder for now -/bin/true +cd "${WORKSPACE}"/tests + +# the method exists in scripts/build_utils.sh +teardown_vagrant_tests + +# clean fact cache +rm -rf "${HOME}"/ansible/facts/* diff --git a/cephadm-ansible-prs/config/definitions/ceph-ansible-prs.yml b/cephadm-ansible-prs/config/definitions/cephadm-ansible-prs.yml similarity index 100% rename from cephadm-ansible-prs/config/definitions/ceph-ansible-prs.yml rename to cephadm-ansible-prs/config/definitions/cephadm-ansible-prs.yml -- 2.39.5