Ubuntu12.04 VPSサーバ構築手順:CI環境構築 Jenkins Play! frameworkプラグインの導入(Play1.x)
以下のエントリシリーズのうちの1つ:Jenkins環境からPlay! frameworkに関する処理を行うプラグインの導入手順について。
基本的には以下の公式プラグインページに基づいて諸々やってみましたという感じ。
2.設定
- プラグインを追加すると、ビルド手順の追加で[Play!]が選べるようになる。
deps (依存性解消) auto-test (自動テスト実行) precompile (プリコンパイル) start (バックグラウンド実行) (※又はstart &)
- 実行結果。ひとまずは
- ビルド実行
- [ソースコード取得]
- [ファイル権限付与]
- [プロジェクト配下に移動]
- [Playコマンド諸々実行]
- ビルド実行
でアプリケーション稼働まで自動で進めました。

(この辺り、サーバ起動時のコマンドについて1点詰まってたところをItsuki KURODA (TwitterID:@i2key)さんにアドバイス頂きました。ありがとうございました!)
おまけ:Playコマンドについて
ざっくり適当訳ではありますが、Playで利用出来るコマンドの一覧を日本語にしてみた。evolutionsコマンドはどこで区切れてるんだ…?w
- (追記)Play公式のチートシートに翻訳版載ってた。こっちで事足りますね。
$ play help
~ _ _
~ _ __ | | __ _ _ _| |
~ | '_ \| |/ _' | || |_|
~ | __/|_|\____|\__ (_)
~ |_| |__/
~
~ play! 1.2.5, http://www.playframework.org
~
~ For all commands, if the application is not specified, the current directory is used
~ Use 'play help cmd' to get more help on a specific command
~
~ Core commands:
~ ~~~~~~~~~~~~~~
~ antify Create a build.xml file for this project (プロジェクト構成からbuild.xmlファイルを作成)
~ auto-test Automatically run all application tests (自動テスト実行:アプリケーション配下の全テストを実行)
~ build-module Build and package a module (モジュールをビルド&パッケージング)
~ check Check for a release newer than the current one (現在のものより新しいリリースが無いかを確認)
~ classpath Display the computed classpath (クラスパスを表示)
~ clean Delete temporary files (including the bytecode cache)
(一時ファイルを削除(バイトコードキャッシュも含む))
~ dependencies Resolve and retrieve project dependencies (プロジェクトの依存性解消)
~ eclipsify Create all Eclipse configuration files (プロジェクトをEclipseで利用出来るように設定ファイル作成)
~ evolutions Run the evolution check
~ evolutions:apply Automatically apply pending evolutions
~ evolutions:mark AppliedMark pending evolutions as manually applied
~ evolutions:resolve Resolve partially applied evolution
~ help Display help on a specific command (特定コマンドのヘルプを表示)
~ id Define the framework ID (フレームワークIDを定義)
~ idealize Create all IntelliJ Idea configuration files (プロジェクトをIDEAで利用出来るように設定ファイル作成)
~ install Install a module (モジュールのインストール)
~ javadoc Generate your application Javadoc (アプリケーションのJavadocを作成)
~ list-modules List modules available from the central modules repository
(セントラルリポジトリにある利用可能なモジュールの一覧を表示)
~ modules Display the computed modules list (モジュールの一覧を表示:プロジェクトに紐付く一覧?)
~ netbeansify Create all NetBeans configuration files (プロジェクトをNetBeansで利用出来るように設定ファイル作成)
~ new Create a new application (新規アプリケーション作成)
~ new-module Create a module (新規モジュール作成)
~ out Follow logs/system.out file (ログファイル/標準出力ファイルを???)
~ pid Show the PID of the running application (実行中アプリケーションのPIDを表示)
~ precompile Precompile all Java sources and templates to speed up application start-up
(起動高速化の為にJavaソース及びテンプレートファイルをプリコンパイル)
~ restart Restart the running application (アプリケーション再起動)
~ run Run the application in the current shell (現在のシェルでアプリ起動)
~ secret Generate a new secret key (秘密鍵の生成)
~ start Start the application in the background (バックグラウンドモードでアプリケーション起動)
~ status Display the running application's status (実行中アプリケーションのステータスを表示)
~ stop Stop the running application (アプリケーションの停止)
~ test Run the application in test mode in the current shell (アプリケーションを現在のシェルでテストモード実行)
~ version Print the framework version (フレームワークのバージョンを表示)
~ war Export the application as a standalone WAR archive
(スタンドアロンWARアーカイブとしてアプリケーションをエクスポート)
~
~ Also refer to documentation at http://www.playframework.org/documentation
~
$
おまけ:参照・参考URL
- Play1.x系
- Play2.x系:Play1.x系に関するものは上記内容のものがあるが、2.x系のものは無いっぽい?以下エントリ内容等を元に機会が来たら探ってみる事にする。


