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 +4 -4
- data/README.md +1 -0
- data/lib/kitchen/driver/linode.rb +10 -1
- data/lib/kitchen/driver/linode_version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f6494b7dad0c2e9f070ec64f5edbf64574202c3
|
4
|
+
data.tar.gz: dd9a1a89580527e094224cf2ac1a5f852a8a953a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
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.
|
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-
|
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.
|
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
|