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

πŸ’š[CI/CD] Create gradle.yml #3 #5

Merged
merged 6 commits into from
Jan 14, 2024
Merged

πŸ’š[CI/CD] Create gradle.yml #3 #5

merged 6 commits into from
Jan 14, 2024

Conversation

seheonnn
Copy link
Collaborator

@seheonnn seheonnn commented Jan 12, 2024

πŸ”Ž Key Changes

πŸ’Œ To Reviewers

  • 브랜치 λͺ… μˆ˜μ •ν•˜μ—¬ λ‹€μ‹œ μƒμ„±ν•˜μ˜€μŠ΅λ‹ˆλ‹€.
  • Dockerfile은 develop에 μ‹€μˆ˜λ‘œ 직접 μƒμ„±μ˜€μŠ΅λ‹ˆλ‹€..γ…Ž πŸ₯²
  • λ‹€μ‹œ λ³΄λ‹ˆ 컀밋 λ©”μ‹œμ§€λ„ 변경을 μ•ˆ ν–ˆλ„€μš”. ν•˜ν•˜

@seheonnn seheonnn added the ci Add or update CU build system label Jan 12, 2024
@seheonnn seheonnn self-assigned this Jan 12, 2024
Copy link
Member

@oxdjww oxdjww left a comment

Choose a reason for hiding this comment

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

κ³ μƒν•˜μ…¨μŠ΅λ‹ˆλ‹€!


# Docker 이미지 Build (2)
- name: docker image build
run: docker build -t ${{ secrets.DOCKER_USERNAME }}/sponus-docker --pull --no-cache . #imageλͺ… κΈ°μž…
Copy link
Member

Choose a reason for hiding this comment

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

--platform linux/amd64 μ˜΅μ…˜μ„ μ€˜μ„œ λΉŒλ“œν•˜λ©΄ OS 쒅속성을 μ œκ±°ν•  수 μžˆμŠ΅λ‹ˆλ‹€!

run: |
cd ./src/main/resources
touch ./application.yml
echo "${{ secrets.APPLICATION_YML }}" > ./application.yml
Copy link
Member

Choose a reason for hiding this comment

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

κΈ°μ‘΄μ• λŠ”

env:
spring.datasource.url: ${{ secrets.DB_URL }}
...
μ΄λŸ°μ‹μœΌλ‘œ ν™˜κ²½λ³€μˆ˜λ₯Ό μ„€μ •ν–ˆλŠ”λ°, 이 방법도 κΉ”λ”ν•˜λ‹ˆ μ’‹λ„€μš”!
λ°°μ›Œκ°‘λ‹ˆλ‹€~

Copy link
Member

@kimday0326 kimday0326 left a comment

Choose a reason for hiding this comment

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

κ³ μƒν•˜μ…¨μŠ΅λ‹ˆλ‹€! μŠΉμΈν•΄λ‘κ² μŠ΅λ‹ˆλ‹€!~~

Comment on lines 64 to 72
#redis
sudo docker stop my-redis
sudo docker rm my-redis
sudo docker rmi redis

sudo docker pull redis
sudo docker network create my-network
sudo docker run --name my-redis --network my-network -d redis
sudo docker run -it -d -p 8080:8080 --name sponus-docker -e TZ=Asia/Seoul --network my-network ${{ secrets.DOCKER_USERNAME }}/sponus-docker
Copy link
Member

Choose a reason for hiding this comment

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

redis μ„ΈνŒ…κΉŒμ§€ ν•΄μ£Όμ…¨λ„€μš”. κ°μ‚¬ν•©λ‹ˆλ‹€!!

@@ -0,0 +1,72 @@
name: Java CI with Gradle
Copy link
Member

Choose a reason for hiding this comment

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

λ°°ν¬κΉŒμ§€ μ§„ν–‰ν•˜λ―€λ‘œ CI/CD라고 λͺ…ν™•νžˆ μž‘μ„±ν•΄λ„ 쒋을 것 κ°™μŠ΅λ‹ˆλ‹€!

Copy link
Member

Choose a reason for hiding this comment

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

ν•œ 가지 μΆ”κ°€ μ˜κ²¬μ„ λ‚¨κΈ°μžλ©΄, CI와 CDλ₯Ό κ΅¬λΆ„ν•΄μ„œ μž‘μ„±ν•˜λŠ” 것은 μ–΄λ–¨κΉŒμš”??

CI(gradle build)λŠ” PR을 올릴 λ•Œ μ‹€ν–‰λ˜λ„λ‘ν•˜κ³ ,
CD(ec2 배포)λŠ” develop λΈŒλžœμΉ˜μ— mergeλ˜μ—ˆμ„ λ•Œ μ‹€ν–‰λ˜λ„λ‘ 해도 쒋을 것 κ°™μ•„μš”!

λ‹€λ₯Έ ν”„λ‘œμ νŠΈμ—μ„œ PR의 Gradle buildκ°€ ν†΅κ³ΌλΌμ•Όλ§Œ main λΈŒλžœμΉ˜μ— 머지 ν•  수 μžˆλ„λ‘ ν–ˆμ—ˆλŠ”λ°,
병합 전에 λ¬Έμ œκ°€ μ—†λŠ”μ§€ PRμ—μ„œ μ§κ΄€μ μœΌλ‘œ 확인할 수 μžˆμ–΄ μ’‹μ•˜λ˜ 것 κ°™μ•„μš”!

트리거 μ˜ˆμ‹œ

on:
  pull_request:
    branches: [ "develop" ]

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

κ°μ‚¬ν•©λ‹ˆλ‹€! μˆ˜μ •ν•˜κ² μŠ΅λ‹ˆλ‹€~ 😊😊

run: |
cd ./src/main/resources
touch ./application.yml
echo "${{ secrets.APPLICATION_YML }}" > ./application.yml
Copy link
Member

@oxdjww oxdjww Jan 14, 2024

Choose a reason for hiding this comment

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

μš” λ°©μ‹μœΌλ‘œ yml을 κ΄€λ¦¬ν•œλ‹€λ©΄, 기쑴에 μ œκ°€ 생성해 놓은
application-local.yml
application-prod.yml
은 μ‚­μ œν•˜κ³ , application.yml에 application-local.yml 을 λ³΅λΆ™ν•΄μ„œ 남겨놓아도 될 것 κ°™μ•„μš”! μˆ˜μ • λΆ€νƒλ“œλ¦½λ‹ˆλ‹€ πŸ‘

@seheonnn seheonnn merged commit c97bbe6 into develop Jan 14, 2024
@seheonnn seheonnn deleted the ci/#3 branch January 14, 2024 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Add or update CU build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants