ops_build 1.1.8 → 1.1.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2528e5176a23cc28889838463e448c97870bd91f
4
- data.tar.gz: 49f830cde911d80941f37fab0bfeffdd79d8d9b7
3
+ metadata.gz: 60ccef0bf521df11b598fb6585e228a816a0cfaf
4
+ data.tar.gz: 48444ad18d1cd118f4595ab0e9b2c2416958a5f2
5
5
  SHA512:
6
- metadata.gz: 54821bb3295dd630a23713b88a3f333e4db6392292f57d61bafb89aae2a153a78c998c1ea6eb94374e7d566bbf17734c12bca546674982ef4fc0b7b5e07b9350
7
- data.tar.gz: 3b48388784e59802bb2ff57c6cdce3351b03081ec8f06d742a3bf1cd54f603ae41fc83084e3dca9b64eb4e0e50e4295f368ab4ef30651467e6325018e9d7361a
6
+ metadata.gz: 26f81c67b9561389952b9da6d6390a3b0d2681a0a4c645b0f7a5b46e0122ed22442dc9266fe0befa672d9adba85a9b35067808aef6fc769af0432991869d2654
7
+ data.tar.gz: 8028c2e7ca4d4bab623c96a39c4f7cbb51aa407c5ca4fc1a91d0b0b50882c36f90b6b9954cff40e324e87a165f1922663e87bf8807915284dc976ea175f23c6e
@@ -46,12 +46,12 @@ module OpsBuild
46
46
  raise "Unknown checksum type '#{@checksum_type}'!" unless %w(sha1 sha2 md5 rmd160).include?(@checksum_type.to_s.downcase)
47
47
  end
48
48
 
49
-
50
49
  def write(hash)
51
50
  File.open(@out, 'w+') { |f| f.write(JSON.pretty_generate(hash)) }
52
51
  end
52
+
53
53
  def box_info(path, version)
54
- {
54
+ out = {
55
55
  version: version,
56
56
  providers: [{
57
57
  name: 'virtualbox',
@@ -60,6 +60,11 @@ module OpsBuild
60
60
  checksum: checksum(path)
61
61
  }]
62
62
  }
63
+
64
+ metadata_path = "#{path}.metadata"
65
+ out.merge(JSON.parse(File.read(metadata_path))) if File.exists?(metadata_path)
66
+
67
+ out
63
68
  end
64
69
 
65
70
  def checksum(path)
@@ -85,6 +85,15 @@ module OpsBuild
85
85
  "vagrant package #{options[:only]} --output #{options[:output]}",
86
86
  log_prefix: 'vagrant:',
87
87
  env: env)
88
+
89
+ uuid = SecureRandom.uuid
90
+ OpsBuild.logger.info("Running vagrant ssh cmd 'info > /vagrant/#{uuid}'")
91
+ Utils::execute(
92
+ "vagrant ssh #{options[:only]} -c 'info > /vagrant/#{uuid}'",
93
+ log_prefix: 'vagrant:',
94
+ env: env)
95
+ info_path = File.join(env['VAGRANT_CWD'], uuid)
96
+ FileUtils.cp(info_path, "#{options[:output]}.metadata")
88
97
  ensure
89
98
  OpsBuild.logger.info('Running vagrant destroy')
90
99
  Utils::execute(
@@ -1,3 +1,3 @@
1
1
  module OpsBuild
2
- VERSION = '1.1.8'
2
+ VERSION = '1.1.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ops_build
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.8
4
+ version: 1.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - HAMSIK Adam
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-27 00:00:00.000000000 Z
11
+ date: 2015-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor