conjur-debify 0.3.0 → 0.3.1

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
  SHA1:
3
- metadata.gz: b09163b1b3fd1d4cbf3e0c9a7960581bac62d3bf
4
- data.tar.gz: 1542b78f84637ac4abb479d1f4f3bdfbf17e3313
3
+ metadata.gz: 49e366180a3f8f376a01367a42a43442fe706a16
4
+ data.tar.gz: dbd842630e1e51e96bef593f4653562324e68ad7
5
5
  SHA512:
6
- metadata.gz: cff5d82b37638d470e81c87d11a1dd96934a4101b63e4c59c6f6717b5a09134be54723b3aa01eed6207ef48b71ef6e7a24274a29baa25a4605376114a2a56e50
7
- data.tar.gz: 4f99702117b608961ddb17c3393d6d892fe7738c3839a4a7288d51cab4ecd5bd1a71190ef3a4a781609e513b4a70606ef61549db660560c971ec3a90d4e474e3
6
+ metadata.gz: e6180c9647d0fc7af44ef3996af13ae1defd604fa4cf6ea733b1bd6ac09fcd85a28381d1f7b72d12bda22b7d16ec1eb9346581807b9ce7e049d1e51754ce625a
7
+ data.tar.gz: c0641fa9894e3acf5adad1ed702b5e4ad5bfdc959763506f83260811037bb7f67d826786c1348c85b61fc8248b973c4341efb6fb2d65f5b8d4bb2c14738dfb15
@@ -1,5 +1,5 @@
1
1
  module Conjur
2
2
  module Debify
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
data/lib/conjur/debify.rb CHANGED
@@ -270,23 +270,37 @@ command "test" do |c|
270
270
  end
271
271
  end
272
272
 
273
+ def command container, *args
274
+ stdout, stderr, exitcode = container.exec args, &DebugMixin::DOCKER
275
+ exit_now! "Command failed : #{args.join(' ')}", exitcode unless exitcode == 0
276
+ end
277
+
273
278
  begin
274
279
  DebugMixin.debug_write "Testing #{project_name} in container #{container.id}\n"
280
+
275
281
  spawn("docker logs -f #{container.id}", [ :out, :err ] => $stderr).tap do |pid|
276
282
  Process.detach pid
277
283
  end
278
284
  container.start
285
+
286
+ DebugMixin.debug_write "Stopping conjur\n"
287
+
288
+ container.exec [ "sv", "stop", "conjur" ], &DebugMixin::DOCKER
279
289
 
280
- DebugMixin.debug_write "Waiting for Conjur\n"
281
- wait_for_conjur appliance_image, container
290
+ DebugMixin.debug_write "Purging source install of #{project_name}\n"
291
+
292
+ command container, "rm", "-rf", "/opt/conjur/#{project_name}"
293
+ command container, "rm", "-f", "/opt/conjur/etc/#{project_name}.conf"
294
+ command container, "dpkg", "-P", "conjur-#{project_name}"
282
295
 
283
296
  DebugMixin.debug_write "Installing #{project_name}\n"
284
297
 
285
- stdout, stderr, exitcode = container.exec [ "dpkg", "-i", "/src/#{project_name}/conjur-#{project_name}_latest_amd64.deb" ], &DebugMixin::DOCKER
286
- exit_now! "deb install failed", exitcode unless exitcode == 0
287
- stdout, stderr, exitcode = container.exec [ "/opt/conjur/evoke/bin/test-install", project_name ], &DebugMixin::DOCKER
288
- exit_now! "test-install failed", exitcode unless exitcode == 0
289
-
298
+ command container, "dpkg", "-i", "/src/#{project_name}/conjur-#{project_name}_latest_amd64.deb"
299
+ command container, "/opt/conjur/evoke/bin/test-install", project_name
300
+
301
+ DebugMixin.debug_write "Starting conjur\n"
302
+
303
+ command container, "sv", "start", "conjur"
290
304
  wait_for_conjur appliance_image, container
291
305
 
292
306
  if configure_script
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: conjur-debify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin Gilpin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-08 00:00:00.000000000 Z
11
+ date: 2016-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gli