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 Pipeline Construction #5

Merged
merged 4 commits into from
Jul 28, 2024
Merged

CI/CD Pipeline Construction #5

merged 4 commits into from
Jul 28, 2024

Conversation

miraexhoi
Copy link
Member

@miraexhoi miraexhoi commented Jul 27, 2024

๐Ÿ“Ž ๊ด€๋ จ Issue ๋ฒˆํ˜ธ

๐Ÿ“„ ์ž‘์—… ๋‚ด์šฉ ์š”์•ฝ

  • CI/CD ํŒŒ์ดํ”„๋ผ์ธ ํŒŒ์ผ ์„ธํŒ…
  • PR ์‹œ test ์ž๋™ํ™” ํŒŒ์ผ ์„ธํŒ…

๐Ÿ™‹๐Ÿป ์ฃผ์˜ ๊นŠ๊ฒŒ ํ™•์ธํ•ด์•ผ ํ•˜๋Š” ์ฝ”๋“œ

๐Ÿ“„ ๊ฐœ์„  ์‚ฌํ•ญ OR ์ฐธ๊ณ  ์‚ฌํ•ญ

ํ˜„์žฌ main์—๋Š” ์„œ๋ฒ„ ๋กœ์ง์ด ์—†๊ธฐ ๋•Œ๋ฌธ์— PR์ด ์ง„ํ–‰๋˜๋ฉด ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
์ฐธ๊ณ ํ•˜์‹œ๋ฉด ์ข‹์„ ๊ฒƒ ๊ฐ™์•„์š”!

@miraexhoi miraexhoi added env ํ™˜๊ฒฝ์„ค์ • ๊ด€๋ จ ์ž‘์—… ์‹œ feature ๊ธฐ๋Šฅ ์ถ”๊ฐ€ ์‹œ build ์ธํ”„๋ผ ๊ด€๋ จ ์ž‘์—… ์‹œ labels Jul 27, 2024
@miraexhoi miraexhoi requested a review from apptie July 27, 2024 14:11
@miraexhoi miraexhoi self-assigned this Jul 27, 2024
Copy link
Collaborator

@apptie apptie left a comment

Choose a reason for hiding this comment

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

๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค
์„ ํƒ 1 ์งˆ๋ฌธ 2๋กœ ๋ฆฌ๋ทฐ๋ฅผ ๋‚จ๊ธฐ๊ธฐ๋Š” ํ–ˆ๋Š”๋ฐ ํ•ด๋‹น PR์— ๋ฌธ์ œ๋Š” ์—†๋Š” ๊ฒƒ ๊ฐ™์•„ Approve ํ–ˆ์Šต๋‹ˆ๋‹ค

์‹œ๊ฐ„ ๋˜์‹ค ๋•Œ ๋‹ต๋ณ€ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค

- name: Docker build & push to prod
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker build -f Dockerfile -t ${{ secrets.DOCKER_USERNAME }}/spaced:0.0.1-SNAPSHOT .
Copy link
Collaborator

Choose a reason for hiding this comment

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

์„ ํƒ ๐Ÿ”Ž

๊นŒ๋จน์„๊นŒ๋ด ์„ ํƒ์œผ๋กœ ๋‚จ๊ฒผ๊ณ  ์ ์šฉํ•˜์ง€ ์•Š์•„๋„ ๊ดœ์ฐฎ์Šต๋‹ˆ๋‹ค

๋„์ปค ์ด๋ฏธ์ง€ ํƒœ๊ทธ ๊ฐ™์€ ๋ถ€๋ถ„์€ ๋‚˜์ค‘์— ๋ฆด๋ฆฌ์ฆˆ ๊ด€๋ฆฌ๋ฅผ ํ•œ๋‹ค๊ณ  ํ•˜๋ฉด ๋ณ€๊ฒฝํ•ด์•ผ ํ•  ๊ฒƒ ๊ฐ™๊ธฐ๋Š” ํ•ฉ๋‹ˆ๋‹ค
๋‹ค๋งŒ ๋ฆด๋ฆฌ์ฆˆ ๊ด€๋ฆฌ ์ž์ฒด์— ๋Œ€ํ•œ ์ปจ๋ฒค์…˜์„ ์•ˆ ์ •ํ–ˆ์œผ๋‹ˆ ๊ทธ๋Œ€๋กœ ์ง„ํ–‰ํ•˜๋ฉด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค

Copy link
Member Author

Choose a reason for hiding this comment

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

๋„ค, ํ˜„์žฌ๋Š” ๊ฐ„๋‹จํžˆ ๋ฐฐํฌ๋ฅผ ์ž๋™ํ™”ํ•˜๋Š” ๋ฐ ์ดˆ์ ์„ ๋งž์ถ”์—ˆ์Šต๋‹ˆ๋‹ค. ์ถ”ํ›„ ๋ฆด๋ฆฌ์ฆˆ ๊ด€๋ฆฌ ์ปจ๋ฒค์…˜์„ ๋„์ž…ํ•  ๋•Œ ์ด๋ฏธ์ง€ ํƒœ๊ทธ ๊ด€๋ฆฌ๋ฅผ ํ•จ๊ป˜ ๊ฐœ์„ ํ•˜๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

