diff --git a/src/staging/bot.py b/src/staging/bot.py index b12bd1aba..a4f1598ee 100644 --- a/src/staging/bot.py +++ b/src/staging/bot.py @@ -1044,6 +1044,18 @@ async def fetch_build_results(self) -> list[RepositoryBuildResult]: (await self._run_cmd(self._osc_fetch_results_cmd())).stdout ) + @property + def staging_project_registry_base_url(self) -> str: + """Returns the base url to the containers in the staging project on + OBS. This url is missing the repository name and the actual container + tag, but it can be used to plug the staging project directly into + BCI-tests. + + """ + return "registry.opensuse.org/" + self.staging_project_name.lower().replace( + ":", "/" + ) + async def force_rebuild(self) -> str: """Deletes all binaries of the project on OBS and force rebuilds everything.""" await self._run_cmd( @@ -1688,7 +1700,15 @@ async def _create_staging_proj(): elif action == "query_build_result": async def print_build_res(): - return render_as_markdown(await bot.fetch_build_results()) + prefix = "" + # we don't support BCI tests for Tumbleweed yet… + if bot.os_version != OsVersion.TUMBLEWEED: + prefix = f"""You can run the BCI test suite against this PR via: +```ShellSession +$ OS_VERSION=15.{bot.os_version} TARGET=custom BASEURL={bot.staging_project_registry_base_url} tox -e $ENV -- -n auto +``` + """ + return prefix + render_as_markdown(await bot.fetch_build_results()) coro = print_build_res()