Ver código fonte

Rename envvar switch to COMPOSE_DOCKER_CLI_BUILD

From `COMPOSE_NATIVE_BUILDER` to `COMPOSE_DOCKER_CLI_BUILD`

Signed-off-by: Ulysses Souza <[email protected]>
Ulysses Souza 6 anos atrás
pai
commit
5add9192ac
3 arquivos alterados com 7 adições e 7 exclusões
  1. 3 3
      compose/cli/main.py
  2. 2 2
      compose/project.py
  3. 2 2
      tests/integration/service_test.py

+ 3 - 3
compose/cli/main.py

@@ -272,7 +272,7 @@ class TopLevelCommand(object):
             --parallel              Build images in parallel.
             --progress string       Set type of progress output (auto, plain, tty).
                                     EXPERIMENTAL flag for native builder.
-                                    To enable, run with COMPOSE_NATIVE_BUILDER=1)
+                                    To enable, run with COMPOSE_DOCKER_CLI_BUILD=1)
             --pull                  Always attempt to pull a newer version of the image.
             -q, --quiet             Don't print anything to STDOUT
         """
@@ -286,7 +286,7 @@ class TopLevelCommand(object):
                 )
             build_args = resolve_build_args(build_args, self.toplevel_environment)
 
-        native_builder = self.toplevel_environment.get_boolean('COMPOSE_NATIVE_BUILDER')
+        native_builder = self.toplevel_environment.get_boolean('COMPOSE_DOCKER_CLI_BUILD')
 
         self.project.build(
             service_names=options['SERVICE'],
@@ -1078,7 +1078,7 @@ class TopLevelCommand(object):
         for excluded in [x for x in opts if options.get(x) and no_start]:
             raise UserError('--no-start and {} cannot be combined.'.format(excluded))
 
-        native_builder = self.toplevel_environment.get_boolean('COMPOSE_NATIVE_BUILDER')
+        native_builder = self.toplevel_environment.get_boolean('COMPOSE_DOCKER_CLI_BUILD')
 
         with up_shutdown_context(self.project, service_names, timeout, detached):
             warn_for_swarm_mode(self.project.client)

+ 2 - 2
compose/project.py

@@ -369,10 +369,10 @@ class Project(object):
             log.warning("Native build is an experimental feature and could change at any time")
             if parallel_build:
                 log.warning("Flag '--parallel' is ignored when building with "
-                            "COMPOSE_NATIVE_BUILDER=1")
+                            "COMPOSE_DOCKER_CLI_BUILD=1")
             if gzip:
                 log.warning("Flag '--compress' is ignored when building with "
-                            "COMPOSE_NATIVE_BUILDER=1")
+                            "COMPOSE_DOCKER_CLI_BUILD=1")
 
         def build_service(service):
             service.build(no_cache, pull, force_rm, memory, build_args, gzip, rm, silent, cli, progress)

+ 2 - 2
tests/integration/service_test.py

@@ -978,7 +978,7 @@ class ServiceTest(DockerClientTestCase):
         service = self.create_service('web',
                                       build={'context': base_dir},
                                       environment={
-                                          'COMPOSE_NATIVE_BUILDER': '1',
+                                          'COMPOSE_DOCKER_CLI_BUILD': '1',
                                           'DOCKER_BUILDKIT': '1',
                                       })
         service.build(cli=True)
@@ -995,7 +995,7 @@ class ServiceTest(DockerClientTestCase):
         web = self.create_service('web',
                                   build={'context': base_dir},
                                   environment={
-                                      'COMPOSE_NATIVE_BUILDER': '1',
+                                      'COMPOSE_DOCKER_CLI_BUILD': '1',
                                       'DOCKER_BUILDKIT': '1',
                                   })
         project = Project('composetest', [web], self.client)