File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
lib/rspec_tracer/remote_cache Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ class AwsError < StandardError; end
8
8
def initialize
9
9
@s3_bucket , @s3_path = setup_s3
10
10
@aws_cli = RSpecTracer . use_local_aws ? 'awslocal' : 'aws'
11
+ @use_test_suite_id_cache = ENV [ 'USE_TEST_SUITE_ID_CACHE' ] == 'true'
12
+ @test_suite_id = ENV [ 'TEST_SUITE_ID' ] if @use_test_suite_id_cache
11
13
end
12
14
13
15
def branch_refs? ( branch_name )
@@ -60,7 +62,11 @@ def upload_branch_refs(branch_name, file_name)
60
62
end
61
63
62
64
def cache_files_list ( ref )
63
- prefix = "s3://#{ @s3_bucket } /#{ @s3_path } /#{ ref } /"
65
+ if @use_test_suite_id_cache && !@test_suite_id . nil?
66
+ prefix = "s3://#{ @s3_bucket } /#{ @s3_path } /#{ ref } /#{ @test_suite_id } /"
67
+ else
68
+ prefix = "s3://#{ @s3_bucket } /#{ @s3_path } /#{ ref } /"
69
+ end
64
70
65
71
`#{ @aws_cli } s3 ls #{ prefix } --recursive` . chomp . split ( "\n " )
66
72
end
You can’t perform that action at this time.
0 commit comments