engineyard-serverside 1.5.4 → 1.5.6
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.
@@ -164,7 +164,8 @@ To fix this problem, commit your Gemfile.lock to your repository and redeploy.
|
|
164
164
|
end
|
165
165
|
|
166
166
|
def clean_environment
|
167
|
-
|
167
|
+
# GIT_SSH needs to be defined in the environment for customers with private bundler repos in their Gemfile.
|
168
|
+
%Q[export GIT_SSH="ssh -o 'StrictHostKeyChecking no' -o 'PasswordAuthentication no' -o 'LogLevel DEBUG' -i ~/.ssh/#{c.app}-deploy-key" && unset BUNDLE_PATH BUNDLE_FROZEN BUNDLE_WITHOUT BUNDLE_BIN BUNDLE_GEMFILE]
|
168
169
|
end
|
169
170
|
|
170
171
|
# task
|
@@ -5,7 +5,6 @@ module EY
|
|
5
5
|
module Strategies
|
6
6
|
class Git
|
7
7
|
module Helpers
|
8
|
-
|
9
8
|
def update_repository_cache
|
10
9
|
unless strategy.fetch && strategy.checkout
|
11
10
|
abort "*** [Error] Git could not checkout (#{strategy.to_checkout}) ***"
|
@@ -42,7 +41,6 @@ module EY
|
|
42
41
|
|
43
42
|
def initialize(opts)
|
44
43
|
@opts = opts
|
45
|
-
set_up_git_ssh(@opts[:app])
|
46
44
|
end
|
47
45
|
|
48
46
|
def usable_repository?
|
@@ -107,37 +105,6 @@ module EY
|
|
107
105
|
end
|
108
106
|
false
|
109
107
|
end
|
110
|
-
|
111
|
-
def set_up_git_ssh(app)
|
112
|
-
# hold references to the tempfiles so they don't get finalized
|
113
|
-
# unexpectedly; tempfile finalization unlinks the files
|
114
|
-
@git_ssh = Tempfile.open("git-ssh")
|
115
|
-
@config = Tempfile.open("git-ssh-config")
|
116
|
-
|
117
|
-
@config.write "StrictHostKeyChecking no\n"
|
118
|
-
@config.write "CheckHostIP no\n"
|
119
|
-
@config.write "PasswordAuthentication no\n"
|
120
|
-
@config.write "LogLevel DEBUG\n"
|
121
|
-
@config.write "IdentityFile ~/.ssh/#{app}-deploy-key\n"
|
122
|
-
@config.chmod(0600)
|
123
|
-
@config.close
|
124
|
-
|
125
|
-
@git_ssh.write "#!/bin/sh\n"
|
126
|
-
@git_ssh.write "unset SSH_AUTH_SOCK\n"
|
127
|
-
@git_ssh.write "ssh -F \"#{@config.path}\" $*\n"
|
128
|
-
@git_ssh.chmod(0700)
|
129
|
-
# NB: this file _must_ be closed before git looks at it.
|
130
|
-
#
|
131
|
-
# Linux won't let you execve a file that's open for writing,
|
132
|
-
# so if this file stays open, then git will complain about
|
133
|
-
# being unable to exec it and will exit with a message like
|
134
|
-
#
|
135
|
-
# fatal: exec /tmp/git-ssh20100417-21417-d040rm-0 failed.
|
136
|
-
@git_ssh.close
|
137
|
-
|
138
|
-
ENV['GIT_SSH'] = @git_ssh.path
|
139
|
-
end
|
140
|
-
|
141
108
|
end
|
142
109
|
end
|
143
110
|
end
|
data/spec/bundler_deploy_spec.rb
CHANGED
@@ -115,6 +115,11 @@ describe "Deploying an application that uses Bundler" do
|
|
115
115
|
it "creates a system version file" do
|
116
116
|
File.exist?(File.join(@deploy_dir, 'shared', 'bundled_gems', 'SYSTEM_VERSION')).should be_true
|
117
117
|
end
|
118
|
+
|
119
|
+
it "Sets GIT_SSH environment variable" do
|
120
|
+
install_cmd = @deployer.commands.grep(/GIT_SSH/).first
|
121
|
+
install_cmd.should match(/export GIT_SSH.*install_bundler/)
|
122
|
+
end
|
118
123
|
end
|
119
124
|
end
|
120
125
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: engineyard-serverside
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 1.5.
|
9
|
+
- 6
|
10
|
+
version: 1.5.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- EY Cloud Team
|
@@ -15,13 +15,13 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-10-
|
18
|
+
date: 2011-10-25 00:00:00 -04:00
|
19
19
|
default_executable: engineyard-serverside
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
name: rspec
|
23
22
|
prerelease: false
|
24
23
|
type: :development
|
24
|
+
name: rspec
|
25
25
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
26
26
|
none: false
|
27
27
|
requirements:
|
@@ -35,9 +35,9 @@ dependencies:
|
|
35
35
|
version: 1.3.2
|
36
36
|
requirement: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
|
-
name: rake
|
39
38
|
prerelease: false
|
40
39
|
type: :development
|
40
|
+
name: rake
|
41
41
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
42
42
|
none: false
|
43
43
|
requirements:
|
@@ -323,7 +323,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
323
323
|
requirements: []
|
324
324
|
|
325
325
|
rubyforge_project:
|
326
|
-
rubygems_version: 1.5.
|
326
|
+
rubygems_version: 1.5.2
|
327
327
|
signing_key:
|
328
328
|
specification_version: 3
|
329
329
|
summary: A gem that deploys ruby applications on EY Cloud instances
|