@@ -18,6 +18,8 @@ class RemoteServerJob < ActiveJob::Base
18
18
19
19
PG_COMMIT = "#{ SCRIPTS_PATH } /pg/master.sh"
20
20
21
+ RUBY_COMMIT_DISCOURSE = "#{ SCRIPTS_PATH } /ruby/discourse/trunk.sh"
22
+
21
23
# Use keyword arguments once Rails 4.2.1 has been released.
22
24
def perform ( initiator_key , benchmark_group , options = { } )
23
25
Net ::SSH . start (
@@ -78,19 +80,9 @@ def ruby_release_discourse(ssh, ruby_version, options)
78
80
end
79
81
80
82
def ruby_commit_discourse ( ssh , commit_hash , options )
81
- execute_ssh_commands ( ssh ,
82
- [
83
- 'docker pull rubybench/ruby_trunk_discourse' ,
84
- 'docker run --name discourse_redis -d redis:2.8.19' ,
85
- 'docker run --name discourse_postgres -d postgres:9.3.5' ,
86
- "docker run --rm --link discourse_postgres:postgres
87
- --link discourse_redis:redis -e \" RUBY_COMMIT_HASH=#{ commit_hash } \"
88
- -e \" API_NAME=#{ secrets . api_name } \"
89
- -e \" API_PASSWORD=#{ secrets . api_password } \"
90
- rubybench/ruby_trunk_discourse" . squish ,
91
- 'docker stop discourse_postgres discourse_redis' ,
92
- 'docker rm -v discourse_postgres discourse_redis'
93
- ]
83
+ ssh_exec! (
84
+ ssh ,
85
+ "#{ RUBY_COMMIT_DISCOURSE } #{ commit_hash } #{ secrets . api_name } #{ secrets . api_password } "
94
86
)
95
87
end
96
88
0 commit comments