Merge "Add ZUUL_CACHE_DIR to zuul-cloner"

This commit is contained in:
Jenkins 2015-11-15 14:41:45 +00:00 committed by Gerrit Code Review
commit 08078bc7da
2 changed files with 8 additions and 1 deletions

View File

@ -104,3 +104,7 @@ cloning any projects it processes from those found in that directory.
The URL of origin remote of the resulting clone will be reset to use
the ``git_base_url`` and then the remote will be updated so that the
repository has all the information in the upstream repository.
The default for ``--cache-dir`` is taken from the environment variable
``ZUUL_CACHE_DIR``. A value provided explicitly on the command line
overrides the environment variable setting.

View File

@ -51,8 +51,11 @@ class Cloner(zuul.cmd.ZuulApp):
version=self._get_version(),
help='show zuul version')
parser.add_argument('--cache-dir', dest='cache_dir',
default=os.environ.get('ZUUL_CACHE_DIR'),
help=('a directory that holds cached copies of '
'repos from which to make an initial clone.'
'repos from which to make an initial clone. '
'Can also be set via ZUUL_CACHE_DIR '
'environment variable.'
))
parser.add_argument('git_base_url',
help='reference repo to clone from')