Bowrna commented on a change in pull request #20338:
URL: https://github.com/apache/airflow/pull/20338#discussion_r778596878



##########
File path: dev/breeze/src/airflow_breeze/breeze.py
##########
@@ -95,12 +93,103 @@ def shell(verbose: bool):
 
 
 @option_verbose
[email protected]()
-def build_ci_image(verbose: bool):
-    """Builds breeze.ci image for breeze.py."""
[email protected](name='build-ci-image')
[email protected](
+    '--additional-extras',
+    help='This installs additional extra package while installing airflow in 
the image.',
+)
[email protected]('-p', '--python', help='Choose your python version')
[email protected](
+    '--additional-dev-apt-deps', help='Additional apt dev dependencies to use 
when building the images.'
+)
[email protected](
+    '--additional-runtime-apt-deps',
+    help='Additional apt runtime dependencies to use when building the 
images.',
+)
[email protected](
+    '--additional-python-deps', help='Additional python dependencies to use 
when building the images.'
+)
[email protected](
+    '--additional_dev_apt_command', help='Additional command executed before 
dev apt deps are installed.'
+)
[email protected](
+    '--additional_runtime_apt_command',
+    help='Additional command executed before runtime apt deps are installed.',
+)
[email protected](
+    '--additional_dev_apt_env', help='Additional environment variables set 
when adding dev dependencies.'
+)
[email protected](
+    '--additional_runtime_apt_env',
+    help='Additional environment variables set when adding runtime 
dependencies.',
+)
[email protected]('--dev-apt-command', help='The basic command executed before dev 
apt deps are installed.')
[email protected](
+    '--dev-apt-deps',
+    help='The basic apt dev dependencies to use when building the images.',
+)
[email protected](
+    '--runtime-apt-command', help='The basic command executed before runtime 
apt deps are installed.'
+)
[email protected](
+    '--runtime-apt-deps',
+    help='The basic apt runtime dependencies to use when building the images.',
+)
[email protected]('--github-repository', help='Choose repository to push/pull 
image.')
[email protected]('--build-cache', help='Cache option')
[email protected]('--upgrade-to-newer-dependencies', is_flag=True)
+def build_ci_image(
+    verbose: bool,
+    additional_extras: Optional[str],
+    python: Optional[float],
+    additional_dev_apt_deps: Optional[str],
+    additional_runtime_apt_deps: Optional[str],
+    additional_python_deps: Optional[str],
+    additional_dev_apt_command: Optional[str],
+    additional_runtime_apt_command: Optional[str],
+    additional_dev_apt_env: Optional[str],
+    additional_runtime_apt_env: Optional[str],
+    dev_apt_command: Optional[str],
+    dev_apt_deps: Optional[str],
+    runtime_apt_command: Optional[str],
+    runtime_apt_deps: Optional[str],
+    github_repository: Optional[str],
+    build_cache: Optional[str],
+    upgrade_to_newer_dependencies: bool,
+):
+    """Builds docker CI image without entering the container."""
+    from airflow_breeze.ci.build_image import build_image
+
     if verbose:
         console.print(f"\n[blue]Building image of airflow from 
{__AIRFLOW_SOURCES_ROOT}[/]\n")
-    raise ClickException("\nPlease implement building the CI image\n")
+    build_image(
+        verbose,
+        additional_extras=additional_extras,
+        python_version=python,
+        additional_dev_apt_deps=additional_dev_apt_deps,
+        additional_runtime_apt_deps=additional_runtime_apt_deps,
+        additional_python_deps=additional_python_deps,
+        additional_runtime_apt_command=additional_runtime_apt_command,
+        additional_dev_apt_command=additional_dev_apt_command,
+        additional_dev_apt_env=additional_dev_apt_env,
+        additional_runtime_apt_env=additional_runtime_apt_env,
+        dev_apt_command=dev_apt_command,
+        dev_apt_deps=dev_apt_deps,
+        runtime_apt_command=runtime_apt_command,
+        runtime_apt_deps=runtime_apt_deps,
+        github_repository=github_repository,
+        docker_cache=build_cache,
+        upgrade_to_newer_dependencies=upgrade_to_newer_dependencies,
+    )
+
+
+@option_verbose
[email protected](name='build-prod-image')
+def build_prod_image(verbose: bool):
+    """Builds docker Production image without entering the container."""
+    if verbose:
+        console.print("\n[blue]Building image[/]\n")
+    raise ClickException("\nPlease implement building the Production image\n")
 
 
 if __name__ == '__main__':

Review comment:
       @potiuk I have resolved this issue. But I faced a circular import error 
when I added the import part at the beginning of the file. So I have added the 
import just before mkdir command. Is this correct way of handling or can you 
suggest better way than this?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to