Last active
December 12, 2015 04:18
-
-
Save emanon001/4713144 to your computer and use it in GitHub Desktop.
Jenkins の SVN Plugin 用の post-commit ファイル。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
REPOS="$1" | |
REV="$2" | |
UUID=$(svnlook uuid $REPOS) | |
# 適宜設定 | |
JENKINS_HOME=http://localhost:8080 | |
svnlook changed --revision $REV $REPOS | /usr/bin/curl \ | |
-H "Content-Type:text/plain;charset=UTF-8" \ | |
-d @- \ | |
$JENKINS_HOME/subversion/$UUID/notifyCommit?rev=$REV |
パイプで繋いで、@-
で標準入力から読み出す作戦に変更。
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
あるリビジョンで大量のファイルが追加 / 変更された場合に、svnlook changed の戻り値が恐しく長い文字列になり、cURL の実行に失敗することがある。なので、一度ファイルに吐き出してから、読み出している。