Comment on lines +38 to +42
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST_PROD }}
username: ubuntu
key: ${{ secrets.PRIVATE_KEY }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

์งˆ๋ฌธ ๐Ÿ’ฌ

Self Hosted Runner ๊ฐ™์€๊ฑธ ์‚ฌ์šฉํ• ์ˆ˜๋„ ์žˆ์œผ์…จ์„ํ…๋ฐ , ssh-action์„ ์‚ฌ์šฉํ•ด AWS ํ‚ค๋กœ ์™ธ๋ถ€์—์„œ ์ ‘์†ํ•ด CD ๊ณผ์ •์„ ์ง„ํ–‰ํ•˜๋Š” ๋ฐฉ์‹์„ ์„ ํƒํ•˜์‹  ์ด์œ ๊ฐ€ ๊ถ๊ธˆํ•ฉ๋‹ˆ๋‹ค

Copy link
Member Author

Choose a reason for hiding this comment

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

ํฐ ์ด์œ ๋Š” ์—†๊ณ  AWS ํ‚ค๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŠน์ • ์„œ๋ฒ„์—๋งŒ ์ ‘๊ทผํ•  ์ˆ˜ ์žˆ๋„๋ก ์„ค์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.

script: |
sudo docker stop spaced
sudo docker rm spaced
sudo docker rmi ${{ secrets.DOCKER_USERNAME }}/spaced:0.0.1-SNAPSHOT
Copy link
Collaborator

Choose a reason for hiding this comment

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

์งˆ๋ฌธ ๐Ÿ’ฌ

pull ์ „์— ์ด๋ฏธ์ง€๋ฅผ ์‚ญ์ œํ•˜๋‹ˆ๊นŒ ๊ดœ์ฐฎ์„ ๊ฒƒ ๊ฐ™๊ธฐ๋Š” ํ•œ๋ฐ...ํ˜น์‹œ ๋ชฐ๋ผ์„œ ๋Œ•๊ธ€๋ง ์ด๋ฏธ์ง€๋ฅผ ์‹ ๊ฒฝ ์“ฐ์ง€ ์•Š์•„๋„ ๊ดœ์ฐฎ์„์ง€ ์งˆ๋ฌธ ๋“œ๋ฆฝ๋‹ˆ๋‹ค

Copy link
Member Author

Choose a reason for hiding this comment

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

ํ˜„์žฌ ์„ค์ •์—์„œ๋Š” ์ด๋ฏธ์ง€๋ฅผ pullํ•˜๊ธฐ ์ „์— ๊ธฐ์กด ์ด๋ฏธ์ง€๋ฅผ ์‚ญ์ œํ•˜๊ณ  ์žˆ์–ด ๋Œ•๊ธ€๋ง ์ด๋ฏธ์ง€๊ฐ€ ๋‚จ์ง€ ์•Š๋„๋ก ๊ด€๋ฆฌํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
๊ทธ๋Ÿฌ๋‚˜ ์กฐ๊ธˆ ๋” ์•ˆ์ „ํ•˜๊ฒŒ ํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” ๋Œ•๊ธ€๋ง ์ด๋ฏธ์ง€๋ฅผ ์ฃผ๊ธฐ์ ์œผ๋กœ ์ •๋ฆฌํ•˜๋Š” ๋ช…๋ น์–ด๋ฅผ ๋ฐฐํฌ ์Šคํฌ๋ฆฝํŠธ์— ์ถ”๊ฐ€ํ•ด๋„ ์ข‹์„ ๊ฒƒ ๊ฐ™๋„ค์š”, ์ฐธ๊ณ ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค~

@miraexhoi
Copy link
Member Author

๋„ต ๋‹ต๋ณ€ ์™„๋ฃŒํ–ˆ๊ณ  Approve ๋ฐ›์•˜์œผ๋‹ˆ merge ์ง„ํ–‰ํ•˜๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

@miraexhoi miraexhoi merged commit 54e6b94 into main Jul 28, 2024
1 check failed
@miraexhoi miraexhoi deleted the build/#4 branch August 3, 2024 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build ์ธํ”„๋ผ ๊ด€๋ จ ์ž‘์—… ์‹œ env ํ™˜๊ฒฝ์„ค์ • ๊ด€๋ จ ์ž‘์—… ์‹œ feature ๊ธฐ๋Šฅ ์ถ”๊ฐ€ ์‹œ
Projects
None yet
Development

Successfully merging this pull request may close these issues.

build :: add CI/CD pipeline construction
2 participants