Updates to the image for MOSK 25.2.x
* fixed an issue in mos-spt, improve report name and location
* imrpoved cleanup script: show details on dry-run, skip tempest net
* revert to jammy image as base for the toolset dockerfile
* improved ceph collect report location
Related-PROD: PROD-37187
Change-Id: I138d9e550cd244be122ff035bbb67433eb866910
diff --git a/k8s/docker-mos-toolset-full b/k8s/docker-mos-toolset-full
index cc6cb6d..9fef71f 100644
--- a/k8s/docker-mos-toolset-full
+++ b/k8s/docker-mos-toolset-full
@@ -10,7 +10,10 @@
apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances iperf3 iperf fio nfs-utils | grep "^\w" | sort -u) || true && \
rm -rf /var/lib/apt/lists/*
-FROM mirantis.azurecr.io/openstack/heat:epoxy-noble-20251017061956
+# TODO: in future change to tag epoxy-noble-20251017061956
+# but this will lead to possible dependencies issues in some test repos (e.g. cfg-checker, mos-spt)
+# some need some time to test this and move to Noble inside the toolset docker container and k8s pod
+FROM mirantis.azurecr.io/openstack/heat:caracal-jammy-20250314195424
LABEL maintainer="qa-ps@mirantis.com"
@@ -22,7 +25,7 @@
COPY --from=download-packages-1804 /opt/packages-1804 /opt/packages-1804
RUN apt-get clean && apt-get update && \
- apt-get install -y make gcc g++ git libaio-dev libaio1 zlib1g-dev fio && \
+ apt-get install -y make gcc g++ git libaio-dev zlib1g-dev fio && \
mkdir /opt/density && \
rm -rf /var/lib/apt/lists/*
@@ -33,11 +36,11 @@
rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
- curl https://baltocdn.com/helm/signing.asc | apt-key add - && \
apt-get install apt-transport-https --yes && \
- echo "deb https://baltocdn.com/helm/stable/debian/ all main" | tee /etc/apt/sources.list.d/helm-stable-debian.list && \
- apt-get update && \
- apt-get install -y helm && \
+ curl -fsSL https://packages.buildkite.com/helm-linux/helm-debian/gpgkey | gpg --dearmor | sudo tee /usr/share/keyrings/helm.gpg > /dev/null && \
+ echo "deb [signed-by=/usr/share/keyrings/helm.gpg] https://packages.buildkite.com/helm-linux/helm-debian/any/ any main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list && \
+ sudo apt-get update && \
+ sudo apt-get install -y helm && \
rm -rf /var/lib/apt/lists/*
RUN pip3 install --no-cache-dir pyghmi tempestparser
diff --git a/k8s/src/mos-spt.tgz b/k8s/src/mos-spt.tgz
index 2ec054b..9081002 100644
--- a/k8s/src/mos-spt.tgz
+++ b/k8s/src/mos-spt.tgz
Binary files differ
diff --git a/k8s/workspace/run-ceph-info-mos.sh b/k8s/workspace/run-ceph-info-mos.sh
index 462b05b..275a571 100644
--- a/k8s/workspace/run-ceph-info-mos.sh
+++ b/k8s/workspace/run-ceph-info-mos.sh
@@ -3,7 +3,16 @@
. "$(dirname "$0")/functions.sh"
. /opt/cfg-checker/.checkervenv/bin/activate
+current_dir=$(pwd)
+cd /artifacts/reports
+
fname="$MY_PROJFOLDER/reports/$MY_CLIENTSHORTNAME-mos-ceph-info-$(get_timestamp).html"
mos-checker ceph info --client-name $MY_CLIENTNAME --project-name $MY_PROJNAME --html "${fname}"
update_latest_report_to "${fname}"
deactivate
+
+cd "${current_dir}"
+echo ""
+echo "The reports are saved to:"
+ls -art /artifacts/reports/ | tail -n2 | sed 's|^|/artifacts/reports/|'
+echo ""
\ No newline at end of file
diff --git a/k8s/workspace/run-openstack-spt.sh b/k8s/workspace/run-openstack-spt.sh
index 13a0e2b..30052ae 100644
--- a/k8s/workspace/run-openstack-spt.sh
+++ b/k8s/workspace/run-openstack-spt.sh
@@ -1,5 +1,6 @@
#!/bin/bash
tenv=mos
+. /artifacts/env.sh
. $MY_PROJFOLDER/envs/${tenv}rc
##
echo "### Checking openstack resources"
@@ -29,4 +30,11 @@
echo "# Copying SPT HTML test report"
mkdir -p /artifacts/reports/mos-spt
kubectl exec toolset --stdin --tty -n qa-space -- bash -c "mkdir -p /opt/mos-spt/html_reports && cp /opt/mos-spt/*.html /opt/mos-spt/html_reports"
-kubectl cp qa-space/toolset:/opt/mos-spt/html_reports/ /artifacts/reports/mos-spt/
\ No newline at end of file
+kubectl cp qa-space/toolset:/opt/mos-spt/html_reports/ /artifacts/reports/mos-spt/
+
+# copy and rename the test report
+latest_file=$(ls /artifacts/reports/mos-spt/ | sort | tail -n1)
+new_name="${MY_CLIENTSHORTNAME}-${latest_file}"
+cp "/artifacts/reports/mos-spt/$latest_file" "/artifacts/reports/$new_name"
+echo ""
+echo "The report is saved to /artifacts/reports/${new_name}"
\ No newline at end of file