In order to run the container, follow the below steps:
The CI container uses internal Sqlite
database.
It creates its own database tables in order to store the tests results.
The CI Container needs also the main ICE database configuration (see below).
The CI container requires the following Environment variables:
- DJANGO_SETTINGS_MODULE=settings
- PYTHONPATH=/app
- DISPLAY=:99
- CI_DB_NAME=ice_ci_db
- CI_DB_USER=iceci
- ICE_DB_NAME=icedb
- ICE_DB_USER=<ice db user name>
- ICE_DB_PASSWORD=<ice db user password>
- ICE_DB_HOST=
- ICE_DB_PORT=5432
- NUMBER_OF_TEST_RESULTS=30
- ICE_CI_ENVIRONMENT_NAME=Staging
- ICE_EMAIL_HOST=<email host name>
- ICE_CONTACT_FROM_ADDRESS=[email protected]
- ICE_CONTACT_EMAILS='<user mail>, <…> '
- ICE_PORTAL_URL=<url of ice portal> (e.g: http://development.d2ice.att.io/)
Migrations should be run in the standard way
In order to invoke the test session, run the following ansible playbook. It will run the tests and record their results inside the CI dedicated database.
$ ansible-playbook scripts/playbooks/run_ci_test.yml --extra-vars='test_num=<id_number>'
Run the command using the additional tag "ci_report":
$ ansible-playbook scripts/playbooks/run_ci_test.yml --extra-vars='test_num=<id_number>' --tags ci_report
GET http://<ci-django-app-host-and-port>/ice-ci/v1/testresultstomail/<identification-number>
<identification-number> means an arbitrary identifier for the generated report mail.