idlc-sdk-pfm 1.0.19 → 1.0.20

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: bad749a77c02c04af660603b4e4c42e23794477db63061ab290eb4974fe15bba
4
- data.tar.gz: 20e9a160626c450d9d8064ba2527175111f690c3c3d4672c7c848ec89fdf3bc2
3
+ metadata.gz: 4579f85cc1a84beb4c6bc33da01095a7fdf22f45ef87b3d42f596dd91d3c8e3d
4
+ data.tar.gz: 6341d70e118d6faff985cf6bf02296f23cd65ccc816b3e282f8cea8d3a4530c8
5
5
  SHA512:
6
- metadata.gz: e387a64e85218af7f13914414a214ad613bad4b83ca715c52523983a3fd28b0d1746899178401effad20992cc6d3bae35ae04dabc57f660fabfc7067cbb6013a
7
- data.tar.gz: c373dc79742043a088f2a3f47a6c71277bcb7984c04330678a80f408383e57f49e29c48b13ebfd2a30a056f3e925119e4529298b87ca3526fb4f3f36a53f7ffe
6
+ metadata.gz: fdcf4c501c97ab359389b72369adcfeaea32b374b0619ae2eaa876cbbd981525806dc6b1d8064eb41a959dd69d492b3d1cca328b5c14c40f2dc73d0f18826ab6
7
+ data.tar.gz: 42d322dba47eb1af949d4e4c87e2935760f8486abeae4dca78d2285149d3a265cce77508e861919d064375310461d0ecd14c80a835adc67e426c65d23640918d
data/idlc-sdk-pfm.gemspec CHANGED
@@ -39,6 +39,7 @@ Gem::Specification.new do |spec|
39
39
  spec.add_runtime_dependency 'aws-sdk-s3'
40
40
  spec.add_runtime_dependency 'berkshelf'
41
41
  spec.add_runtime_dependency 'chefspec'
42
+ spec.add_runtime_dependency 'colorize'
42
43
  spec.add_runtime_dependency 'foodcritic-junit'
43
44
  spec.add_runtime_dependency 'foodcritic', '10.3.1'
44
45
  spec.add_runtime_dependency 'mixlib-cli'
@@ -2,6 +2,7 @@ require 'idlc-sdk-pfm/command/base'
2
2
  require 'mixlib/shellout'
3
3
  require 'aws-sdk-s3'
4
4
  require 'json'
5
+ require 'colorize'
5
6
 
6
7
  module Pfm
7
8
  module Command
@@ -43,17 +44,17 @@ module Pfm
43
44
 
44
45
  # tag git repo with version number.
45
46
  begin
46
- system("git tag -am 'v#{version}' #{version} &>/dev/null")
47
- msg("Tagged v#{version}")
47
+ system("git tag -am 'v#{REPO_VERSION}' v#{REPO_VERSION} &>/dev/null") || raise
48
+ msg("Tagged v#{REPO_VERSION}".colorize(:green))
48
49
  rescue
49
- msg("Tag v#{REPO_VERSION} has already been created")
50
+ msg("Tag v#{REPO_VERSION} has already been created... skipping.".colorize(:green))
50
51
  end
51
52
 
52
53
  begin
53
- system('git push --follow-tags &>/dev/null')
54
- msg('Pushed git tags.')
54
+ system('git push --follow-tags &>/dev/null') || raise
55
+ msg('Pushed git tags.'.colorize(:green))
55
56
  rescue
56
- err('Failed to push tags.')
57
+ err('Failed to push tags.'.colorize(:red))
57
58
  end
58
59
 
59
60
  workspace = Idlc::Workspace.new
@@ -67,13 +68,13 @@ module Pfm
67
68
  dest_zip = "./.pfm/#{package_name}"
68
69
  FileUtils.rm_rf(dest_zip) if File.exist? dest_zip
69
70
  Idlc::Workspace.zip_folder(workspace.tmp_dir, dest_zip)
70
- msg("packaged to #{dest_zip}")
71
+ msg("packaged to #{dest_zip}".colorize(:green))
71
72
 
72
73
  # upload to s3
73
74
  s3 = Aws::S3::Resource.new(region: SETTINGS['AWS_REGION'])
74
75
  obj = s3.bucket('service-build-dev-build-artifacts').object(package_name)
75
76
  obj.upload_file(dest_zip)
76
- msg('Pushed package to S3.')
77
+ msg('Pushed package to S3.'.colorize(:green))
77
78
 
78
79
  # register with Orchestrate Build
79
80
  raise InvalidRepository, 'Missing configuration.schema.json file in root.' unless File.exist? 'configuration.schema.json'
@@ -92,7 +93,7 @@ module Pfm
92
93
  }
93
94
 
94
95
  response = client.fetch(request.to_json)
95
- msg('Registered with Orchestrate.')
96
+ msg("Registered #{@config[:application_name]} #{REPO_VERSION} with Orchestrate.".colorize(:green))
96
97
  end
97
98
 
98
99
  def read_and_validate_params
@@ -1,3 +1,3 @@
1
1
  module Pfm
2
- VERSION = '1.0.19'.freeze
2
+ VERSION = '1.0.20'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idlc-sdk-pfm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.19
4
+ version: 1.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Cazell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-29 00:00:00.000000000 Z
11
+ date: 2018-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -178,6 +178,20 @@ dependencies:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0'
181
+ - !ruby/object:Gem::Dependency
182
+ name: colorize
183
+ requirement: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ type: :runtime
189
+ prerelease: false
190
+ version_requirements: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
181
195
  - !ruby/object:Gem::Dependency
182
196
  name: foodcritic-junit
183
197
  requirement: !ruby/object:Gem::Requirement