Jenkins2.0以降Pipelineが標準機能となり、 ビルド同士の関係もスクリプトで管理しやすくなった。 PipelineのスクリプトはGroovy(JavaVM上で動く動的プログラミング言語)で書く必要があり、 GroovyにもJavaにも明るくない人にとってはちょっとハードルが高いのだが、柔軟性があるので慣れてしまえばとても便利。 最近すこしpipelineのスクリプトを書くことがあったので、忘れないうちにまとめておく。 サンプルスクリプト pipelineについてまずざっくりとした雰囲気をつかみたい方はJenkins公式pipeline紹介ページを読もう。 今回説明するのをだいたい詰め込んだ自分のサンプルスクリプトを最初にはっておく。 def repository = "git@{....}.git" def github_credential = '{credentialsの
なぜ今まで使わなかったのか。もっと早く知っていれば、 チームメンバーからの要望に応えられてたというのに・・・ Groovy Postbuild Plugin 何が便利かJenkins が持っている情報の取得・変更がし放題なのです! Jenkins をもうちょこーっとだけ便利に使いたいという場合に使えます。 例えば、このようなことに使えます。 [Hudson][Trac] ビルドへのリンクを自動で貼ってみた - ファイナル Jenkinsのジョブ失敗時にビルドを保存するスクリプト Cassandra運用に活躍したスクリプトたち ログから文字列検索してマッチしたら Unstable にする 使い方「ビルド後の処理の追加」から Groovy postbuild を選択、 「Groovy script」に処理を書きます。 例:テストの説明にビルド時刻を設定 def tr = manager.bui
This plugin executes a groovy script in the Jenkins JVM as a post-build action (a publisher) . Typically, the script checks some conditions and updates the build result, puts badges next to the build in the build history, and/or displays information on the build summary page. The groovy script can use the variable manager, which provides various methods to decorate your builds. Those methods can b
(adapted from information on Template plugin in CloudBees Plugins guide) Various Jenkins plugins require that users define custom scripts, most commonly in the Groovy language, to customize Jenkins’s behavior. If everyone who writes these scripts is a Jenkins administrator—specifically if they have the Overall/RunScripts permission, used for example by the Script Console link—then they can write w
概要 Jenkinsのインストールまでは、ansible等を使って自動化されていると思いますが、その先のプラグインのインストールやジョブの設定等の作業はJenkinsのUI上からぽちぽち手動でやっている方が多いのはないのでしょうか? Jenkinsを1台立てるだけなら手動でもいいですが、stagingとproduction用にJenkinsを複数台構築したり、他のプロジェクトでも似たような設定のJenkinsを再度構築する必要が出てくると、毎回手動で設定するのは大変です。 また、手動の場合はどのプラグインをインストールするだとか、グローバルセキュリティの設定をどうするだとかは忘れないように手順書に記載したといった作業も発生してしまいます。 誰でも同じ設定のJenkinsを簡単に構築できるようにするためには、設定も全て自動化させてしまいましょう。 Groovyスクリプトで設定を行う Jenk
Jenkins features a Groovy script console which allows one to run arbitrary Groovy scripts within the Jenkins controller runtime or in the runtime on agents. It is very important to understand all of the following points because it affects the integrity of your Jenkins installation. The Jenkins Script Console: Access is controlled by the Administer permission. Is a web-based Groovy shell into the J
The Active Choices plugin is used in parametrized freestyle Jenkins jobs to create scripted, dynamic and interactive job parameters. Active Choices parameters can be dynamically updated and can be rendered as combo-boxes, check-boxes, radio-buttons or rich HTML UI widgets. Active Choices parameters are scripted using Groovy, or (optionally) Scriptler Groovy scripts. These custom scripts support th
この記事は、Jenkins Advent Calendar 2日目の記事です。 Jenkins Advent Calendar jp 2011 : ATND Jenkinsには、外部から操作するための口としてスクリプトコンソール、CLI、Remote Access APIなどが用意されています。ここでは、僕が一番使い慣れている(けど多分あまりメジャーでない)スクリプトコンソールについて紹介します。 スクリプトコンソールとは ブラウザ上からGroovyコードを記述して、そのコードをサーバ上で実行することができます。トラブルシューティングやジョブの一括編集などに力を発揮します。スクリプトコンソールを使うには、[Jenkinsの管理 > スクリプトコンソール]から、もしくは http://localhost:8080/script を直接入力してみてください。 僕は今の現場では100超のジョブを
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く