[tor-commits] [Git][tpo/applications/tor-browser][base-browser-128.4.0esr-14.0-1] 2 commits: fixup! Add CI for Base Browser

Pier Angelo Vendrame (@pierov) git at gitlab.torproject.org
Tue Oct 22 14:03:56 UTC 2024



Pier Angelo Vendrame pushed to branch base-browser-128.4.0esr-14.0-1 at The Tor Project / Applications / Tor Browser


Commits:
b9ec7075 by Beatriz Rizental at 2024-10-22T16:02:57+02:00
fixup! Add CI for Base Browser

Always use tor-browser repository as base for CI clones.

This is fine, because both tor-browser and mullvad-browser
repositories share most of their history.

- - - - -
c66fb92a by Beatriz Rizental at 2024-10-22T16:02:57+02:00
fixup! Add CI for Base Browser

- - - - -


2 changed files:

- .gitlab-ci.yml
- .gitlab/ci/lint.yml


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -3,7 +3,7 @@ stages:
 
 variables:
   IMAGE_PATH: containers.torproject.org/tpo/applications/tor-browser/base:latest
-  LOCAL_REPO_PATH: /srv/apps-repos/${CI_PROJECT_NAME}.git
+  LOCAL_REPO_PATH: /srv/apps-repos/tor-browser.git
 
 include:
   - local: '.gitlab/ci/lint.yml'


=====================================
.gitlab/ci/lint.yml
=====================================
@@ -22,7 +22,13 @@
     - git remote add local "$LOCAL_REPO_PATH"
     - git fetch --depth 500 local
     - git remote add origin "$CI_REPOSITORY_URL"
-    - git fetch origin ${CI_COMMIT_BRANCH:-$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}
+    - |
+      if [ -z "${CI_COMMIT_BRANCH:-$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}" ]; then
+          echo "No branch specified. Stopping the pipeline."
+          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}"
     - git checkout origin/${CI_COMMIT_BRANCH:-$CI_MERGE_REQUEST_SOURCE_BRANCH_NAME}
 
 eslint:
@@ -52,7 +58,7 @@ eslint:
         - 'tools/lint/eslint/eslint-plugin-mozilla/**'
         - 'tools/lint/eslint/eslint-plugin-spidermonkey-js/**'
     # Run job whenever a commit is merged to a protected branch
-    - if: $CI_COMMIT_REF_PROTECTED == 'true'
+    - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true')
 
 stylelint:
   extends: .base
@@ -70,7 +76,7 @@ stylelint:
         - '**/.stylelintignore'
         - '**/*stylelintrc*'
     # Run job whenever a commit is merged to a protected branch
-    - if: $CI_COMMIT_REF_PROTECTED == 'true'
+    - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true')
 
 py-black:
   extends: .base
@@ -89,7 +95,7 @@ py-black:
         - 'pyproject.toml'
         - 'tools/lint/black.yml'
     # Run job whenever a commit is merged to a protected branch
-    - if: $CI_COMMIT_REF_PROTECTED == 'true'
+    - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true')
 
 py-ruff:
   extends: .base
@@ -108,7 +114,7 @@ py-ruff:
         - 'tools/lint/python/ruff.py'
         - 'tools/lint/python/ruff_requirements.txt'
     # Run job whenever a commit is merged to a protected branch
-    - if: $CI_COMMIT_REF_PROTECTED == 'true'
+    - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true')
 
 yaml:
   extends: .base
@@ -123,7 +129,7 @@ yaml:
         - '**/*.yaml'
         - '**/.ymllint'
     # Run job whenever a commit is merged to a protected branch
-    - if: $CI_COMMIT_REF_PROTECTED == 'true'
+    - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true')
 
 shellcheck:
   extends: .base
@@ -137,7 +143,7 @@ shellcheck:
         - '**/*.sh'
         - 'tools/lint/shellcheck.yml'
     # Run job whenever a commit is merged to a protected branch
-    - if: $CI_COMMIT_REF_PROTECTED == 'true'
+    - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true')
 
 clang-format:
   extends: .base
@@ -157,7 +163,7 @@ clang-format:
         - '**/*.mm'
         - 'tools/lint/clang-format.yml'
     # Run job whenever a commit is merged to a protected branch
-    - if: $CI_COMMIT_REF_PROTECTED == 'true'
+    - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true')
 
 rustfmt:
   extends: .base
@@ -171,7 +177,7 @@ rustfmt:
         - '**/*.rs'
         - 'tools/lint/rustfmt.yml'
     # Run job whenever a commit is merged to a protected branch
-    - if: $CI_COMMIT_REF_PROTECTED == 'true'
+    - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true')
 
 fluent-lint:
   extends: .base
@@ -186,7 +192,7 @@ fluent-lint:
         - 'tools/lint/fluent-lint.yml'
         - 'tools/lint/fluent-lint/exclusions.yml'
     # Run job whenever a commit is merged to a protected branch
-    - if: $CI_COMMIT_REF_PROTECTED == 'true'
+    - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true')
 
 localization:
   extends: .base
@@ -203,7 +209,7 @@ localization:
         - 'third_party/python/fluent/**'
         - 'tools/lint/l10n.yml'
     # Run job whenever a commit is merged to a protected branch
-    - if: $CI_COMMIT_REF_PROTECTED == 'true'
+    - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true')
 
 mingw-capitalization:
   extends: .base
@@ -220,7 +226,7 @@ mingw-capitalization:
         - '**/*.h'
         - 'tools/lint/mingw-capitalization.yml'
     # Run job whenever a commit is merged to a protected branch
-    - if: $CI_COMMIT_REF_PROTECTED == 'true'
+    - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true')
 
 mscom-init:
   extends: .base
@@ -237,7 +243,7 @@ mscom-init:
         - '**/*.h'
         - 'tools/lint/mscom-init.yml'
     # Run job whenever a commit is merged to a protected branch
-    - if: $CI_COMMIT_REF_PROTECTED == 'true'
+    - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true')
 
 file-whitespace:
   extends: .base
@@ -267,7 +273,7 @@ file-whitespace:
         - '**/*.java'
         - 'tools/lint/file-whitespace.yml'
     # Run job whenever a commit is merged to a protected branch
-    - if: $CI_COMMIT_REF_PROTECTED == 'true'
+    - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true')
 
 test-manifest:
   extends: .base
@@ -282,7 +288,7 @@ test-manifest:
         - 'python/mozlint/**'
         - 'tools/lint/**'
     # Run job whenever a commit is merged to a protected branch
-    - if: $CI_COMMIT_REF_PROTECTED == 'true'
+    - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true')
 
 trojan-source:
   extends: .base
@@ -301,4 +307,4 @@ trojan-source:
         - '**/*.rs'
         - 'tools/lint/trojan-source.yml'
     # Run job whenever a commit is merged to a protected branch
-    - if: $CI_COMMIT_REF_PROTECTED == 'true'
+    - if: ($CI_COMMIT_BRANCH && $CI_COMMIT_REF_PROTECTED == 'true')



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/24e628c1fd3f0593e23334acf55dc81909c30099...c66fb92a38ef4ce8b1b02af01cb3580382f511fd

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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-commits/attachments/20241022/1d2440b7/attachment-0001.htm>


More information about the tor-commits mailing list