biola_deploy 0.6.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/biola_deploy/version.rb +1 -1
- data/lib/tasks/deploy.rake +31 -5
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e3b3b3c51a5d3c015a46269e8be6e36bf0999ef
|
4
|
+
data.tar.gz: 6357b10b89b76dfb74d3f0aef1acb940488d38e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16c978112262b2902e185fad5aac81d575a88a50a4d7156781f3c1c0b57c65dce8947a62ddd51aecd66ea5a4c742170034484cf8dcb2f1c9e09a50f750d54fa5
|
7
|
+
data.tar.gz: d338fa9681eed9a1af47126734b553103d54133cf6a22eb339bd02707879f91839ea14a73ec04e8d4fcebb8aa385a01caf5577baa01178cd95d4d61cfe1ecd5e
|
data/lib/biola_deploy/version.rb
CHANGED
data/lib/tasks/deploy.rake
CHANGED
@@ -1,6 +1,28 @@
|
|
1
1
|
require 'fileutils'
|
2
2
|
|
3
3
|
namespace :deploy do
|
4
|
+
desc 'Run chef-client'
|
5
|
+
task :chef_client do
|
6
|
+
require 'open3'
|
7
|
+
|
8
|
+
cmd = 'sudo --non-interactive chef-client'
|
9
|
+
|
10
|
+
error_out = []
|
11
|
+
Open3.popen3(cmd) do |stdin, stdout, stderr, wait_thr|
|
12
|
+
while line = stdout.gets
|
13
|
+
puts line
|
14
|
+
end
|
15
|
+
|
16
|
+
while line = stderr.gets
|
17
|
+
error_out << line
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
if error_out.any?
|
22
|
+
puts %[Erorr when running chef-client: #{error_out.join("\n")}]
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
4
26
|
desc 'Run the database migrations'
|
5
27
|
task :migrate_db do
|
6
28
|
if_rails_loads 'database migration' do
|
@@ -38,13 +60,17 @@ namespace :deploy do
|
|
38
60
|
require 'new_relic/cli/command'
|
39
61
|
require 'new_relic/cli/commands/deployments'
|
40
62
|
|
41
|
-
|
42
|
-
Version
|
63
|
+
if NewRelic::Agent.config[:license_key].present?
|
64
|
+
version = if defined? Version
|
65
|
+
Version.current
|
66
|
+
else
|
67
|
+
`git log -1 --format=%h`.chomp # abbreviated hash of latest git commit
|
68
|
+
end
|
69
|
+
|
70
|
+
NewRelic::Cli::Deployments.new(revision: version).run
|
43
71
|
else
|
44
|
-
|
72
|
+
puts 'Canceling NewRelic deployment because: no license key set'
|
45
73
|
end
|
46
|
-
|
47
|
-
NewRelic::Cli::Deployments.new(revision: version).run
|
48
74
|
else
|
49
75
|
puts 'Canceling NewRelic deployment because: not production environment'
|
50
76
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: biola_deploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Crownoble
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Designed to automate deployment of Rails applications using rake tasks
|
14
14
|
email: adam.crownoble@biola.edu
|
@@ -47,3 +47,4 @@ signing_key:
|
|
47
47
|
specification_version: 4
|
48
48
|
summary: Easy deployment for Rails applications
|
49
49
|
test_files: []
|
50
|
+
has_rdoc:
|