Don't add tarball to config-download dir
GitPyton's repo.index.add defaults to force adding all ignored file
patterns from .gitignore. This was causing the generated
overcloud-config.tar.gz to also be included in the git repo. This caused
the config-download directory to recursivley grow larger in size as each
commit contained a tarball of the whole repo.
Using repo.git.add instead allows the .gitignore to be honored so that
the tarball isn't included in any commits.
Change-Id: I5c7b4fc448d957e30c0ea386795c9b698e9febed
Closes-Bug: #1795949
(cherry picked from commit 356334b131
)
This commit is contained in:
parent
39ec3f6169
commit
e8d9d162e5
|
@ -150,7 +150,9 @@ class Config(object):
|
|||
def snapshot_config_dir(self, repo, commit_message):
|
||||
if repo.is_dirty(untracked_files=True):
|
||||
self.log.info('Snapshotting {}'.format(repo.working_dir))
|
||||
repo.index.add('*')
|
||||
# Use repo.git.add directly as repo.index.add defaults to forcing
|
||||
# commit of ignored files, which we don't want.
|
||||
repo.git.add('.')
|
||||
commit = repo.index.commit(commit_message)
|
||||
self.log.info('Created commit {}'.format(commit.hexsha))
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue