From a338bd77a150649b1933471384de1d8fafab7988 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Tue, 3 Jun 2025 14:59:14 +0200 Subject: [PATCH] Update stage3 to get logs even if some containers did not init properly This commit adds a workaround to get airflow-scheduler log, while Airflow helm chart is not dealing properly with the value `fullnameOverride`, which is required now that Airflow is a subchart of OSM Helm chart. Change-Id: I1db25801a118adc7cd8357ce61039e7761b44ed3 Signed-off-by: garciadeblas --- jenkins/ci-pipelines/ci_stage_3.groovy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index ecf25e5a..41fd9d68 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -157,18 +157,18 @@ void archive_logs(Map remote) { for deployment in `kubectl -n osm get deployments | grep -v operator | grep -v NAME| awk '{print $1}'`; do echo "Extracting log for $deployment" kubectl -n osm logs deployments/$deployment --timestamps=true --all-containers 2>&1 \ - > logs/$deployment.log + > logs/$deployment.log || true done ''' sshCommand remote: remote, command: ''' for statefulset in `kubectl -n osm get statefulsets | grep -v operator | grep -v NAME| awk '{print $1}'`; do echo "Extracting log for $statefulset" kubectl -n osm logs statefulsets/$statefulset --timestamps=true --all-containers 2>&1 \ - > logs/$statefulset.log + > logs/$statefulset.log || true done ''' sshCommand remote: remote, command: ''' - schedulerPod="$(kubectl get pods -n osm | grep airflow-scheduler| awk '{print $1; exit}')"; \ + schedulerPod="$(kubectl get pods -n osm | grep osm-scheduler| awk '{print $1; exit}')"; \ echo "Extracting logs from Airflow DAGs from pod ${schedulerPod}"; \ kubectl cp -n osm ${schedulerPod}:/opt/airflow/logs/scheduler/latest/dags logs/dags -c scheduler ''' -- 2.25.1