playframework.org アプリケーション用に Jenkins CI をセットアップしようとしていますが、auto-test コマンドの実行後に play を正しく起動できません。
テストはすべて正常に実行されますが、スクリプトが両方同時に起動play auto-test
されているようです。play start --%ci
コマンドを実行するplay start --%ci
と、pid とすべてが取得されますが、実行されていません。
ファイル: auto-test.sh、jenkins はこれを実行シェルで実行します
#!/bin/bash
# pwd is jenkins workspace dir
# change into approot dir
cd customer-portal;
# kill any previous play launches
if [ -e "server.pid" ]
then
kill `cat server.pid`;
rm -rf server.pid;
fi
# drop and re-create the DB
mysql --user=USER --password=PASS --host=HOSTNAME < ../setupdb.sql
# auto-test the most recent build
/usr/local/lib/play/play auto-test;
# this is inadequate for waiting for auto-test to complete?
# how to wait for actual process completion?
# sleep 60;
wait;
# Conditional start based on tests
# Launch normal on pass, test on fail
#
if [ -e "./test-result/result.passed" ]
then
/usr/local/lib/play/play start --%ci;
exit 0;
else
/usr/local/lib/play/play test;
exit 1;
fi