]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
dashboard-cephadm-e2e: move the cleanup script to postbuild step 2145/head
authorNizamudeen A <nia@redhat.com>
Fri, 7 Jul 2023 10:27:49 +0000 (15:57 +0530)
committerNizamudeen A <nia@redhat.com>
Fri, 7 Jul 2023 11:57:06 +0000 (17:27 +0530)
Signed-off-by: Nizamudeen A <nia@redhat.com>
ceph-dashboard-cephadm-e2e/build/cleanup [new file with mode: 0755]
ceph-dashboard-cephadm-e2e/config/definitions/ceph-dashboard-cephadm-e2e.yml
scripts/dashboard/install-cephadm-e2e-deps.sh

diff --git a/ceph-dashboard-cephadm-e2e/build/cleanup b/ceph-dashboard-cephadm-e2e/build/cleanup
new file mode 100755 (executable)
index 0000000..d690cdf
--- /dev/null
@@ -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."
index c928405c24eacb1cadfd009a24eb226afa70390b..2c40619d83f1a89d643ea4f046b3df0a44112f50 100644 (file)
           shallow-clone: true
           wipe-workspace: true
 
+      - git:
+          url: https://github.com/ceph/ceph-build.git
+          branches:
+            - main
+          basedir: ceph-build
+
     builders:
       - shell:
           !include-raw:
       - 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"
index 8d500794521ef45d97774129a306cd533517ccaa..0db1a89a0b70738e71dfd4f26e5ef31cfa2c4e4c 100644 (file)
@@ -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'}