cloudbees 0.1.2 → 0.1.3
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.
- data/bin/cloudbees +44 -7
- data/bin/cloudbees~ +14 -0
- data/lib/cloudbees/version.rb +1 -1
- data/lib/cloudbees/version.rb~ +5 -0
- metadata +4 -3
data/bin/cloudbees
CHANGED
@@ -1,11 +1,48 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
|
4
|
+
def has_program?(program)
|
5
|
+
ENV['PATH'].split(File::PATH_SEPARATOR).any? do |directory|
|
6
|
+
File.executable?(File.join(directory, program.to_s))
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
if not has_program?('bees') then
|
12
|
+
abort('Please install the CloudBees SDK from here: www.cloudbees.com/run.cb')
|
13
|
+
end
|
14
|
+
|
15
|
+
usage_message = 'Usage: cloudbees deploy USER/APPNAME ["(optional) description here"]'
|
16
|
+
|
17
|
+
if ARGV.size < 2 then
|
18
|
+
abort(usage_message)
|
19
|
+
end
|
20
|
+
|
3
21
|
task = ARGV[0]
|
4
|
-
|
5
|
-
|
22
|
+
|
23
|
+
if task != "deploy" then
|
24
|
+
abort(usage_message)
|
25
|
+
end
|
26
|
+
|
27
|
+
|
28
|
+
app_id = ARGV[1]
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
puts "Packaging the application locally, please wait..."
|
33
|
+
|
6
34
|
`warble`
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
35
|
+
|
36
|
+
wars = Dir.glob("*.war")
|
37
|
+
|
38
|
+
if wars.size != 1 then
|
39
|
+
abort("Unable to find war to deploy - warbler failure.")
|
40
|
+
end
|
41
|
+
|
42
|
+
puts "Now deploying to CloudBees..."
|
43
|
+
|
44
|
+
if ARGV.size == 2 then
|
45
|
+
`bees app:deploy -a #{app_id} #{wars[0]}`
|
46
|
+
else
|
47
|
+
`bees app:deploy -a #{app_id} -m "#{ARGV[2]}" #{wars[0]}`
|
48
|
+
end
|
data/bin/cloudbees~
CHANGED
@@ -1,9 +1,23 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
if not has_program?('beex') then
|
4
|
+
abort('Please install the CloudBees SDK from here: www.cloudbees.com/run.cb')
|
5
|
+
end
|
6
|
+
|
3
7
|
task = ARGV[0]
|
4
8
|
if task == "deploy" then
|
5
9
|
puts "packaging the application...."
|
6
10
|
`warble`
|
7
11
|
puts "Now deploying..."
|
8
12
|
`bees app:deploy -a michaelneale/opiu miko.war`
|
13
|
+
else
|
14
|
+
puts "Usage: cloudbees deploy"
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
def has_program?(program)
|
20
|
+
ENV['PATH'].split(File::PATH_SEPARATOR).any? do |directory|
|
21
|
+
File.executable?(File.join(directory, program.to_s))
|
22
|
+
end
|
9
23
|
end
|
data/lib/cloudbees/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudbees
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael Neale
|
@@ -60,6 +60,7 @@ files:
|
|
60
60
|
- bin/cloudbees
|
61
61
|
- bin/cloudbees~
|
62
62
|
- lib/cloudbees/version.rb
|
63
|
+
- lib/cloudbees/version.rb~
|
63
64
|
- lib/cloudbees.rb
|
64
65
|
- spec/spec_helper.rb
|
65
66
|
- tasks/rspec.rb
|