Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Jenkins CI/CD 구현 #31

Merged
merged 4 commits into from
Jul 12, 2024
Merged

feat: Jenkins CI/CD 구현 #31

merged 4 commits into from
Jul 12, 2024

Conversation

its-sky
Copy link
Member

@its-sky its-sky commented Jul 11, 2024

🌱 관련 이슈

📌 작업 내용 및 특이사항

  • CI/CD를 위한 Dockerfile, Jenkinsfile을 scripts 디렉토리 내에 구현하였습니다.
  • Dockerfile-dev와 Dockerfile-prod는 spring.profiles.active만 다르게 구현하였습니다.
  • Jenkinsfile, Jenkinsfile-dev는 내부에 들어가는 credential 값만 다르게 구현하였습니다.
  • dev는 develop 브랜치에 merge됐을 때 dev 서버에 배포되도록 코드를 두었습니다. (현재는 개발 서버가 존재하지 않기에 동작하지 않습니다)
  • prod는 main 브랜치에 merge됐을 때 prod 서버에 배포되도록 구현하였습니다.

📝 참고사항

@its-sky its-sky self-assigned this Jul 11, 2024
scripts/Jenkinsfile Show resolved Hide resolved
"""

sshagent (credentials: ['jenkins-ssh']) {
sh "ssh -o StrictHostKeyChecking=no ${TARGET_HOST} '${remoteCommands}'"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

StrictHostKeyChecking= no
이 명령어 쓰면 중간자 공격에 취약하지 않나요? 이 명령어를 써도 괜찮다고 판단이 들으셔서 그렇게 하신건까요?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

그런부분까진 생각해보지 않았는데 옵션 수정해보도록 하겠습니다~

@penrose15
Copy link
Collaborator

수고하셨습니다! 인프라 지식이 빠삭하시군요

Copy link
Member

@ywonchae1 ywonchae1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

짱이세요 🥹🏋️‍♂️

scripts/Jenkinsfile Show resolved Hide resolved
@its-sky its-sky merged commit 0042c19 into develop Jul 12, 2024
@its-sky its-sky deleted the feature/29-ci-cd branch July 12, 2024 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ Jenkins CI/CD 세팅
3 participants