[Jenkins] Text Finder plugin
Text Finder Plugin
Text Finder plugin은 Jenkins job에서 특정 file이나 console log에 지정한 문자열이 존재하는지 확인 후 job status를 변경할 수 있도록 해줍니다.
주로 Jenkins Job 내에서 build failure를 check하지 못하는 build 실패 상황이 발생할 경우, 혹은 warning이기는 하나 중요한 warning이라 build 상태를 failure로 변경하고 싶은 경우에 해당 plugin을 사용합니다.
해당 post에서는 freestyle job에서 Text Finder를 설정하는 방법에 대해 다룹니다.
Pipeline job에서 해당 plugin을 사용하고 싶은 경우에는 아래 URL을 참조하시기 바랍니다.
Install ‘Text Finder’ plugin
-
우측 상단의 ‘Jenkins 관리’ menu 선택 후 “플러그인 관리” 선택
-
‘설치 가능’ tab에서 Text Finder 검색 후 설치
Jenkins job configure에서 Text Finder 설정
-
Job에서 ‘구성(Configure)’ 메뉴 선택
-
‘빌드 후 조치 추가’ 메뉴에서 ‘Search files or the consol log…’ 선택
-
원하는 방식에 맞게 Text Finder 설정
- Regular expression: 찾고자 하는 string이나 정규식
- Files: Text를 찾고자 하는 파일, 비어있다면 File 내 검색을 하지 않음
- Also search the console output: console output에서도 text를 검색
- Build result: 아래 ‘Change condition’에 맞는 조건 충족 시 setting할 Build 결과
- Change condition: Text 검색 결과에 따른 build result 변경을 어떤 조건으로 할지 setting
Leave a comment