Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion taskcat/_cli_modules/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def __init__(
dry_run: bool = False,
object_acl: str = "",
exclude_prefix: list = None,
): # pylint: disable=too-many-locals
all_files: bool = False,
): # pylint: disable=too-many-locals,too-many-arguments
"""does lambda packaging and uploads to s3

:param config_file: path to taskcat project config file
Expand Down Expand Up @@ -68,4 +69,5 @@ def __init__(
config.project_root,
exclude_prefix,
dry_run,
all_files,
)
11 changes: 9 additions & 2 deletions taskcat/_s3_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ class S3BucketCreatorException(TaskCatException):
pass


def stage_in_s3(buckets, project_name, project_root, exclude_prefix, dry_run=False):
def stage_in_s3(
buckets, project_name, project_root, exclude_prefix, dry_run=False, all_files=False
):
distinct_buckets = {}

for test in buckets.values():
Expand All @@ -36,16 +38,21 @@ def stage_in_s3(buckets, project_name, project_root, exclude_prefix, dry_run=Fal
project_root=project_root,
dry_run=dry_run,
exclude_prefix=exclude_prefix,
all_files=all_files,
)
pool.map(func, distinct_buckets.values())
pool.close()
pool.join()


def _sync_wrap(bucket, project_name, project_root, dry_run, exclude_prefix):
def _sync_wrap(bucket, project_name, project_root, dry_run, exclude_prefix, all_files):
if exclude_prefix:
S3Sync.exclude_remote_path_prefixes += exclude_prefix
S3Sync.exclude_path_prefixes += exclude_prefix
if all_files:
S3Sync.exclude_files = [".taskcat.yml"]
S3Sync.exclude_path_prefixes = []
S3Sync.exclude_remote_path_prefixes = []
S3Sync(
bucket.s3_client,
bucket.name,
Expand Down