본문으로 바로가기

Jenkins Setting for Gerrit

category Installation & Setting/Gerrit 2019. 7. 28. 13:13
728x90

1.Gerrit Trigger Plugin 설치

Jenkins 관리 > 플러그인 관리 > Gerrit Trigger 설치

 

2. jenkins ssh 발급

su jenkins ssh-keygen user가 Jenkins로 변경되지 않을 경우 sudo su -s /bin/bash jenkins

 

3. Gerrit Trigger 설정

Jenkins 관리 > Gerrit Trigger 오른쪽 상단의 Add New Server 선택 후 정보 입력 *Connection error : com.jcraft.jsch.JSchException: Auth fail 가 발생함 -> Key가 Gerrit에 잘못 등록되어있는 문제였음 설정에는 Success가 나아타나 The connection could not be established! Check your settings and the Gerrit server 문구가 뜨면서 연동되지 않음 -> Jenkins restart

 

4. Jenkins Project 설정

소스코드 관리 > Git > Credentials은 kind에서 SSH USER With private key 항목을 사용 Private Key > From a file on Jenkins master 선택 후 File 경로 작성

빌드 유발 > Gerrit event를 체크하면 Gerrit Trigger가 나타남 Dynamic Trigger Configuration의 Add Project Pattern 부분: Plain, Path, RegExp 존재 (프로젝트 정보를 입력하는 부분) Plain : Gerrit Project 이름을 작성 (이것을 사용) Path : ** RegExp : 정규화 Branches : Branch 작성 All Branch이므로 **

 

 

 

 

 

*참고 사이트

https://wiki.jenkins-ci.org/display/JENKINS/Gerrit+Trigger

http://gerrit-documentation.googlecode.com/svn/Documentation/2.5.1/cmd-review.html

'Installation & Setting > Gerrit' 카테고리의 다른 글

Git Review  (0) 2019.07.28
Gerrit Verified Setting  (0) 2019.07.28
INSTALLATION GERRIT  (0) 2019.07.28