Skip to content

Instantly share code, notes, and snippets.

@crunchie84
Created April 20, 2012 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crunchie84/81607d90188a1c9cb950 to your computer and use it in GitHub Desktop.
Save crunchie84/81607d90188a1c9cb950 to your computer and use it in GitHub Desktop.
Run play with failure notification from within TeamCity
::this script should be with homedir equal to where your play project resides
CALL C:\Tools\play-1.2.4\play.bat auto-test
::import selenium test results if needed
::See this git for information and to obtain this tool: https://github.com/crunchie84/play-seleniumresults-parser
@ECHO Import selenium test results (if any)
call C:\Tools\play-1.2.4\SeleniumDataImporter\PlaySeleniumDataImporter.exe
::verify that the unit tests have been ran
@IF EXIST test-result\result.passed @(
@ECHO Play tests returned .passed file
EXIT 0;
)
@IF EXIST test-result\result.failed @(
@ECHO Play tests returned .failed file
EXIT 1;
)
@ECHO Compiling Play Framework project failed! No tests output exists in \test-result\ folder. See build log for details. 1>&2
EXIT 2;
@crunchie84
Copy link
Author

This script is to be used from within TeamCity to compile Play Framework (1.2.4) projects. It fixes the exit code to be non-zero if something goes wrong.

For useage see this blogpost: http://q42.nl/how-to-use-teamcity-with-the-play-framework

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment