conjur-debify 1.3.0 → 1.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: 036cffe142434776c5b343709dd6180f53c3f9fb
4
- data.tar.gz: c381c211706f3bfb8747b7e572b13129d4e8f76e
3
+ metadata.gz: 9cfd1a8c7590e68df545ee14205ebc86a695f636
4
+ data.tar.gz: 8951e64bfe8ab43dada0ed964bf0b1985679a73a
5
5
  SHA512:
6
- metadata.gz: ed0a8d89e0196a0a315054c38a390209b1c3bd7895d1e17afd0326e79b8eaf743129edc487b968ec21d330960c48115741b8a1c21d25287b2eb56f2ddac7226e
7
- data.tar.gz: 02a67909b16651936dff4c1b77c7767b14982a192784fca2be857c258f739c73156410f0412012804406101cbef030cb9242518c7634c9d336fa22606cb07aab
6
+ metadata.gz: 2c3c5de841eb1a8e14666da2f02a623d85ced3a2a72e99bc5d5fb4eb2bced96e38415c59ac42d2105aa81b20c45af4fb063825293f7ffd46811d465727409e14
7
+ data.tar.gz: 36ae0244afe85132741d13e867d477ed43a83bee52faf27ca439ec2f02fdadc369536fcbdf10bce1ac8cef79726bbc0b55787f1d6c78467497fe9f80c03d937f
@@ -1,3 +1,8 @@
1
+ # 1.3.1
2
+
3
+ * When testing, `docker exec` into the Conjur container to run
4
+ `/opt/conjur/evoke/bin/wait_for_conjur`.
5
+
1
6
  # 1.3.0
2
7
 
3
8
  * Add `--volumes-from`
data/README.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Debify
2
2
 
3
+ ## Installation
4
+
5
+ Add this line to your application's Gemfile:
6
+
7
+ ```ruby
8
+ gem 'conjur-debify'
9
+ ```
10
+
11
+ And then execute:
12
+ ```sh-session
13
+ $ bundle
14
+ ```
15
+
16
+ Or install it yourself as a ruby gem:
17
+ ```sh-session
18
+ $ gem install conjur-debify
19
+ ```
20
+
3
21
  ## Build a package
4
22
 
5
23
  Builds a Conjur Debian package from a Ruby gem.
@@ -118,7 +136,7 @@ COMMAND OPTIONS
118
136
 
119
137
  ### Example usage
120
138
 
121
- Assuming a `secrets.yml` like this exists in the source directory:
139
+ Assuming a `secrets.yml` like this exists in the source directory and that you have `summon` with the Conjur provider installed on the machine:
122
140
 
123
141
  ```yaml
124
142
  ARTIFACTORY_USERNAME: !var artifactory/users/jenkins/username
@@ -167,28 +185,12 @@ COMMAND OPTIONS
167
185
  authz $ debify sandbox -t $(cat VERSION_APPLIANCE)-stable
168
186
  ... much logging
169
187
  authz $ docker exec -it authz-sandbox bash
170
- root@7d4217655332:/src/authz# /opt/conjur/evoke/bin/dev-install
188
+ root@7d4217655332:/src/authz# /opt/conjur/evoke/bin/dev-install authz
171
189
  ...
172
190
  root@7d4217655332:/src/authz# export RAILS_ENV=test
173
191
  root@7d4217655332:/src/authz# bundle exec rake db:migrate
174
192
  ```
175
193
 
176
- ## Installation
177
-
178
- Add this line to your application's Gemfile:
179
-
180
- ```ruby
181
- gem 'debify'
182
- ```
183
-
184
- And then execute:
185
-
186
- $ bundle
187
-
188
- Or install it yourself as:
189
-
190
- $ gem install debify
191
-
192
194
  ## Contributing
193
195
 
194
196
  1. Fork it ( https://github.com/[my-github-username]/debify/fork )
@@ -16,6 +16,6 @@ Feature: Packaging
16
16
  @announce-output
17
17
  Scenario: 'example' project can be tested successfully
18
18
  Given I successfully run `env DEBUG=true GLI_DEBUG=true debify package -d ../../example -v 0.0.1 example -- --post-install /distrib/postinstall.sh`
19
- When I run `env DEBUG=true GLI_DEBUG=true debify test -t 4.7-stable -v 0.0.1 -d ../../example --no-pull example test.sh`
19
+ When I run `env DEBUG=true GLI_DEBUG=true debify test -t 4.8-stable -v 0.0.1 -d ../../example --no-pull example test.sh`
20
20
  Then the exit status should be 0
21
21
  And the stderr should contain "Test succeeded"
@@ -266,37 +266,20 @@ command "package" do |c|
266
266
  end
267
267
  end
268
268
 
269
- def wait_for_conjur appliance_image, container
270
- wait_options = {
271
- 'Image' => appliance_image.id,
272
- 'Entrypoint' => '/opt/conjur/evoke/bin/wait_for_conjur',
273
- 'HostConfig' => {
274
- 'Links' => [
275
- [ container.id, 'conjur' ].join(":")
276
- ]
277
- }
278
- }
279
- wait_options['Privileged'] = true if Docker.version['Version'] >= '1.10.0'
280
-
281
- wait_container = Docker::Container.create wait_options
282
- begin
283
- spawn("docker logs -f #{wait_container.id}", [ :out, :err ] => $stderr).tap do |pid|
284
- Process.detach pid
285
- end
286
- wait_container.start
287
- status = wait_container.wait
288
- raise "wait_for_conjur failed" unless status['StatusCode'] == 0
289
- ensure
290
- wait_container.delete(force: true)
291
- end
292
- end
293
-
294
269
  def container_command container, *args
295
270
  stdout, stderr, exitcode = container.exec args, &DebugMixin::DOCKER
296
271
  exit_now! "Command failed : #{args.join(' ')}", exitcode unless exitcode == 0
297
272
  stdout
298
273
  end
299
274
 
275
+ def wait_for_conjur appliance_image, container
276
+ # Add a hosts entry for now, get rid of it when wait_for_conjur no
277
+ # longer requires it.
278
+ system("docker exec #{container.id} /bin/bash -c 'echo 127.0.0.1 conjur >> /etc/hosts'")
279
+ container_command container, '/opt/conjur/evoke/bin/wait_for_conjur'
280
+ end
281
+
282
+
300
283
  desc "Test a Conjur debian package in a Conjur appliance container"
301
284
  long_desc <<DESC
302
285
  First, a Conjur appliance container is created and started. By default, the
@@ -1,5 +1,5 @@
1
1
  module Conjur
2
2
  module Debify
3
- VERSION = "1.3.0"
3
+ VERSION = "1.3.1"
4
4
  end
5
5
  end
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: 1.3.0
4
+ version: 1.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-06-09 00:00:00.000000000 Z
11
+ date: 2016-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gli