Jenkins ‐ Jenkins를 이용한 CI CD 자동화 도구의 사용 - dnwls16071/Backend_Summary GitHub Wiki

📚 CI/CD를 위한 Git/Maven 설정

스크린샷 2025-05-23 오후 5 50 25

Dashboard > Jenkins 관리 > Tools

스크린샷 2025-05-23 오후 5 51 48

Maven Integration 설치

스크린샷 2025-05-23 오후 6 06 08

mvn command가 인식되지 않으면 위와 같이 Jenkins UI에서 Maven을 세팅해준다.

Started by user [OOO](http://localhost:8080/user/admin)
Running as SYSTEM
Building in workspace /var/jenkins_home/workspace/Maven-New
The recommended git tool is: NONE
No credentials specified
 > git rev-parse --resolve-git-dir /var/jenkins_home/workspace/Maven-New/.git # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/dnwls16071/cicd-web-project # timeout=10
Fetching upstream changes from https://github.com/dnwls16071/cicd-web-project
 > git --version # timeout=10
 > git --version # 'git version 2.39.5'
 > git fetch --tags --force --progress -- https://github.com/dnwls16071/cicd-web-project +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse origin/master^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Finished: FAILURE
  • 위와 같은 오류가 발생했는데 리포지토리의 URL 혹은 브랜치 네이밍에서의 불일치로 인해 안되는 것으로 파악했다.
  • 찾아보니 Fork한 리포지토리의 메인 브랜치 네임이 main이 아닌 master로 설정되어 찾지 못했던 것이다.

스크린샷 2025-05-23 오후 6 19 33

📚 CI/CD 작업을 위한 Tomcat 서버 연동

스크린샷 2025-05-23 오후 6 29 21

Dashboard > Jenkins 관리 > Tools > Deploy To Container Deploy war/ear to a container 설정 > **/*.war