Fix log retrieving from Airflow DAGs to avoid wrong exit of stage3 59/15259/1
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Wed, 25 Jun 2025 16:55:57 +0000 (18:55 +0200)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Wed, 25 Jun 2025 16:56:08 +0000 (18:56 +0200)
Change-Id: I6428ce6b37a9af5db3d1df001a27a97f6d46a0e6
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
jenkins/ci-pipelines/ci_stage_3.groovy

index 9ceabee..b9e3059 100644 (file)
@@ -170,7 +170,7 @@ void archive_logs(Map remote) {
         sshCommand remote: remote, command: '''
             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
+            kubectl -n osm cp ${schedulerPod}:/opt/airflow/logs/scheduler/latest/dags logs/dags -c scheduler 2>&1 || true
         '''
     }