Skip to content

Commit 10cc4c6

Browse files
committed
Update discourse benchmarks
1 parent f277f05 commit 10cc4c6

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

app/jobs/remote_server_job.rb

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class RemoteServerJob < ActiveJob::Base
1818

1919
PG_COMMIT = "#{SCRIPTS_PATH}/pg/master.sh"
2020

21+
RUBY_COMMIT_DISCOURSE = "#{SCRIPTS_PATH}/ruby/discourse/trunk.sh"
22+
2123
# Use keyword arguments once Rails 4.2.1 has been released.
2224
def perform(initiator_key, benchmark_group, options = {})
2325
Net::SSH.start(
@@ -78,19 +80,9 @@ def ruby_release_discourse(ssh, ruby_version, options)
7880
end
7981

8082
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}"
9486
)
9587
end
9688

0 commit comments

Comments
 (0)