Skip to content

fix: 배포용 jar를 고정된 이름(app.jar)으로 복사해 선택 모호성 제거 - #205

Merged
unam98 merged 1 commit into
mainfrom
fix/deploy-jar-fixed-name
Jul 28, 2026
Merged

fix: 배포용 jar를 고정된 이름(app.jar)으로 복사해 선택 모호성 제거#205
unam98 merged 1 commit into
mainfrom
fix/deploy-jar-fixed-name

Conversation

@unam98

@unam98 unam98 commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

배경

직전 배포(#204)가 deploy.sh의 jar 선택 로직(ls *.jar | grep -v plain | ...) 문제로 8080 프로세스 크래시를 일으켰음. OTel agent jar가 알파벳순으로 앱 jar보다 앞에 와서 잘못 선택된 것이 원인 — grep -v opentelemetry로 급한 불은 껐지만, 이건 exclude 패턴 방식이라 다른 새 파일이 추가되면 똑같은 문제가 재발할 수 있는 구조임.

변경 내용

근본 원인(선택 모호성) 자체를 제거:

  • CI Copy Jar 단계에서 실행 가능한 jar 하나만 골라 고정된 이름 app.jar로 복사
  • deploy.sh는 이제 $APP_DIR/app.jar 고정 경로만 참조 — ls/grep으로 "추측"하는 과정 자체가 사라짐

이제 /home/ec2-user/app/ 디렉토리에 어떤 파일이 나중에 추가되더라도 배포 스크립트가 헷갈릴 여지가 없음.

참고

기존에 깔려있던 server-0.0.1-SNAPSHOT.jar, server-0.0.1-SNAPSHOT-plain.jar는 이번 배포 후에도 정리 안 되고 남아있을 수 있음(CodeDeploy가 기존 파일을 자동으로 지우진 않음) — 동작에는 영향 없지만 원하면 별도로 정리 가능.

이전에는 deploy.sh가 /home/ec2-user/app/ 안의 여러 jar 파일 중 하나를
ls + grep(exclude 패턴)으로 "추측"해서 골랐음. 이 방식은 그 디렉토리에
새 jar 파일이 추가될 때마다(OTel agent jar 경로 변경 때 실제로 터졌던
문제) 깨질 수 있는 구조였음.

CI(Copy Jar 단계)에서 실행 가능한 jar 하나만 골라 고정된 이름 app.jar로
복사하도록 변경. deploy.sh는 이제 $APP_DIR/app.jar 고정 경로만 참조해서
ls/grep으로 추측하는 과정 자체가 사라짐 — 앞으로 이 디렉토리에 어떤
파일이 추가돼도 배포 스크립트가 헷갈릴 여지가 없음.
@unam98 unam98 self-assigned this Jul 28, 2026
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: be3af65c-47e3-417c-b9df-b794b6909d44

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/deploy-jar-fixed-name

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@unam98
unam98 merged commit ef82b65 into main Jul 28, 2026
2 checks passed
@unam98
unam98 deleted the fix/deploy-jar-fixed-name branch July 28, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants