diff --git a/src/google/adk/cli/cli_deploy.py b/src/google/adk/cli/cli_deploy.py index db4172f922..1f3298d246 100644 --- a/src/google/adk/cli/cli_deploy.py +++ b/src/google/adk/cli/cli_deploy.py @@ -858,6 +858,15 @@ def _print_agent_engine_url(resource_name: str) -> None: ) +def _print_gemini_enterprise_hint() -> None: + """Prints a pointer to the Gemini Enterprise registration docs.""" + click.secho( + 'To make this agent available in Gemini Enterprise, register it by' + ' following:\nhttps://docs.cloud.google.com/gemini/enterprise/docs/register-and-manage-an-adk-agent\n', + fg='cyan', + ) + + def to_agent_engine( *, agent_folder: str, @@ -1302,6 +1311,7 @@ def create_dockerfile_for_agent_engine(resource_name: str) -> None: click.secho(f'Cleaned up the instance: {resource_name}', fg='green') raise e _print_agent_engine_url(resource_name) + _print_gemini_enterprise_hint() finally: temp_folder_path = os.path.join(parent_folder, temp_folder) click.echo(f'Cleaning up the temp folder: {temp_folder_path}') diff --git a/tests/unittests/cli/utils/test_cli_deploy.py b/tests/unittests/cli/utils/test_cli_deploy.py index 5546f816cc..eb50490125 100644 --- a/tests/unittests/cli/utils/test_cli_deploy.py +++ b/tests/unittests/cli/utils/test_cli_deploy.py @@ -250,6 +250,19 @@ def test_print_agent_engine_url() -> None: assert "playground" in call_args +def test_print_gemini_enterprise_hint() -> None: + """It should print a pointer to the Gemini Enterprise registration docs.""" + with mock.patch("click.secho") as mocked_secho: + cli_deploy._print_gemini_enterprise_hint() + mocked_secho.assert_called_once() + call_args = mocked_secho.call_args[0][0] + assert "Gemini Enterprise" in call_args + assert ( + "https://docs.cloud.google.com/gemini/enterprise/docs/register-and-manage-an-adk-agent" + in call_args + ) + + @pytest.mark.parametrize("include_requirements", [True, False]) def test_to_agent_engine_happy_path( monkeypatch: pytest.MonkeyPatch,