I just finished up a very crude Ant "wrapper" script so that I could drive builds and tests (mostly tests, as ther isn't much to compile) from CruiseControl. It's a pretty simple setup, but I recommend it for really any sized team.

I snagged the 2.4.1 release of Cruisecontrol, which pretty much "works right out of the box".

For the curious and benefit of others:

I'm not satisfied with the PYTHONPATH and DJANGO_PROJECT_SETTINGS environment variable setups, but it's functioning and running all the tests as we build them and add to our codebase.

---------------build.xml---------------
<project name="webcode" default="all">
<target name="all" depends="test" />
<target name="baseline">
<exec executable="/bin/bash" failonerror="true">
<arg value="baselineBuild.bash"/>
</exec>
</target>
<target name="test" depends="baseline">
<exec executable="python" failonerror="true">
<env key="DJANGO_SETTINGS_MODULE" value="webcode.settings"/>
<env key="PYTHONPATH" path="${ env.PYTHONPATH}:/Users/heckj/Desktop/cruisecontrol-bin-2.4.1/projects" />
<arg value="test.py"/>
</exec>
</target>
</project>

which uses two scripts: baselineBuild.bash and envBuild.bash

----------------baselineBuild.bash------------------
#!/bin/bash
PROJECTPATH=
/Users/heckj/Desktop/cruisecontrol-bin-2.4.1/projects
PROJECT=webcode
export DJANGO_SETTINGS_MODULE="$PROJECT".settings
export PYTHONPATH=$PROJECTPATH:$PYTHONPATH:
cd $PROJECTPATH/$PROJECT
rm /tmp/"$PROJECT"DB
django-admin.py init
django-admin.py install edmonds
django-admin.py install admin
django-admin.py createsuperuser root my_email_address my_sekret_password
python manage.py sqlindexes edmonds > index_creates
cat index_creates | sqlite3 /tmp/"$PROJECT"DB
rm index_creates # clean up after myself...

# intial data loading...
python initial_data_load.py
python example_data_load.py



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to