kszucs commented on a change in pull request #7021:
URL: https://github.com/apache/arrow/pull/7021#discussion_r420036720



##########
File path: dev/archery/archery/cli.py
##########
@@ -650,11 +651,130 @@ def integration(with_all=False, random_seed=12345, 
**args):
 @click.option('--crossbow-token', '-ct', envvar='CROSSBOW_GITHUB_TOKEN',
               help='OAuth token for pushing to the crossow repository')
 def trigger_bot(event_name, event_payload, arrow_token, crossbow_token):
+    from .bot import CommentBot, actions
+
     event_payload = json.loads(event_payload.read())
 
     bot = CommentBot(name='github-actions', handler=actions, token=arrow_token)
     bot.handle(event_name, event_payload)
 
 
+@archery.group('docker')
+@click.option("--src", metavar="<arrow_src>", default=None,
+              callback=validate_arrow_sources,
+              help="Specify Arrow source directory.")
+@click.pass_obj
+def docker_compose(obj, src):
+    """Interact with docker-compose based builds."""
+    from .docker import DockerCompose
+
+    config_path = src.path / 'docker-compose.yml'
+    if not config_path.exists():
+        raise click.ClickException(
+            "Docker compose configuration cannot be found in directory {}, "
+            "try to pass the arrow source directory explicitly.".format(src)
+        )
+
+    # take the docker-compose parameters like PYTHON, PANDAS, UBUNTU from the
+    # environment variables to keep the usage similar to docker-compose
+    obj['compose'] = DockerCompose(config_path, params=os.environ)
+    obj['compose'].validate()
+
+
+@docker_compose.command('run')
+@click.argument('image')
+@click.argument('command', required=False, default=None)
+@click.option('--env', '-e', multiple=True,
+              help='Set environment variable within the container')
+@click.option('--build/--no-build', default=True,
+              help='Force build the image and its parents')
+@click.option('--cache/--no-cache', default=True,
+              help='Try to pull the image and its parents')
+@click.option('--cache-leaf/--no-cache-leaf', default=True,
+              help='Force build the image and its parents')

Review comment:
       Right, updating.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to