firespring_dev_commands 2.2.8.pre.alpha.1 → 2.5.0.pre.alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/firespring_dev_commands/audit/report.rb +2 -9
- data/lib/firespring_dev_commands/aws/account.rb +1 -1
- data/lib/firespring_dev_commands/aws/cloudformation.rb +3 -10
- data/lib/firespring_dev_commands/aws/login.rb +1 -1
- data/lib/firespring_dev_commands/common.rb +2 -22
- data/lib/firespring_dev_commands/docker/status.rb +0 -20
- data/lib/firespring_dev_commands/docker.rb +16 -86
- data/lib/firespring_dev_commands/eol/aws.rb +2 -10
- data/lib/firespring_dev_commands/eol.rb +2 -22
- data/lib/firespring_dev_commands/git.rb +24 -37
- data/lib/firespring_dev_commands/jira/issue.rb +1 -3
- data/lib/firespring_dev_commands/node.rb +1 -1
- data/lib/firespring_dev_commands/php/audit.rb +0 -4
- data/lib/firespring_dev_commands/php.rb +12 -28
- data/lib/firespring_dev_commands/platform.rb +31 -38
- data/lib/firespring_dev_commands/ruby.rb +3 -6
- data/lib/firespring_dev_commands/target_process/query.rb +4 -30
- data/lib/firespring_dev_commands/target_process/release.rb +1 -1
- data/lib/firespring_dev_commands/target_process/team_assignment.rb +1 -1
- data/lib/firespring_dev_commands/target_process/user.rb +1 -13
- data/lib/firespring_dev_commands/target_process/user_story.rb +1 -1
- data/lib/firespring_dev_commands/target_process/user_story_history.rb +1 -1
- data/lib/firespring_dev_commands/target_process.rb +7 -24
- data/lib/firespring_dev_commands/templates/aws.rb +6 -33
- data/lib/firespring_dev_commands/templates/base_interface.rb +2 -2
- data/lib/firespring_dev_commands/templates/ci.rb +11 -16
- data/lib/firespring_dev_commands/templates/docker/application.rb +2 -2
- data/lib/firespring_dev_commands/templates/docker/node/application.rb +5 -55
- data/lib/firespring_dev_commands/templates/docker/php/application.rb +16 -58
- data/lib/firespring_dev_commands/templates/docker/ruby/application.rb +5 -54
- data/lib/firespring_dev_commands/templates/eol.rb +2 -9
- data/lib/firespring_dev_commands/templates/git.rb +0 -165
- data/lib/firespring_dev_commands/version.rb +1 -1
- data/lib/firespring_dev_commands.rb +1 -1
- metadata +35 -125
- data/lib/firespring_dev_commands/aws/route53.rb +0 -177
- data/lib/firespring_dev_commands/bloom_growth/rock.rb +0 -34
- data/lib/firespring_dev_commands/bloom_growth/seat.rb +0 -16
- data/lib/firespring_dev_commands/bloom_growth/user.rb +0 -43
- data/lib/firespring_dev_commands/bloom_growth.rb +0 -132
- data/lib/firespring_dev_commands/certificate.rb +0 -59
- data/lib/firespring_dev_commands/coverage/base.rb +0 -16
- data/lib/firespring_dev_commands/coverage/cobertura.rb +0 -86
- data/lib/firespring_dev_commands/coverage/none.rb +0 -21
- data/lib/firespring_dev_commands/dns/resource.rb +0 -93
- data/lib/firespring_dev_commands/docker/desktop.rb +0 -61
- data/lib/firespring_dev_commands/eol/node.rb +0 -42
- data/lib/firespring_dev_commands/eol/php.rb +0 -50
- data/lib/firespring_dev_commands/eol/ruby.rb +0 -42
- data/lib/firespring_dev_commands/jira/parent.rb +0 -19
- data/lib/firespring_dev_commands/os.rb +0 -35
- data/lib/firespring_dev_commands/port.rb +0 -24
- data/lib/firespring_dev_commands/target_process/time.rb +0 -32
- data/lib/firespring_dev_commands/templates/aws/services/route53.rb +0 -130
- data/lib/firespring_dev_commands/templates/certificate.rb +0 -41
@@ -8,12 +8,11 @@ module Dev
|
|
8
8
|
DEFAULT_PACKAGE_FILE = 'composer.json'.freeze
|
9
9
|
|
10
10
|
# Config object for setting top level git config options
|
11
|
-
Config = Struct.new(:container_path, :local_path, :package_file
|
11
|
+
Config = Struct.new(:container_path, :local_path, :package_file) do
|
12
12
|
def initialize
|
13
13
|
self.container_path = DEFAULT_PATH
|
14
14
|
self.local_path = DEV_COMMANDS_ROOT_DIR
|
15
15
|
self.package_file = DEFAULT_PACKAGE_FILE
|
16
|
-
self.coverage = nil
|
17
16
|
end
|
18
17
|
end
|
19
18
|
|
@@ -31,14 +30,12 @@ module Dev
|
|
31
30
|
alias_method :configure, :config
|
32
31
|
end
|
33
32
|
|
34
|
-
attr_accessor :container_path, :local_path, :package_file
|
33
|
+
attr_accessor :container_path, :local_path, :package_file
|
35
34
|
|
36
|
-
def initialize(container_path: nil, local_path: nil, package_file: nil
|
35
|
+
def initialize(container_path: nil, local_path: nil, package_file: nil)
|
37
36
|
@container_path = container_path || self.class.config.container_path
|
38
37
|
@local_path = local_path || self.class.config.local_path
|
39
38
|
@package_file = package_file || self.class.config.package_file
|
40
|
-
@coverage = coverage || Dev::Coverage::None.new
|
41
|
-
raise 'coverage must be an instance of the base class' unless @coverage.is_a?(Dev::Coverage::Base)
|
42
39
|
end
|
43
40
|
|
44
41
|
# The base npm command that is the starting point for all subsequent commands
|
@@ -61,12 +58,9 @@ module Dev
|
|
61
58
|
end
|
62
59
|
|
63
60
|
# Build the command to fix any security vulnerabilities that were found
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
# audit_fix.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
|
68
|
-
# audit_fix
|
69
|
-
# end
|
61
|
+
def audit_fix_command
|
62
|
+
raise 'not implemented'
|
63
|
+
end
|
70
64
|
|
71
65
|
# Build the php install command
|
72
66
|
def install_command
|
@@ -79,7 +73,7 @@ module Dev
|
|
79
73
|
# Build the php lint command
|
80
74
|
def lint_command
|
81
75
|
lint = base_command
|
82
|
-
lint << 'lint'
|
76
|
+
lint << 'run' << 'lint'
|
83
77
|
lint.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
|
84
78
|
lint
|
85
79
|
end
|
@@ -87,7 +81,7 @@ module Dev
|
|
87
81
|
# Build the php lint fix command
|
88
82
|
def lint_fix_command
|
89
83
|
lint_fix = base_command
|
90
|
-
lint_fix << 'lint-fix'
|
84
|
+
lint_fix << 'run' << 'lint-fix'
|
91
85
|
lint_fix.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
|
92
86
|
lint_fix
|
93
87
|
end
|
@@ -95,24 +89,14 @@ module Dev
|
|
95
89
|
# Build the php test command
|
96
90
|
def test_command
|
97
91
|
test = []
|
98
|
-
|
99
|
-
test.concat(coverage.php_options) if coverage
|
92
|
+
lint_fix << 'run' << 'test'
|
100
93
|
test.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
|
101
94
|
test
|
102
95
|
end
|
103
96
|
|
104
|
-
#
|
105
|
-
def
|
106
|
-
|
107
|
-
end
|
108
|
-
|
109
|
-
# Build the php fast test command
|
110
|
-
def test_fast_command(processes = 4)
|
111
|
-
test = []
|
112
|
-
test << './vendor/bin/paratest'
|
113
|
-
test.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
|
114
|
-
test << "-p#{processes}" << '--runner=WrapperRunner'
|
115
|
-
test
|
97
|
+
# Build the php test (with coverage) command
|
98
|
+
def test_coverage_command
|
99
|
+
raise 'not implemented'
|
116
100
|
end
|
117
101
|
end
|
118
102
|
end
|
@@ -1,46 +1,39 @@
|
|
1
1
|
module Dev
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
# If an architecture was specified in the ENV, use that. Otherwise auto-deted based of the OS reported architecture
|
8
|
-
def architecture
|
9
|
-
arch = env_architecture || os_architecture
|
10
|
-
raise "Invalid DOCKER_ARCHITECTURE: #{arch} (allowed are #{ALLOWED_ARCHITECTURES.join(', ')})" unless ALLOWED_ARCHITECTURES.include?(arch)
|
11
|
-
|
12
|
-
arch
|
13
|
-
end
|
14
|
-
|
15
|
-
# Check to see if a docker architecture has been specified in the ENV
|
16
|
-
# If it has, verify the format and the value
|
17
|
-
private def env_architecture
|
18
|
-
arch = ENV['DOCKER_ARCHITECTURE'].to_s.strip.downcase
|
19
|
-
return nil if arch.empty?
|
2
|
+
class Common
|
3
|
+
# Class which returns information about the current platform
|
4
|
+
class Platform
|
5
|
+
# Constant containing all supported architectures
|
6
|
+
ALLOWED_ARCHITECTURES = %w(arm64 amd64).freeze
|
20
7
|
|
21
|
-
|
22
|
-
|
23
|
-
|
8
|
+
# Normalize the ruby platform to return a docker platform architecture format
|
9
|
+
def determine_compute_architecture
|
10
|
+
case RUBY_PLATFORM
|
11
|
+
when /x86_64|amd64/
|
12
|
+
'linux/amd64' # 64-bit Intel/AMD architecture
|
13
|
+
when /arm|aarch64/
|
14
|
+
'linux/arm64' # ARM architecture
|
15
|
+
else
|
16
|
+
raise 'Unknown or unsupported architecture'
|
17
|
+
end
|
18
|
+
end
|
24
19
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
20
|
+
# Determine the platform architecture
|
21
|
+
# If one was specified in the DOCKER_ARCHITECTURE variable, use it
|
22
|
+
# Otherwise, use the RUBY_PLATFORM built-in to auto-detect and architecture
|
23
|
+
def architecture
|
24
|
+
docker_architecture = ENV['DOCKER_ARCHITECTURE'].to_s.strip.downcase
|
25
|
+
if docker_architecture.empty?
|
26
|
+
determine_compute_architecture
|
27
|
+
else
|
28
|
+
raise "Missing 'linux/' prefix in DOCKER_ARCHITECTURE: #{docker_architecture}" unless docker_architecture.start_with?('linux/')
|
29
29
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
end
|
30
|
+
architecture_name = docker_architecture.split('/')[1]
|
31
|
+
unless ALLOWED_ARCHITECTURES.include?(architecture_name)
|
32
|
+
raise "Invalid DOCKER_ARCHITECTURE: #{architecture_name}. Allowed architectures are #{ALLOWED_ARCHITECTURES.join(', ')}"
|
33
|
+
end
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
# Class which returns information about the current platform
|
38
|
-
class Platform < Platform
|
39
|
-
# Initializer for the deprecated class
|
40
|
-
# @deprecated Please use {Dev::Platform#new} instead
|
41
|
-
def initialize
|
42
|
-
warn '[DEPRECATION] `Dev::Common::Platform#new` is deprecated. Please use `Dev::Platform#new` instead.'
|
43
|
-
super
|
35
|
+
docker_architecture
|
36
|
+
end
|
44
37
|
end
|
45
38
|
end
|
46
39
|
end
|
@@ -90,16 +90,14 @@ module Dev
|
|
90
90
|
|
91
91
|
# Build the bundle lint command
|
92
92
|
def lint_command
|
93
|
-
lint =
|
94
|
-
lint << 'exec' << 'rubocop'
|
93
|
+
lint = ['rubocop']
|
95
94
|
lint.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
|
96
95
|
lint
|
97
96
|
end
|
98
97
|
|
99
98
|
# Build the bundle lint fix command
|
100
99
|
def lint_fix_command
|
101
|
-
lint_fix =
|
102
|
-
lint_fix << 'exec' << 'rubocop'
|
100
|
+
lint_fix = ['rubocop']
|
103
101
|
lint_fix << '-A'
|
104
102
|
lint_fix.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
|
105
103
|
lint_fix
|
@@ -107,8 +105,7 @@ module Dev
|
|
107
105
|
|
108
106
|
# Build the bundle test command
|
109
107
|
def test_command
|
110
|
-
test =
|
111
|
-
test << 'exec' << 'rspec'
|
108
|
+
test = ['rspec']
|
112
109
|
test.concat(Dev::Common.new.tokenize(ENV['OPTS'].to_s))
|
113
110
|
test
|
114
111
|
end
|
@@ -2,13 +2,12 @@ module Dev
|
|
2
2
|
class TargetProcess
|
3
3
|
# Class for writing target process query statements
|
4
4
|
class Query
|
5
|
-
attr_accessor :where, :incl, :take
|
5
|
+
attr_accessor :where, :incl, :take
|
6
6
|
|
7
7
|
def initialize
|
8
8
|
@where = []
|
9
9
|
@incl = []
|
10
10
|
@take = 250
|
11
|
-
@empty = false
|
12
11
|
end
|
13
12
|
|
14
13
|
# Add a new query clause
|
@@ -34,11 +33,6 @@ module Dev
|
|
34
33
|
end
|
35
34
|
end
|
36
35
|
|
37
|
-
# Check if any of the "in" statements were empty. If so then we don't want to actually run the query
|
38
|
-
def empty?
|
39
|
-
@empty == true
|
40
|
-
end
|
41
|
-
|
42
36
|
# Generate the string representation for this query
|
43
37
|
def generate
|
44
38
|
{}.tap do |clause|
|
@@ -56,38 +50,22 @@ module Dev
|
|
56
50
|
# TODO: Do these need moved to their associated entities?
|
57
51
|
# Add a filter that looks for stories whose id is contained in the list of ids given
|
58
52
|
def filter_by_user_story_ids(user_story_ids)
|
59
|
-
if user_story_ids.nil? || user_story_ids.empty?
|
60
|
-
@empty = true
|
61
|
-
return
|
62
|
-
end
|
63
53
|
self << "(Id in ('#{user_story_ids.join("', '")}'))"
|
64
54
|
end
|
65
55
|
|
66
56
|
# Add a filter that looks for stories whose team id is contained in the list of ids given
|
67
57
|
def filter_by_team_ids(team_ids)
|
68
|
-
|
69
|
-
@empty = true
|
70
|
-
return
|
71
|
-
end
|
72
|
-
self << "(Team.Id in ('#{team_ids.join("', '")}'))"
|
58
|
+
self << "(Team.Id in ('#{team_ids.join("', '")}'))" unless team_ids.nil? || team_ids.empty?
|
73
59
|
end
|
74
60
|
|
75
61
|
# Add a filter that looks for stories whose project id is contained in the list of ids given
|
76
62
|
def filter_by_project(projects)
|
77
|
-
if projects.nil? || projects.empty?
|
78
|
-
@empty = true
|
79
|
-
return
|
80
|
-
end
|
81
63
|
self << "(Project.Name in ('#{projects.join("', '")}'))"
|
82
64
|
end
|
83
65
|
|
84
66
|
# Add a filter that looks for stories whose state is contained in the list of states given
|
85
67
|
def filter_by_states(states)
|
86
|
-
|
87
|
-
@empty = true
|
88
|
-
return
|
89
|
-
end
|
90
|
-
self << "(EntityState.Name in ('#{states.join("', '")}'))"
|
68
|
+
self << "(EntityState.Name in ('#{states.join("', '")}'))" unless states.nil? || states.empty?
|
91
69
|
end
|
92
70
|
|
93
71
|
# Add a filter that looks for stories whose state is set to final
|
@@ -136,11 +114,7 @@ module Dev
|
|
136
114
|
|
137
115
|
# Add a filter that looks for assignable ids which are included in the given array
|
138
116
|
def filter_by_entity_ids(entity_ids)
|
139
|
-
|
140
|
-
@empty = true
|
141
|
-
return
|
142
|
-
end
|
143
|
-
self << "(Assignable.Id in ('#{entity_ids.join("', '")}'))"
|
117
|
+
self << "(Assignable.Id in ('#{entity_ids.join("', '")}'))" unless entity_ids.nil? || entity_ids.empty?
|
144
118
|
end
|
145
119
|
|
146
120
|
# Add a filter that looks for a custom deploy date between the given dates`
|
@@ -2,13 +2,7 @@ module Dev
|
|
2
2
|
class TargetProcess
|
3
3
|
# Class containing user information
|
4
4
|
class User
|
5
|
-
|
6
|
-
RESOURCE_TYPE = 'User'.freeze
|
7
|
-
|
8
|
-
# The api path for user requests
|
9
|
-
PATH = '/User'.freeze
|
10
|
-
|
11
|
-
attr_accessor :data, :id, :type, :name, :login, :email
|
5
|
+
attr_accessor :data, :id, :type, :name, :login
|
12
6
|
|
13
7
|
def initialize(data)
|
14
8
|
@data = data
|
@@ -16,12 +10,6 @@ module Dev
|
|
16
10
|
@type = data['ResourceType']
|
17
11
|
@name = data['FullName']
|
18
12
|
@login = data['Login']
|
19
|
-
@email = data['Email']
|
20
|
-
end
|
21
|
-
|
22
|
-
# Get the user with the given id and return that object
|
23
|
-
def self.get(id)
|
24
|
-
new(TargetProcess.new.get("#{User::PATH}/#{id}", Query.new))
|
25
13
|
end
|
26
14
|
end
|
27
15
|
end
|
@@ -15,7 +15,7 @@ module Dev
|
|
15
15
|
# The text of the url variable key
|
16
16
|
TP_URL = 'TP_URL'.freeze
|
17
17
|
|
18
|
-
# Config object for setting top level
|
18
|
+
# Config object for setting top level jira config options
|
19
19
|
Config = Struct.new(:username, :password, :url, :http_debug) do
|
20
20
|
def initialize
|
21
21
|
Dotenv.load(CONFIG_FILE) if File.exist?(CONFIG_FILE)
|
@@ -72,8 +72,8 @@ module Dev
|
|
72
72
|
[].tap do |ary|
|
73
73
|
get(Release::PATH, query) do |result|
|
74
74
|
ary << Release.new(result)
|
75
|
-
yield ary.last if block_given?
|
76
75
|
end
|
76
|
+
ary.each(&)
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
@@ -84,8 +84,8 @@ module Dev
|
|
84
84
|
[].tap do |ary|
|
85
85
|
get(UserStory::PATH, query) do |result|
|
86
86
|
ary << UserStory.new(result)
|
87
|
-
yield ary.last if block_given?
|
88
87
|
end
|
88
|
+
ary.each(&)
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
@@ -96,8 +96,8 @@ module Dev
|
|
96
96
|
[].tap do |ary|
|
97
97
|
get(UserStoryHistory::PATH, query) do |result|
|
98
98
|
ary << UserStoryHistory.new(result)
|
99
|
-
yield ary.last if block_given?
|
100
99
|
end
|
100
|
+
ary.each(&)
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
@@ -108,20 +108,8 @@ module Dev
|
|
108
108
|
[].tap do |ary|
|
109
109
|
get(TeamAssignment::PATH, query) do |result|
|
110
110
|
ary << TeamAssignment.new(result)
|
111
|
-
yield ary.last if block_given?
|
112
|
-
end
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
|
-
# Perform a query to the time api path
|
117
|
-
# Call the given block (if present) with each time
|
118
|
-
# Return all times
|
119
|
-
def times(query, &)
|
120
|
-
[].tap do |ary|
|
121
|
-
get(Time::PATH, query) do |result|
|
122
|
-
ary << Time.new(result)
|
123
|
-
yield ary.last if block_given?
|
124
111
|
end
|
112
|
+
ary.each(&)
|
125
113
|
end
|
126
114
|
end
|
127
115
|
|
@@ -129,8 +117,6 @@ module Dev
|
|
129
117
|
# Call the given block (if present) with each piece of data
|
130
118
|
# Return all pieces of data
|
131
119
|
def get(path, query, &)
|
132
|
-
return [] if query.empty?
|
133
|
-
|
134
120
|
query_string = query.generate
|
135
121
|
url = "/api/v1/#{path}"
|
136
122
|
url << "?#{URI.encode_www_form(query_string)}" unless query_string.empty?
|
@@ -144,11 +130,8 @@ module Dev
|
|
144
130
|
parsed_response['Items'].each(&)
|
145
131
|
|
146
132
|
while parsed_response['Next']
|
147
|
-
|
148
|
-
|
149
|
-
next_url << "?#{next_query_string}" unless query_string.empty?
|
150
|
-
response = client.request_get(next_url, headers)
|
151
|
-
raise "Error querying #{next_url} [#{next_query_string}]: #{response.inspect}" unless response.response.is_a?(Net::HTTPSuccess)
|
133
|
+
response = client.request_get(parsed_response['Next'], headers)
|
134
|
+
raise "Error querying #{parsed_response['Next']} [#{query_string}]: #{response.inspect}" unless response.response.is_a?(Net::HTTPSuccess)
|
152
135
|
|
153
136
|
parsed_response = JSON.parse(response.body)
|
154
137
|
return parsed_response unless parsed_response.key?('Items')
|
@@ -18,22 +18,6 @@ module Dev
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
# Create the rake task which shows the current AWS account information
|
22
|
-
def create_show_account_info_task!
|
23
|
-
# Have to set a local variable to be accessible inside of the instance_eval block
|
24
|
-
exclude = @exclude
|
25
|
-
|
26
|
-
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
27
|
-
return if exclude.include?(:show_account_info)
|
28
|
-
|
29
|
-
task show_account_info: %w(init ensure_aws_credentials) do
|
30
|
-
account_id = Dev::Aws::Credentials.new.logged_in_account
|
31
|
-
account_name = Dev::Aws::Account.new.name_by_account(account_id)
|
32
|
-
LOG.info "\n Current AWS Account is #{account_name} (#{account_id})\n".light_yellow
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
21
|
# Create the rake task for the aws profile method
|
38
22
|
def create_profile_task!
|
39
23
|
# Have to set a local variable to be accessible inside of the instance_eval block
|
@@ -118,24 +102,13 @@ module Dev
|
|
118
102
|
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
119
103
|
return if exclude.include?(:eol)
|
120
104
|
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
desc 'Compares the current date to the EOL date for supported aws resources'
|
127
|
-
task aws: %w(init ensure_aws_credentials) do
|
128
|
-
next if ENV.fetch('CHECK_AWS', nil).to_s.strip == 'false'
|
129
|
-
|
130
|
-
aws_products = Dev::EndOfLife::Aws.new.default_products
|
131
|
-
next if aws_products.empty?
|
105
|
+
desc 'Compares the current date to the EOL date for supported resources'
|
106
|
+
task eol: %w(init ensure_aws_credentials) do
|
107
|
+
account_id = Dev::Aws::Profile.new.current
|
108
|
+
account_name = Dev::Aws::Account.new.name_by_account(account_id)
|
109
|
+
LOG.info " Current AWS Account is #{account_name} (#{account_id})".light_yellow
|
132
110
|
|
133
|
-
|
134
|
-
account_id = Dev::Aws::Profile.new.current
|
135
|
-
account_name = Dev::Aws::Account.new.name_by_account(account_id)
|
136
|
-
puts "AWS product versions (in account #{account_name} / #{account_id})".light_yellow
|
137
|
-
Dev::EndOfLife.new(product_versions: aws_products).status
|
138
|
-
end
|
111
|
+
Dev::EndOfLife.new(product_versions: Dev::EndOfLife::Aws.new.default_products).check
|
139
112
|
end
|
140
113
|
end
|
141
114
|
end
|
@@ -47,14 +47,14 @@ end
|
|
47
47
|
# Create the base init command
|
48
48
|
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
49
49
|
task :init do
|
50
|
-
|
50
|
+
LOG.debug 'In base init'
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
54
|
# Create the base init_docker command
|
55
55
|
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
56
56
|
task init_docker: %w(init) do
|
57
|
-
|
57
|
+
LOG.debug 'In base init docker'
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
@@ -20,17 +20,15 @@ module Dev
|
|
20
20
|
# Have to set a local variable to be accessible inside of the instance_eval block
|
21
21
|
exclude = @exclude
|
22
22
|
cloudformations = @cloudformations
|
23
|
-
return if exclude.include?(:
|
23
|
+
return if exclude.include?(:status)
|
24
24
|
|
25
25
|
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
26
26
|
namespace :ci do
|
27
27
|
desc 'Create the ci cloudformation stack in aws'
|
28
|
-
task create: %w(init ensure_aws_credentials
|
28
|
+
task create: %w(init ensure_aws_credentials) do
|
29
|
+
LOG.info
|
29
30
|
next if cloudformations.empty?
|
30
31
|
|
31
|
-
names = cloudformations.map(&:name).join(', ')
|
32
|
-
Dev::Common.new.exit_unless_confirmed(" This will create the #{names} pipelines. Continue?")
|
33
|
-
|
34
32
|
# Start create on all stacks without waiting so they are created in parallel
|
35
33
|
cloudformations.each do |cloudformation|
|
36
34
|
next if cloudformation.exist?
|
@@ -55,17 +53,15 @@ module Dev
|
|
55
53
|
# Have to set a local variable to be accessible inside of the instance_eval block
|
56
54
|
exclude = @exclude
|
57
55
|
cloudformations = @cloudformations
|
58
|
-
return if exclude.include?(:
|
56
|
+
return if exclude.include?(:status)
|
59
57
|
|
60
58
|
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
61
59
|
namespace :ci do
|
62
60
|
desc 'Update the ci cloudformation stack in aws'
|
63
|
-
task update: %w(init ensure_aws_credentials
|
61
|
+
task update: %w(init ensure_aws_credentials) do
|
62
|
+
LOG.info
|
64
63
|
next if cloudformations.empty?
|
65
64
|
|
66
|
-
names = cloudformations.map(&:name).join(', ')
|
67
|
-
Dev::Common.new.exit_unless_confirmed(" This will update the #{names} pipelines. Continue?")
|
68
|
-
|
69
65
|
# Start update on all stacks without waiting so they are updated in parallel
|
70
66
|
cloudformations.each do |cloudformation|
|
71
67
|
next unless cloudformation.exist?
|
@@ -90,17 +86,15 @@ module Dev
|
|
90
86
|
# Have to set a local variable to be accessible inside of the instance_eval block
|
91
87
|
exclude = @exclude
|
92
88
|
cloudformations = @cloudformations
|
93
|
-
return if exclude.include?(:
|
89
|
+
return if exclude.include?(:status)
|
94
90
|
|
95
91
|
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
96
92
|
namespace :ci do
|
97
93
|
desc 'Delete the ci cloudformation stack in aws'
|
98
|
-
task delete: %w(init ensure_aws_credentials
|
94
|
+
task delete: %w(init ensure_aws_credentials) do
|
95
|
+
LOG.info
|
99
96
|
next if cloudformations.empty?
|
100
97
|
|
101
|
-
names = cloudformations.map(&:name).join(', ')
|
102
|
-
Dev::Common.new.exit_unless_confirmed(" This will delete the #{names} pipelines. Continue?")
|
103
|
-
|
104
98
|
# Start delete on all stacks without waiting so they are deleted in parallel
|
105
99
|
cloudformations.each do |cloudformation|
|
106
100
|
next unless cloudformation.exist?
|
@@ -130,7 +124,8 @@ module Dev
|
|
130
124
|
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
131
125
|
namespace :ci do
|
132
126
|
desc 'Show the current status of the pipelines associated with your branch'
|
133
|
-
task status: %w(init ensure_aws_credentials
|
127
|
+
task status: %w(init ensure_aws_credentials) do
|
128
|
+
LOG.info
|
134
129
|
next if cloudformations.empty?
|
135
130
|
|
136
131
|
pattern = /#{cloudformations.map(&:name).join('|')}/
|
@@ -72,7 +72,7 @@ module Dev
|
|
72
72
|
return if exclude.include?(:sh)
|
73
73
|
|
74
74
|
desc "Open a shell into a running #{application} container"
|
75
|
-
task sh: %W(init_docker #{application}:
|
75
|
+
task sh: %W(init_docker #{application}:up _pre_sh_hooks) do
|
76
76
|
Dev::Docker::Compose.new(services: [application]).sh
|
77
77
|
Rake::Task[:_post_sh_hooks].execute
|
78
78
|
end
|
@@ -154,7 +154,7 @@ module Dev
|
|
154
154
|
return if exclude.include?(:reload)
|
155
155
|
|
156
156
|
desc "Reloads the #{application} container"
|
157
|
-
task reload: %w(init_docker _pre_reload_hooks down
|
157
|
+
task reload: %w(init_docker _pre_reload_hooks down up) do
|
158
158
|
Rake::Task[:_post_reload_hooks].execute
|
159
159
|
end
|
160
160
|
end
|