-
Notifications
You must be signed in to change notification settings - Fork 7
config: add config-production-thunderbird.toml (bug 2012575) #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
8fb65ba
4eefc99
df855bf
f9c3cfd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| [pulse] | ||
| # Those parameters can be overriden by PULSE_* environment variables | ||
| host = "pulse.mozilla.org" | ||
| port = 5671 | ||
| ssl = true | ||
| userid = "SET THIS IN PULSE_USERID ENV VARIABLE" | ||
| password = "SET THIS IN PULSE_PASSWORD ENV VARIABLE" | ||
| # The exchange is declared by the Producer. | ||
| exchange = "exchange/landoprod/pushes" | ||
| routing_key = "gitpushes" | ||
| # The Consumer declares the queue and binds it to the exchange. | ||
| heartbeat = 30 | ||
| queue = "queue/githgsyncprod/pushes" | ||
|
|
||
| [sentry] | ||
| sentry_dsn = "" | ||
|
|
||
| [clones] | ||
| directory = "/clones" | ||
|
|
||
| ############################# | ||
| # THUNDERBIRD-INFRA-TESTING # | ||
| ############################# | ||
|
|
||
| [[tracked_repositories]] | ||
| name = "thunderbird-infra-testing" | ||
| url = "https://github.com/thunderbird/infra-testing.git" | ||
|
|
||
| # | ||
| # COMM-UNIFIED | ||
| # | ||
| # We don't sync to this repository, but we put it here first to fetch all | ||
| # references early, with the benefit of bundles. | ||
| # | ||
| [[branch_mappings]] | ||
| source_url = "https://github.com/thunderbird/infra-testing.git" | ||
| branch_pattern = "THIS_SHOULD_MATCH_NOTHING" | ||
| destination_url = "https://hg.mozilla.org/comm-unified/" | ||
| destination_branch = "NOT_A_VALID_BRANCH" | ||
|
|
||
| [[branch_mappings]] | ||
| source_url = "https://github.com/thunderbird/infra-testing.git" | ||
| branch_pattern = "main" | ||
| destination_url = "ssh://hg.mozilla.org/conduit-testing/comm-infra-testing/" | ||
| destination_branch = "default" | ||
|
|
||
| [[tag_mappings]] | ||
| source_url = "https://github.com/thunderbird/infra-testing.git" | ||
| # (NIGHTLY)_(\d+)_(BASE|END) | ||
| # (BETA)_(\d+)_(BASE|END) | ||
| # (RELEASE)_(\d+)_(BASE|END) | ||
| # tag_pattern = "^(THUNDERBIRD)_.*$" | ||
| # destination_url = "ssh://hg.mozilla.org/releases/comm-beta/" | ||
| # RELEASES | ||
| # tag_pattern = "^(THUNDERBIRD)_.*$" | ||
| # destination_url = "ssh://hg.mozilla.org/releases/comm-release/" | ||
| # ESR | ||
| # tag_pattern = "^(THUNDERBIRD)_(\\d+)(_\\d+)+esr_(BUILD\\d+|RELEASE)$" | ||
| # destination_url = "ssh://hg.mozilla.org/releases/comm-esr\\2/" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should there be a tag_pattern for comm-central? Do the tag_patterns only include tags from the corresponding git branch? https://hg-edge.mozilla.org/comm-central/tags https://hg-edge.mozilla.org/releases/comm-beta/tags https://hg-edge.mozilla.org/releases/comm-release/tags https://hg-edge.mozilla.org/releases/comm-esr140/tags |
||
| tag_pattern = ".+" | ||
| destination_url = "ssh://hg.mozilla.org/conduit-testing/comm-infra-testing/" | ||
| tags_destination_branch = "tags-testing" | ||
| # Default | ||
| #tag_message_suffix = "a=tagging CLOSED TREE DONTBUILD" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,26 @@ | ||
| from pathlib import Path | ||
|
|
||
| import pytest | ||
| from pydantic import ValidationError | ||
|
|
||
| from git_hg_sync.config import Config | ||
|
|
||
| HERE = Path(__file__).parent | ||
| BASEDIR = Path(__file__).parent.parent | ||
|
|
||
|
|
||
| @pytest.mark.parametrize( | ||
| "config_file", | ||
| [ | ||
| "config-development.toml", | ||
| "config-docker.toml", | ||
| "config-production.toml", | ||
| "config-staging.toml", | ||
| ], | ||
| list(BASEDIR.glob("config-*.toml")) | ||
| ) | ||
| def test_config_files(config_file: str) -> None: | ||
| config = Config.from_file(HERE / ".." / config_file) | ||
| def test_config_files(config_file: Path) -> None: | ||
| try: | ||
| config = Config.from_file(config_file) | ||
| except ValidationError as exc: | ||
| raise AssertionError(f"Syntax in {config_file}") from exc | ||
|
|
||
| # We just do a shallow verification. What we really care is that the file could be | ||
| # loaded correctly. | ||
| assert config.pulse | ||
| assert config.tracked_repositories | ||
| assert config.branch_mappings | ||
| assert config.tag_mappings | ||
| assert config.pulse, f"`pulse` section missing in {config_file}" | ||
| assert config.tracked_repositories, f"`tracked_repositories` section missing in {config_file}" | ||
| assert config.branch_mappings, f"`branch_mappings` section missing in {config_file}" | ||
| assert config.tag_mappings, f"`tag_mappings` section missing in {config_file}" |
Uh oh!
There was an error while loading. Please reload this page.