MCPcopy
hub / github.com/crewAIInc/crewAI / _chain_deploy

Function _chain_deploy

lib/cli/src/crewai_cli/run_crew.py:451–490  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

449
450
451def _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
493def _print_post_tui_summary(app: CrewRunApp) -> None:

Callers 1

_run_json_crewFunction · 0.85

Calls 6

DeployCommandClass · 0.90
printMethod · 0.45
create_crewMethod · 0.45
loginMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…