Windows 기반에 SVN 서버가 동작할 때, Hook 설정이다.

특히 SVN에서 Commit Action에 Jenkins를 연결할 때 사용하는 방법이다.


1. hook 폴더로 이동.

2. post-commit.bat 파일 작성

3. post-commit.bat 파일 내에 아래와 같이 작성

powershell -Command (New-Object System.Net.WebClient).DownloadString(\"http:///job//build?delay=0sec\");


4. 저장 후 Commit.


만일 인증 토큰을 이용하는 경우에는 URL 부분을 좀 손을 봐야 한다.

powershell -Command (New-Object System.Net.WebClient).DownloadString(\"http://:@/job//build?token=&delay=0sec\");


Linux인 경우에는 CUrl 이라는 명령으로 처리한다.

728x90

+ Recent posts