cody 1.0.2 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7a7aef69b13119002518200397cd29e961a44bcc5b1af86ee8b7b10257e79bb
4
- data.tar.gz: 7c5da7d1e3a0f1387df351d86ae77c28b8dde56554461c69085c71c7cdf61764
3
+ metadata.gz: a8381cda42f017707307d5de7118130640258798382938df63bdb4a028bfe43a
4
+ data.tar.gz: 4543b413ef1ecf727aa2b0151b62fed6b7928b946d142d1cbc1ed1897c53ed4f
5
5
  SHA512:
6
- metadata.gz: d7d882be7a9814bba876894c67f4fbe436893d97882d6cfab2af80b56dd39df89ddb126f208da8b13e3df6d18eef3375850cc6522158014047d41ff10f8e9cc3
7
- data.tar.gz: 4023dfde8116141efe8a83be416882c6d44c64bdd228918bee6ac13735d8d706b3474fcbe2b4cb623f1e2241437a00d92093f998fb1ff34ff86e68cb814c4d8b
6
+ metadata.gz: 1dc6cb7f35e4d21ae53c93746a22ed5df183dd06555939d4bec59f9b855197e67d2acbfc984b83a544c6dc9e79708709fb5c62005a654fffa0ea8108f25ffb3e
7
+ data.tar.gz: 45f3a91f478796108ed53fa7eba76f0743432c61872745d829a4d48c0b9ddbab7a733b98cd6e06db68a635aeaa7622b198226d85f1feddbca40a6e2a416b5247
data/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [1.0.6] - 2021-12-17
7
+ - [#32](https://github.com/tongueroo/cody/pull/32) fix activesupport require
8
+ - fix warn not found ssm param message
9
+
10
+ ## [1.0.5] - 2021-08-28
11
+ - add params overrides option
12
+ - docs: fix ecs permission, add iam:GetRole
13
+ - edge case: yaml has nothing but comments
14
+ - improve settings merge
15
+ - update vpc config exmaple with camelcase
16
+
17
+ ## [1.0.4] - 2021-01-08
18
+ - loosen activesupport version pin
19
+
20
+ ## [1.0.3] - 2021-01-08
21
+ - [#31](https://github.com/tongueroo/cody/pull/31) surface context message with error message for during provisioning fa…
22
+ - docs: update ci jets v3
23
+ - raise error option
24
+
6
25
  ## [1.0.2]
7
26
  - #30 Allow multiple git providers
8
27
 
data/README.md CHANGED
@@ -9,6 +9,8 @@
9
9
 
10
10
  [![BoltOps Badge](https://img.boltops.com/boltops/badges/boltops-badge.png)](https://www.boltops.com)
11
11
 
12
+ Please **watch/star** this repo to help grow and support the project.
13
+
12
14
  Cody is an AWS CodeBuild Management Tool. Cody lets you create AWS CodeBuild projects with a beautiful DSL. The documentation site is at: [cody.run](https://cody.run/)
13
15
 
14
16
  ## Quick Start
data/cody.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
23
23
  spec.require_paths = ["lib"]
24
24
 
25
- spec.add_dependency "activesupport", "~> 6.0.0"
25
+ spec.add_dependency "activesupport"
26
26
  spec.add_dependency "aws-logs"
27
27
  spec.add_dependency "aws-mfa-secure"
28
28
  spec.add_dependency "aws-sdk-cloudformation"
@@ -41,6 +41,7 @@ Gem::Specification.new do |spec|
41
41
  spec.add_development_dependency "bundler"
42
42
  spec.add_development_dependency "byebug"
43
43
  spec.add_development_dependency "cli_markdown"
44
+ spec.add_development_dependency "nokogiri"
44
45
  spec.add_development_dependency "rake"
45
46
  spec.add_development_dependency "rspec"
46
47
  end
@@ -15,6 +15,7 @@ class Cody::CLI
15
15
  source_version: source_version
16
16
  }
17
17
  params[:environment_variables_override] = environment_variables_override if @options[:env_vars]
18
+ params.merge!(@options[:overrides]) if @options[:overrides]
18
19
  resp = codebuild.start_build(params)
19
20
 
20
21
  puts "Build started for project: #{project_name}"
@@ -54,8 +55,13 @@ class Cody::CLI
54
55
  end
55
56
  resource.physical_resource_id # codebuild project name
56
57
  else
57
- puts "ERROR: Unable to find the codebuild project with either full_project_name: #{@full_project_name} or project_name: #{@project_name}".color(:red)
58
- exit 1
58
+ message = "ERROR: Unable to find the codebuild project with either full_project_name: #{@full_project_name} or project_name: #{@project_name}"
59
+ if @options[:raise_error]
60
+ raise(message)
61
+ else
62
+ puts message.color(:red)
63
+ exit 1
64
+ end
59
65
  end
60
66
  end
61
67
 
data/lib/cody/core.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require 'pathname'
2
2
  require 'yaml'
3
- require 'active_support/core_ext/string'
4
3
 
5
4
  module Cody
6
5
  module Core
@@ -12,7 +12,7 @@ module Cody::Dsl::Project
12
12
 
13
13
  resp.parameter.value
14
14
  rescue Aws::SSM::Errors::ParameterNotFound
15
- puts "WARN: #{name} found on AWS SSM.".color(:yellow)
15
+ puts "WARN: #{name} not found on AWS SSM.".color(:yellow)
16
16
  end
17
17
 
18
18
  def ssm_client
data/lib/cody/setting.rb CHANGED
@@ -25,7 +25,10 @@ module Cody
25
25
 
26
26
  all_envs = default.deep_merge(user.deep_merge(project))
27
27
  all_envs = merge_base(all_envs)
28
- data = all_envs[cb_env] || all_envs["base"] || {}
28
+
29
+ env_data = all_envs[cb_env] || {}
30
+ base_data = all_envs["base"] || {}
31
+ data = base_data.merge(env_data)
29
32
  data.deep_symbolize_keys
30
33
  end
31
34
  memoize :data
@@ -37,6 +40,7 @@ module Cody
37
40
  path = "#{cb_root}/.cody/settings.yml"
38
41
  if File.exist?(path)
39
42
  settings = YAML.load_file(path)
43
+ settings = {} unless settings.is_a?(Hash) # in case YAML has nothing but comments
40
44
  env = settings.find do |_env, section|
41
45
  section ||= {}
42
46
  ENV['AWS_PROFILE'] && ENV['AWS_PROFILE'] == section['aws_profile']
@@ -54,6 +58,7 @@ module Cody
54
58
 
55
59
  content = RenderMePretty.result(path)
56
60
  data = YAML.load(content)
61
+ data = {} unless data.is_a?(Hash) # in case YAML has nothing but comments
57
62
  # If key is is accidentally set to nil it screws up the merge_base later.
58
63
  # So ensure that all keys with nil value are set to {}
59
64
  data.each do |env, _setting|
data/lib/cody/tailer.rb CHANGED
@@ -54,6 +54,14 @@ module Cody
54
54
  puts "Failed Phases:"
55
55
  failed_phases.each do |phase|
56
56
  puts "#{phase.phase_type}: #{phase.phase_status.color(:red)}"
57
+ context = phase.contexts.last
58
+ if context # show error details: Unable to pull customer's container image https://gist.github.com/tongueroo/22e4ca3d4cde002108ff506eba9062f6
59
+ message = context.message
60
+ puts message
61
+ if message.include?("CannotPullContainerError") && message.include?("access denied")
62
+ puts "See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-ecr.html"
63
+ end
64
+ end
57
65
  end
58
66
  end
59
67
 
data/lib/cody/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cody
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.6"
3
3
  end
data/lib/cody.rb CHANGED
@@ -1,4 +1,6 @@
1
1
  $:.unshift(File.expand_path("../", __FILE__))
2
+ require 'active_support'
3
+ require 'active_support/core_ext/string'
2
4
  require "aws_data"
3
5
  require "cfn_camelizer"
4
6
  require "cfn_status"
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cody
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-15 00:00:00.000000000 Z
11
+ date: 2021-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 6.0.0
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 6.0.0
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: aws-logs
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -262,6 +262,20 @@ dependencies:
262
262
  - - ">="
263
263
  - !ruby/object:Gem::Version
264
264
  version: '0'
265
+ - !ruby/object:Gem::Dependency
266
+ name: nokogiri
267
+ requirement: !ruby/object:Gem::Requirement
268
+ requirements:
269
+ - - ">="
270
+ - !ruby/object:Gem::Version
271
+ version: '0'
272
+ type: :development
273
+ prerelease: false
274
+ version_requirements: !ruby/object:Gem::Requirement
275
+ requirements:
276
+ - - ">="
277
+ - !ruby/object:Gem::Version
278
+ version: '0'
265
279
  - !ruby/object:Gem::Dependency
266
280
  name: rake
267
281
  requirement: !ruby/object:Gem::Requirement
@@ -387,7 +401,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
387
401
  - !ruby/object:Gem::Version
388
402
  version: '0'
389
403
  requirements: []
390
- rubygems_version: 3.1.2
404
+ rubygems_version: 3.2.32
391
405
  signing_key:
392
406
  specification_version: 4
393
407
  summary: Cody provides a beautiful DSL to create and manage AWS CodeBuild projects