Combine docker:lint and docker:test into one command

This commit is contained in:
David Taylor
2017-08-22 13:47:29 +01:00
parent 6e7488178f
commit ed6e1c3825
2 changed files with 75 additions and 81 deletions

View File

@ -2,10 +2,7 @@
# Available environment variables:
# => COMMIT_HASH used by the discourse_test docker image to load a specific commit of discourse
# this can also be set to a branch, e.g. "origin/tests-passed"
# => SKIP_LINT if using the discourse_test docker image, this will skip the docker:test task, and only run the docker:lint task
# => LINT_ONLY if using the discourse_test docker image, this will skip the docker:lint task, and only run the docker:test task
#
# See lib/tasks/docker.rake for other available environment variables
# See lib/tasks/docker.rake for more information
def run_or_fail(command)
pid = Process.spawn(command)
@ -21,5 +18,4 @@ unless ENV['NO_UPDATE']
run_or_fail("bundle")
end
run_or_fail("bundle exec rake docker:lint") if !ENV["SKIP_LINT"]
run_or_fail("bundle exec rake docker:test") if !ENV["LINT_ONLY"]
run_or_fail("bundle exec rake docker:test")