dev/기타

젠킨스 Couldn't find any revision to build

wndud587 2024. 11. 12. 21:53
728x90

목차

1. 문제 원인

2. 오류 해결


1. 문제 원인

- 젠킨스 파이프라인 작성 중, 다음과 같은 오류가 발생하였다.

 > C:\Program Files\Git\cmd\git.exe config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
Avoid second fetch
 > C:\Program Files\Git\cmd\git.exe rev-parse "refs/remotes/origin/prod^{commit}" # timeout=10
 > C:\Program Files\Git\cmd\git.exe rev-parse "origin/prod^{commit}" # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
ERROR: Maximum checkout retry attempts reached, aborting
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (build)
Stage "build" skipped due to earlier failure(s)
[Pipeline] getContext
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Finished: FAILURE

 

 

- 젠킨스에 대해서 공부를 하는 중이라 잘 알지도 못하고, 영어 거부감 때문에 검색을 하려 하였으나. 마지막 줄에 힌트가 있었다.

- 원인은 레포지토리에 내가 설정한 브랜치가 없다는 것이다. 그래서 깃허브에 들어가서 브랜치를 확인해보니 역시나, 프로덕션용 브랜치가 없었다.

git 브랜치 확인

 

 

2. 해결 방법

- 프로덕션용 브랜치인 prod를 만들었다.

- 1번 git clone이 안되었던 오류를 2번에서 해결하였다.

 

git clone 성공

- build가 안된 것은 다른 오류이니, 이 글에서는 무시해도 됩니다.

 

 

 

 

* 이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다.

728x90