From 054409508daa3eaf0904083674b8be836ed7ecc6 Mon Sep 17 00:00:00 2001
From: gregoire kubler <gregoire.kubler@proton.me>
Date: Fri, 22 Nov 2024 13:38:29 +0100
Subject: [PATCH] chore : added more debug prints

---
 .gitlab/ci/download/select_jobs.gitlab-ci.yml | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/.gitlab/ci/download/select_jobs.gitlab-ci.yml b/.gitlab/ci/download/select_jobs.gitlab-ci.yml
index 8a75bc4..268cbf5 100644
--- a/.gitlab/ci/download/select_jobs.gitlab-ci.yml
+++ b/.gitlab/ci/download/select_jobs.gitlab-ci.yml
@@ -409,11 +409,15 @@
             $MR_PIPELINES=(Invoke-RestMethod -Uri "$DEP_API_URL/merge_requests/$($MR_ID[0].iid)/pipelines" -Method Get)
             $PIPELINES+=$MR_PIPELINES
         }
-        ## Sort pipelines by "updated_at" from earliest to latest and only retrieve the ones whose url contain our project namespaec.
+        Write-Host "Pipelines retrieved:"
+        $PIPELINES | Out-String
+
+        Write-Host "Sorting pipelines from newest to oldest & filtering out those not linked to CI_PROJECT_NAMESPACE ($CI_PROJECT_NAMESPACE)"
         $PIPELINES = $PIPELINES | 
                      Where-Object { $_.web_url -match $CI_PROJECT_NAMESPACE } | 
                      Sort-Object -Property updated_at -Descending
-
+        Write-Host "Final Pipelines to parse : "
+        $PIPELINES | Out-String
         Write-Host "*************************************************************************"
         Write-Host "*************************************************************************"
         Write-Host "**"
-- 
GitLab