()
| 449 | |
| 450 | |
| 451 | def _chain_deploy() -> None: |
| 452 | from rich.console import Console |
| 453 | |
| 454 | console = Console() |
| 455 | |
| 456 | def print_system_exit_failure(exc: SystemExit) -> None: |
| 457 | if isinstance(exc.code, int): |
| 458 | detail = f" with exit code {exc.code}" |
| 459 | elif exc.code: |
| 460 | detail = f": {exc.code}" |
| 461 | else: |
| 462 | detail = "" |
| 463 | console.print(f"\nDeploy failed{detail}\n", style="bold red") |
| 464 | |
| 465 | try: |
| 466 | from crewai_cli.command import AuthenticationRequiredError |
| 467 | from crewai_cli.deploy.main import DeployCommand |
| 468 | |
| 469 | console.print("\nStarting deployment…\n", style="bold #FF5A50") |
| 470 | DeployCommand().create_crew(confirm=True, skip_validate=True) |
| 471 | except AuthenticationRequiredError: |
| 472 | from crewai_cli.authentication.main import AuthenticationCommand |
| 473 | |
| 474 | console.print() |
| 475 | AuthenticationCommand().login() |
| 476 | try: |
| 477 | DeployCommand().create_crew(confirm=True, skip_validate=True) |
| 478 | except AuthenticationRequiredError: |
| 479 | console.print( |
| 480 | "\nDeploy failed: authentication is still required.\n", |
| 481 | style="bold red", |
| 482 | ) |
| 483 | except SystemExit as e: |
| 484 | print_system_exit_failure(e) |
| 485 | except Exception as e: |
| 486 | console.print(f"\nDeploy failed: {e}\n", style="bold red") |
| 487 | except SystemExit as e: |
| 488 | print_system_exit_failure(e) |
| 489 | except Exception as e: |
| 490 | console.print(f"\nDeploy failed: {e}\n", style="bold red") |
| 491 | |
| 492 | |
| 493 | def _print_post_tui_summary(app: CrewRunApp) -> None: |
no test coverage detected
searching dependent graphs…