File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ cn-north-1
2+ cn-northwest-1
Original file line number Diff line number Diff line change 1+ af-south-1
2+ ap-east-1
3+ ap-east-2
4+ ap-northeast-1
5+ ap-northeast-2
6+ ap-northeast-3
7+ ap-south-1
8+ ap-south-2
9+ ap-southeast-1
10+ ap-southeast-2
11+ ap-southeast-3
12+ ap-southeast-4
13+ ap-southeast-5
14+ ap-southeast-7
15+ ca-central-1
16+ ca-west-1
17+ eu-central-1
18+ eu-central-2
19+ eu-north-1
20+ eu-south-1
21+ eu-south-2
22+ eu-west-1
23+ eu-west-2
24+ eu-west-3
25+ il-central-1
26+ me-central-1
27+ me-south-1
28+ sa-east-1
29+ us-east-1
30+ us-east-2
31+ us-west-1
32+ us-west-2
Original file line number Diff line number Diff line change 88require 'json'
99require 'open3'
1010
11+ CHINA_REGIONS = File . readlines ( File . join ( File . dirname ( __FILE__ ) , 'aws-regions/cn-regions.txt' ) ) . map ( &:chomp )
12+ OTHER_REGIONS = File . readlines ( File . join ( File . dirname ( __FILE__ ) , 'aws-regions/other_regions.txt' ) ) . map ( &:chomp )
13+
1114if ARGV . length != 1
1215 raise ArgumentError , 'Please specify the layer version to release. e.g. "1"'
1316end
3033 end
3134end
3235
33- regions = %w[
34- af-south-1
35- ap-east-1
36- ap-northeast-1
37- ap-northeast-2
38- ap-northeast-3
39- ap-south-1
40- ap-south-2
41- ap-southeast-1
42- ap-southeast-2
43- ap-southeast-3
44- ap-southeast-4
45- ca-central-1
46- ca-west-1
47- cn-north-1
48- cn-northwest-1
49- eu-central-1
50- eu-central-2
51- eu-north-1
52- eu-south-1
53- eu-south-2
54- eu-west-1
55- eu-west-2
56- eu-west-3
57- il-central-1
58- me-central-1
59- me-south-1
60- sa-east-1
61- us-east-1
62- us-east-2
63- us-west-1
64- us-west-2
65- ]
66-
36+ regions = CHINA_REGIONS + OTHER_REGIONS
6737version = ARGV [ 0 ]
6838semantic_version = "v#{ version } "
6939title = "AWS Lambda Layer #{ semantic_version } "
8353
8454if status . success?
8555 json_data = JSON . parse ( stdout )
86- puts "If there weren't any failures, the release is available at:"
56+ puts "The release is available at:"
8757 puts json_data [ "html_url" ]
8858else
8959 puts "Error creating release: #{ stderr } "
Original file line number Diff line number Diff line change 77require 'time'
88require 'aws-sdk-lambda'
99
10+ CHINA_REGIONS = File . readlines ( File . join ( File . dirname ( __FILE__ ) , 'aws-regions/cn-regions.txt' ) ) . map ( &:chomp )
11+ OTHER_REGIONS = File . readlines ( File . join ( File . dirname ( __FILE__ ) , 'aws-regions/other_regions.txt' ) ) . map ( &:chomp )
1012# Check AWS profiles
1113[ "china" , "non-china" ] . each do |profile |
1214 # Test if we can initialize a client with this profile
3133
3234zip_filename = "layer"
3335
34- cn_regions = [
35- "cn-north-1" ,
36- "cn-northwest-1"
37- ]
38-
3936if dev_mode
4037 target_regions = [ "us-east-1" ]
4138 layer_name_prefix = "instana-ruby-dev"
4239else
43- target_regions = %w[
44- af-south-1
45- ap-east-1
46- ap-east-2
47- ap-northeast-1
48- ap-northeast-2
49- ap-northeast-3
50- ap-south-1
51- ap-south-2
52- ap-southeast-1
53- ap-southeast-2
54- ap-southeast-3
55- ap-southeast-4
56- ap-southeast-5
57- ap-southeast-7
58- ca-central-1
59- ca-west-1
60- cn-north-1
61- cn-northwest-1
62- eu-central-1
63- eu-central-2
64- eu-north-1
65- eu-south-1
66- eu-south-2
67- eu-west-1
68- eu-west-2
69- eu-west-3
70- il-central-1
71- me-central-1
72- me-south-1
73- sa-east-1
74- us-east-1
75- us-east-2
76- us-west-1
77- us-west-2
78- ]
40+ target_regions = CHINA_REGIONS + OTHER_REGIONS
7941 layer_name_prefix = "instana-ruby"
8042end
8143
8648regional_publish = { }
8749target_regions . each do |region | # rubocop:disable Metrics/BlockLength
8850 puts "===> Uploading layer for Ruby to AWS #{ region } "
89- profile = cn_regions . include? ( region ) ? "china" : "non-china"
51+ profile = CHINA_REGIONS . include? ( region ) ? "china" : "non-china"
9052
9153 # Initialize AWS Lambda client for this region and profile
9254 lambda_client = Aws ::Lambda ::Client . new (
You can’t perform that action at this time.
0 commit comments