forked from alphagov/whitehall
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkins-parallel.sh
executable file
·26 lines (21 loc) · 1.01 KB
/
jenkins-parallel.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash -xe
export DISPLAY=:99
export GOVUK_APP_DOMAIN=test.gov.uk
export GOVUK_ASSET_ROOT=http://static.test.gov.uk
env
# Empty and recreate carrierwave directory
rm -rf ./carrierwave-tmp && mkdir -p ./carrierwave-tmp
# Generate directories for upload tests
mkdir -p ./incoming-uploads
mkdir -p ./clean-uploads
mkdir -p ./infected-uploads
mkdir -p ./attachment-cache
time bundle install --path "${HOME}/bundles/${JOB_NAME}" --deployment
time bundle exec rake db:drop db:create db:schema:load --trace
time bundle exec rake db:test:prepare --trace
RAILS_ENV=production SKIP_OBSERVERS_FOR_ASSET_TASKS=true time bundle exec rake assets:clean --trace
RAILS_ENV=test CUCUMBER_FORMAT=progress time bundle exec rake ci:setup:minitest parallel:create parallel:prepare test_queue shared_mustache:compile parallel:features test:javascript test:cleanup --trace
RAILS_ENV=production SKIP_OBSERVERS_FOR_ASSET_TASKS=true time bundle exec rake assets:precompile --trace
EXIT_STATUS=$?
echo "EXIT STATUS: $EXIT_STATUS"
exit $EXIT_STATUS