mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 03:09:43 +00:00
DEV: adds time logging to docker_test script (#7627)
This commit is contained in:
parent
e12ae453e9
commit
6be9a6eb2e
@ -10,6 +10,10 @@
|
||||
|
||||
puts "travis_fold:end:starting_docker_container" if ENV["TRAVIS"]
|
||||
|
||||
def log(msg)
|
||||
STDERR.puts "#{Time.now.iso8601}: #{msg}"
|
||||
end
|
||||
|
||||
def run_or_fail(command)
|
||||
pid = Process.spawn(command)
|
||||
Process.wait(pid)
|
||||
@ -18,20 +22,27 @@ end
|
||||
|
||||
unless ENV['NO_UPDATE']
|
||||
puts "travis_fold:start:pulling_latest_discourse" if ENV["TRAVIS"]
|
||||
|
||||
log("Reseting git repository")
|
||||
run_or_fail("git reset --hard")
|
||||
|
||||
log("Pulling git repository")
|
||||
run_or_fail("git pull")
|
||||
|
||||
log("Checking out git branch")
|
||||
checkout = ENV['COMMIT_HASH'] || "HEAD"
|
||||
run_or_fail("git checkout #{checkout}")
|
||||
|
||||
puts "travis_fold:end:pulling_latest_discourse" if ENV["TRAVIS"]
|
||||
puts "travis_fold:start:bundle" if ENV["TRAVIS"]
|
||||
|
||||
log("Run bundler")
|
||||
run_or_fail("bundle")
|
||||
|
||||
puts "travis_fold:end:bundle" if ENV["TRAVIS"]
|
||||
end
|
||||
|
||||
log("Running tests")
|
||||
if ENV['RUN_SMOKE_TESTS']
|
||||
run_or_fail("bundle exec rake smoke:test")
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user