From: Nizamudeen A Date: Fri, 7 Jul 2023 10:27:49 +0000 (+0530) Subject: dashboard-cephadm-e2e: move the cleanup script to postbuild step X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5c2e862dc015ab8366e5c8ab588442cc75700c40;p=ceph-build.git dashboard-cephadm-e2e: move the cleanup script to postbuild step Signed-off-by: Nizamudeen A --- diff --git a/ceph-dashboard-cephadm-e2e/build/cleanup b/ceph-dashboard-cephadm-e2e/build/cleanup new file mode 100755 index 00000000..d690cdf4 --- /dev/null +++ b/ceph-dashboard-cephadm-e2e/build/cleanup @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +set +x +echo "Starting cleanup..." +kcli delete plan -y ceph || true +kcli delete network ceph-dashboard -y +kcli delete pool ceph-dashboard -y +sudo rm -rf ${HOME}/.kcli +docker container prune -f +echo "Cleanup completed." diff --git a/ceph-dashboard-cephadm-e2e/config/definitions/ceph-dashboard-cephadm-e2e.yml b/ceph-dashboard-cephadm-e2e/config/definitions/ceph-dashboard-cephadm-e2e.yml index c928405c..2c40619d 100644 --- a/ceph-dashboard-cephadm-e2e/config/definitions/ceph-dashboard-cephadm-e2e.yml +++ b/ceph-dashboard-cephadm-e2e/config/definitions/ceph-dashboard-cephadm-e2e.yml @@ -64,6 +64,12 @@ shallow-clone: true wipe-workspace: true + - git: + url: https://github.com/ceph/ceph-build.git + branches: + - main + basedir: ceph-build + builders: - shell: !include-raw: @@ -92,3 +98,14 @@ - junit: results: 'src/pybind/mgr/dashboard/frontend/cypress/reports/results-*.xml' allow-empty: true + + - postbuildscript: + builders: + - role: SLAVE + build-on: + - SUCCESS + - UNSTABLE + - FAILURE + - ABORTED + build-steps: + - shell: "${WORKSPACE}/ceph-build/ceph-dashboard-cephadm-e2e/build/cleanup" diff --git a/scripts/dashboard/install-cephadm-e2e-deps.sh b/scripts/dashboard/install-cephadm-e2e-deps.sh index 8d500794..0db1a89a 100644 --- a/scripts/dashboard/install-cephadm-e2e-deps.sh +++ b/scripts/dashboard/install-cephadm-e2e-deps.sh @@ -65,7 +65,7 @@ docker container prune -f KCLI_CONFIG_DIR="${HOME}/.kcli" mkdir -p ${KCLI_CONFIG_DIR} if [[ ! -f "${KCLI_CONFIG_DIR}/id_rsa" ]]; then - ssh-keygen -t rsa -q -f "${KCLI_CONFIG_DIR}/id_rsa" -N "" + sudo ssh-keygen -t rsa -q -f "${KCLI_CONFIG_DIR}/id_rsa" -N "" <<< y fi : ${KCLI_CONTAINER_IMAGE:='quay.io/karmab/kcli:2543a61'}