Loading .gitlab/ci/lint.yml +22 −16 Changes for .gitlab/ci/lint.yml: 22 added lines, 16 removed lines. Original line number Diff line number Diff line Loading @@ -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: Loading Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading Loading @@ -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 Loading @@ -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 Loading @@ -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') Loading
.gitlab/ci/lint.yml +22 −16 Changes for .gitlab/ci/lint.yml: 22 added lines, 16 removed lines. Original line number Diff line number Diff line Loading @@ -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: Loading Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading @@ -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 Loading Loading @@ -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 Loading @@ -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 Loading @@ -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')