kitchen-linode 0.12.0 → 0.13.0

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: b429d8c0d943634ab216a027c4bc62162566f3a5
4
- data.tar.gz: c82211b3cb544569746a8f2d9a337ad385c316a2
3
+ metadata.gz: 3f6494b7dad0c2e9f070ec64f5edbf64574202c3
4
+ data.tar.gz: dd9a1a89580527e094224cf2ac1a5f852a8a953a
5
5
  SHA512:
6
- metadata.gz: 0666415dff8f9a349760291379e98ee71fbd8ebd622d964c63a0e98fc85041a633c685398eaa0e717c077d66b8cc2ec5ad3577daab6ec5c3c539d152edaea23d
7
- data.tar.gz: 393231cd75860bbea2e844bae894b082bd60125cfb704d5e2e5443d6db435a8243bbe732ae4e43ea3ad8cc61d2dc813e76a6ce1350c56d87c12e81c6673c1a96
6
+ metadata.gz: 764ec4ead550fe4e8009a501345f7ebc783996e235762634e981901fcde441a10d257be9c1a3301a89221abf675950b6036e554b10aee0aeba1f91a6eccb913a
7
+ data.tar.gz: 51d899dedcf85e91286f03d28505963ea207045a618f7ecd9d15fea965f929746b56ce8f524e47bae3cc25879093c32c7abc4ce1288911c830145dc6ef7fd927
data/README.md CHANGED
@@ -43,6 +43,7 @@ LINODE_API_KEY Linode API Key environment variable, default: nil
43
43
  :ssh_timeout ssh timeout, default: 600 (seconds)
44
44
  :sudo use sudo, default: True
45
45
  :port ssh port, default: 22
46
+ :server_name set the hostname and linode name
46
47
  ```
47
48
 
48
49
  ## <a name="usage"></a> Usage
@@ -226,9 +226,18 @@ module Kitchen
226
226
  config[:server_name] = "kitchen-#{config[:server_name]}-#{instance.name}-#{Time.now.to_i.to_s}"
227
227
  else
228
228
  config[:vm_hostname] = "#{instance.name}"
229
- config[:server_name] = "kitchen-#{File.basename(config[:kitchen_root])}-#{instance.name}-#{Time.now.to_i.to_s}"
229
+ if ENV["JOB_NAME"]
230
+ # use jenkins job name variable. "kitchen_root" turns into "workspace" which is uninformative.
231
+ jobname = ENV["JOB_NAME"].tr(" ", "_")
232
+ elsif ENV["TRAVIS_REPO_SLUG"]
233
+ jobname = ENV["TRAVIS_REPO_SLUG"].tr("/", "_")
234
+ else
235
+ jobname = File.basename(config[:kitchen_root])
236
+ end
237
+ config[:server_name] = "kitchen-#{jobname}-#{instance.name}-#{Time.now.to_i.to_s}"
230
238
  end
231
239
 
240
+ # cut to fit Linode 32 character maximum
232
241
  if config[:server_name].is_a?(String) && config[:server_name].size >= 32
233
242
  config[:server_name] = "#{config[:server_name][0..29]}#{rand(10..99)}"
234
243
  end
@@ -20,6 +20,6 @@ module Kitchen
20
20
 
21
21
  module Driver
22
22
  # Version string for Linode Kitchen driver
23
- LINODE_VERSION = "0.12.0"
23
+ LINODE_VERSION = "0.13.0"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kitchen-linode
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Taylor
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-02 00:00:00.000000000 Z
11
+ date: 2017-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-kitchen
@@ -137,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  version: '0'
138
138
  requirements: []
139
139
  rubyforge_project:
140
- rubygems_version: 2.5.1
140
+ rubygems_version: 2.0.14.1
141
141
  signing_key:
142
142
  specification_version: 4
143
143
  summary: A Test Kitchen Driver to use Linodes as your development environment