LoginSignup
21
21

More than 5 years have passed since last update.

JenkinsでGitのshallow cloneの設定

Last updated at Posted at 2014-12-01

shallow cloneとは

デプロイなど最新のソースだけを取得したい場合、git cloneするとすべての履歴を取得するため、時間がかかるし無駄が多い。--depthで取得したい履歴の数を指定することで最新版のみを取得できる。

$ git clone --depth 1 git@github.com:foo/bar.git

JenkinsのGitプラグインでshallow cloneの設定

JenkinsのGitプラグインも1.1.23からshallow cloneに対応している。

  1. JenkinsのJOB設定画面から「ソースコード管理」->「Git」を選択
  2. 「Additional Behaviours」の「追加」から「Advanced clone behaviors」を選択
  3. 「Shallow clone」にチェックを入れる

SS 2014-12-01 13.40.31.png

参考URL

21
21
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
21
21