Pier Angelo Vendrame pushed to branch tor-browser-128.6.0esr-14.5-1 at The Tor 
Project / Applications / Tor Browser


Commits:
d8c660d5 by Beatriz Rizental at 2025-01-23T19:18:33+01:00
fixup! Add CI for Base Browser

Attempt to download MR branch in case fetching fails due to
the pipeline running in the parent project context.

- - - - -


1 changed file:

- .gitlab/ci/mixins.yml


Changes:

=====================================
.gitlab/ci/mixins.yml
=====================================
@@ -12,7 +12,12 @@
           exit 1
       fi
     - echo "Fetching from remote branch 
${CI_COMMIT_BRANCH:-$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}"
-    - git fetch origin 
"${CI_COMMIT_BRANCH:-$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}"
+    - |
+      if ! git fetch origin 
"${CI_COMMIT_BRANCH:-$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}"; then
+            echo -e "\e[31mFetching failed for branch 
${CI_COMMIT_BRANCH:-$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME} from 
$CI_REPOSITORY_URL.\e[0m"
+            echo "Attempting to fetch the merge request branch, assuming this 
pipeline is not running in a fork."
+            git fetch origin "merge-requests/${CI_MERGE_REQUEST_IID}/head"
+      fi
     - git checkout 
origin/${CI_COMMIT_BRANCH:-$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}
 
 .with-local-repo-pwsh:
@@ -33,5 +38,10 @@
           exit 1
       }
     - Write-Output "Fetching from remote branch $branchName"
-    - git fetch origin $branchName
+    - |
+      if (! git fetch origin $branchName) {
+        Write-Output "Fetching failed for branch $branchName from 
$env:CI_REPOSITORY_URL."
+        Write-Output "Attempting to fetch the merge request branch, assuming 
this pipeline is not running in a fork."
+        git fetch origin "merge-requests/$env:CI_MERGE_REQUEST_IID/head"
+      }
     - git checkout origin/$branchName



View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/d8c660d5d854d0e26dc4e72da626cb5faecb1b32

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/d8c660d5d854d0e26dc4e72da626cb5faecb1b32
You're receiving this email because of your account on gitlab.torproject.org.


_______________________________________________
tbb-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to