Merge pull request #6773 from ryanpetrello/playbook-scan-symlinks

follow symlinks while discovering valid playbooks

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-04-22 18:35:53 +00:00 committed by GitHub
commit 28c3fa517e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -199,7 +199,7 @@ class ProjectOptions(models.Model):
results = []
project_path = self.get_project_path()
if project_path:
for dirpath, dirnames, filenames in os.walk(smart_str(project_path)):
for dirpath, dirnames, filenames in os.walk(smart_str(project_path), followlinks=True):
if skip_directory(dirpath):
continue
for filename in filenames:

View File

@ -64,6 +64,7 @@ def could_be_playbook(project_path, dir_path, filename):
matched = True
break
except IOError:
logger.exception(f'failed to open {playbook_path}')
return None
if not matched:
return None