Changeset View
Changeset View
Standalone View
Standalone View
lilybuild/lilybuild/config.py
| Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | def add_repo( | ||||
| do_poll=False, | do_poll=False, | ||||
| alternative_urls=None, | alternative_urls=None, | ||||
| phorge_base_url=None, | phorge_base_url=None, | ||||
| phorge_token=None, | phorge_token=None, | ||||
| # Function(build -> dict(str -> str | renderable<str>)) | # Function(build -> dict(str -> str | renderable<str>)) | ||||
| variables_getter=None, | variables_getter=None, | ||||
| artifact_compressed_limit=None, | artifact_compressed_limit=None, | ||||
| artifact_uncompressed_limit=None, | artifact_uncompressed_limit=None, | ||||
| artifact_latest_branch_map=None, | |||||
| ): | ): | ||||
| if not alternative_urls: | if not alternative_urls: | ||||
| alternative_urls = [] | alternative_urls = [] | ||||
| self.repos[repo_id] = { | self.repos[repo_id] = { | ||||
| 'repo_id': repo_id, | 'repo_id': repo_id, | ||||
| 'repo_url': repo_url, | 'repo_url': repo_url, | ||||
| 'do_poll': do_poll, | 'do_poll': do_poll, | ||||
| 'alternative_urls': alternative_urls, | 'alternative_urls': alternative_urls, | ||||
| 'phorge_base_url': normalize_base_url(phorge_base_url) or self.phorge_base_url, | 'phorge_base_url': normalize_base_url(phorge_base_url) or self.phorge_base_url, | ||||
| 'phorge_token': phorge_token or self.phorge_token, | 'phorge_token': phorge_token or self.phorge_token, | ||||
| 'variables_getter': variables_getter or (lambda _build: {}), | 'variables_getter': variables_getter or (lambda _build: {}), | ||||
| 'artifact_compressed_limit': artifact_compressed_limit or self.artifact_compressed_limit, | 'artifact_compressed_limit': artifact_compressed_limit or self.artifact_compressed_limit, | ||||
| 'artifact_uncompressed_limit': artifact_uncompressed_limit or self.artifact_uncompressed_limit, | 'artifact_uncompressed_limit': artifact_uncompressed_limit or self.artifact_uncompressed_limit, | ||||
| 'artifact_latest_branch_map': artifact_latest_branch_map or {}, | |||||
| } | } | ||||
| self.record_url(repo_id, repo_url) | self.record_url(repo_id, repo_url) | ||||
| for u in alternative_urls: | for u in alternative_urls: | ||||
| self.record_url(repo_id, u) | self.record_url(repo_id, u) | ||||
| def get_builder_name_for_repo(self, repo_def): | def get_builder_name_for_repo(self, repo_def): | ||||
| main_repo_url = repo_def['repo_url'] | main_repo_url = repo_def['repo_url'] | ||||
| return f'lilybuild - {main_repo_url}' | return f'lilybuild - {main_repo_url}' | ||||
| ▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines | |||||