wiki:SysAdmin/ContinuousIntegration

Version 2 (modified by spM, 12 years ago) ( diff )

--

EDEN CONTINUOUS INTEGRATION

URL TO ACCESS RESULTS

http://82.71.213.53/eden/admin/result

LOGIN DETAILS

ssh youraccount@82.71.213.53

Password: *

Location of Cron Job Automation file to run Test Framework:

/etc/cron.custom/testsuite

  • What this does currently :
    • Prepares Server
    • Pulls latest codes from web2py/web2py (update web2py)
    • Pulls latest codes from flavour/eden (update Eden)
    • Deletes prepopulated data
    • Loads all models
    • Fixes permissions of the web2py folder
    • Runs Automated Test Suite
    • Runs Smoke Tests
    • Runs Roles Tests

Edit cron times:

(Currently set to run Test Suite every 6 hours every day of every week of every month of every year)

crontab -e

Location of Web2Py and Eden Directory

  • web2py
    • /home/web2py
  • Eden
    • /home/web2py/applications/eden

Overall Restart

If 82.71.213.53 goes down with these errors:

  • Internal Error
  • Server Maintenance
  • Connection Timeout by every web browser
  • Unresolvable Ticket Error

Simply type these services restart commands in consoles:

  • Server Reboot :
    • sudo /sbin/reboot
      • Note : There will be a downtime of a few minutes after you execute this command
  • Cherokee Restart
    • sudo /etc/init.d/cherokee restart
  • Web2Py SSL Restart
    • sudo /etc/init.d/uwsgi start

Start Test Suite Manually

xvfb-run -a python web2py.py -S eden -M -R ~web2py/applications/eden/modules/tests/suite.py

Shell Script to Start The Test Suite On The CI Server

Simply run this shell script to start Functional selenium test, followed by Smoke test and then finally the Role test. You can comment out the lines you don't want to run.

  • Save the Code given below in a file (say, named as startSuite)
  • Add Execution permission to the file
    • chmod +x /location/to/script/startSuite
  • Execute the shell script
    • sudo sh /location/to/script/startSuite
#!/bin/sh
########
# Cron Script to run Sahana Eden Test Suite
########
#Server preparation
sudo /etc/init.d/cherokee restart
sudo /etc/init.d/uwsgi start

# Pull latest codes from web2py/web2py (update  web2py)
cd /home/web2py
sudo git stash
sudo git pull upstream master

# Pull latest codes from flavour/eden (update Eden)
cd /home/web2py/applications/eden
sudo git stash
sudo git pull upstream master

# Delete prepopulated data
rm -f /home/web2py/applications/eden/databases/*

# Re pre pop db and fix permissions
cd /home/web2py
python web2py.py -S eden -M -R applications/eden/static/scripts/tools/noop.py
chown -R web2py /home/web2py

# Run Automated Test Suite
cd /home/web2py
xvfb-run -a python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A --html-path /home/web2py/applications/eden/static/test_automated/ -V 2

# Run Smoke Test (on linkdepth 16)
cd /home/web2py
xvfb-run -a python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A --html-path /home/web2py/applications/eden/static/test_smoke/ --suite smoke --force-debug --link-depth 16 -V 3

# Run Roles Test
cd /home/web2py
xvfb-run -a python web2py.py -S eden -M -R applications/eden/modules/tests/suite.py -A --suite roles --html-path /home/web2py/applications/eden/static/test_roles/

Attachments (4)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.