๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

๐Ÿ–ฅ๏ธ ๋ฐฑ์—”๋“œ63

[CICD] Github Actions์˜ ๋‹ค์–‘ํ•œ ๊ธฐ๋Šฅ 2. Github Actions์˜ ๋‹ค์–‘ํ•œ ๊ธฐ๋Šฅ 1. checkout github repository๋ฅผ ๊ฐ€์ ธ์™€์„œ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•˜๋Š” ์•ก์…˜ ๋งˆ์ผ“ํ”Œ๋ ˆ์ด์Šค ๊ณต์‹ ์•ก์…˜ ํ•„์š”ํ•œ ํ…Œ์ŠคํŠธ๋‚˜ ๋นŒ๋“œ ์ž‘์—… ๋“ฑ์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์Œ ๋ ˆํฌ์ง€ํ† ๋ฆฌ ๋‚ด์šฉ์„ CICD ์›Œํฌํ”Œ๋กœ์šฐ์—์„œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Œ uses ํ‚ค์›Œ๋“œ๋กœ ์•ก์…˜์„ ๋ถˆ๋Ÿฌ์˜ฌ ์ˆ˜ ์žˆ์Œ name: checkout on: workflow_dispatch jobs: no-checkout: runs-on: ubuntu-latest steps: - name: check file list run: cat README.md checkout: runs-on: ubuntu-latest steps: - name: use checkout action uses: actions/checkout@v.. 2024. 3. 22.
[CICD] Github Actions์˜ event Github Actions์˜ event 1. push ๋ ˆํŒŒ์ง€ํ† ๋ฆฌ / .github / workflows / push.yaml ํŒŒ์ผ ์ž‘์„ฑํ•˜๊ธฐ push.yaml name : ์•ก์…˜ ์ฐฝ์—์„œ ํ‘œํ˜„ ๋  ์‹œ๊ฐํ™” ์ด๋ฆ„ on : ์›Œํฌํ”Œ๋กœ์šฐ ํŠธ๋ฆฌ๊ฑฐ ํ•  ์ด๋ฒคํŠธ. ํŠธ๋ฆฌ๊ฑฐ ํƒ€์ž… jobs : ์‹คํ–‰์‹œํ‚ฌ job์˜ ์ง‘ํ•ฉ. ํ•„์ˆ˜ custom-job-name : job์ด๋ฆ„์€ ์ž์œ  runs on : job์„ ์‹คํ–‰์‹œํ‚ฌ runner ์ง€์ •ํ•˜๊ธฐ steps : step์˜ ์ง‘ํ•ฉ - name : job์ด ์‹คํ–‰์‹œํ‚ฌ ์Šคํƒญ ์ •์˜ํ•˜๊ธฐ. ์Šคํƒญ๋งˆ๋‹ค ์ด๋ฆ„์„ ๋ช…์‹œ์ ์œผ๋กœ ์ž‘์„ฑ/์ƒ๋žต ๊ฐ€๋Šฅ run : step์—์„œ ์‹คํ–‰ํ•  ๋‚ด์šฉ. |๋ฅผ ์ด์šฉํ•˜๋ฉด ๋ฉ€ํ‹ฐ๋ผ์ธ ์ปค๋งจ๋“œ ์ž‘์„ฑ ๊ฐ€๋Šฅ name: push-workflow on: push jobs: push-job: runs-on: ubun.. 2024. 3. 21.
[CICD] ๊นƒํ—ˆ๋ธŒ ์•ก์…˜ ์ปดํฌ๋„ŒํŠธ GitHub Action 2023๋…„ ๋งŽ์ด ์‚ฌ์šฉํ•˜๋Š” CICD๋„๊ตฌ 1์œ„ GitHub์˜ ์ž๋™ํ™” ๋„๊ตฌ ๋‹จ์ˆœํ•œ ์›Œํฌํ”Œ๋กœ์šฐ ~ ๋ณต์žกํ•œ ์›Œํฌํ”Œ๋กœ์šฐ ๊ตฌ์ถ• ์†Œํ”„ํŠธ์›จ์–ด ๊ฐœ๋ฐœ ์›Œํฌํ”Œ๋กœ์šฐ ์ž๋™ํ™” GitHub ์ €์žฅ์†Œ ๋‚ด์—์„œ ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ์ง์ ‘ ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ์Œ YAML์„ ์ด์šฉํ•ด์„œ ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ์‰ฝ๊ฒŒ ์„ค์ •ํ•  ์ˆ˜ ์žˆ์Œ ๋ฐ์ดํ„ฐ ๊ตฌ์กฐ๋ฅผ ๊ฐ„๋‹จํ•˜๊ฒŒ ํ‘œํ˜„ํ•œ ์ง๋ ฌํ™” ์–ธ์–ด .yml .yaml ํŠน์ง• ๋‹ค์–‘ํ•œ ์ด๋ฒคํŠธ(๊นƒํ—ˆ๋ธŒ ์ด๋ฒคํŠธ)์— ๋”ฐ๋ผ ์›Œํฌํ”Œ๋กœ์šฐ ์‹คํ–‰ ๊นƒํ—™์•ก์…˜ ์ปดํฌ๋„ŒํŠธ workflow ํ•˜๋‚˜ ์ด์ƒ์˜ ์ž‘์—…์„ ์‹คํ–‰ํ•˜๋Š”, ๊ตฌ์„ฑ ๊ฐ€๋Šฅํ•œ ์ž๋™ํ™” ํ”„๋กœ์„ธ์Šค .github/workflows ๊ฒฝ๋กœ์— ํŒŒ์ผ์ด ์žˆ์–ด์•ผ ์‹คํ–‰ ๊ฐ€๋Šฅํ•จ ์—ฌ๋Ÿฌ ์›Œํฌํ”Œ๋กœ์šฐ ์ƒ์„ฑ ๋ฐ ์‚ฌ์šฉ ๊ฐ€๋Šฅ ์ด๋ฒคํŠธ ๋ฐœ์ƒ์‹œ ์‹คํ–‰๋จ event ์›Œํฌํ”Œ๋กœ์šฐ ์‹คํ–‰์„ ํŠธ๋ฆฌ๊ฑฐํ•˜๋Š” ๊นƒํ—ˆ๋ธŒ ๋ ˆํฌ์ง€ํ† ๋ฆฌ ๋‚ด ํŠน์ • ํ™œ๋™ ํŠธ๋ฆฌ๊ฑฐ ๋ฐฉ์‹ :.. 2024. 3. 21.
[AWS] CloudFront - ELB - S3/EC2 ์—ฐ๊ฒฐํ•˜๊ธฐ ๊ฐ•์˜๋ฅผ ๋งˆ์น˜๊ณ  ์ƒ๊ธด ์˜๋ฌธ์  ์ธํ”„๋Ÿฐ์˜ ๋น„์ „๊ณต์ž๋„ ์ดํ•ดํ•  ์ˆ˜ ์žˆ๋Š” AWS ์ž…๋ฌธ/์‹ค์ „ ๊ฐ•์˜๋Š” CH.3 ์—์„œ ACM์ธ์ฆ์„œ๋กœ ELB๋ฅผ ํ†ตํ•œ HTTPS ํ†ต์‹ ์„ ๋ฐฐ์šฐ๊ณ  CH.6 ์—์„œ CloudFront๋„ HTTPS๋กœ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ๊ฐ€๋ฅด์ณ ์ค€๋‹ค. CH.6 ์›น ํŽ˜์ด์ง€ ๋ฐฐํฌํ•˜๊ธฐ (S3, CloudFront) ๊ณผ์ •์—์„œ๋Š” ๋„๋ฉ”์ธ ํ˜ธ์ŠคํŒ… ์˜์—ญ์—์„œ ์„œ์šธ์ธ์ฆ์„œ์˜ A๋ ˆ์ฝ”๋“œ๋ฅผ ์‚ญ์ œํ•˜๊ณ  ๋ฒ„์ง€๋‹ˆ์•„์ธ์ฆ์„œ๋ฅผ ์—ฐ๊ฒฐํ•œ๋‹ค (CloudFront๋Š” ๋ฒ„์ง€๋‹ˆ์•„๋งŒ ๊ฐ€๋Šฅํ•˜๊ธฐ ๋•Œ๋ฌธ์—) ๊ฐ•์˜๊ฐ€ ๋๋‚˜๊ณ  ๋„๋ฉ”์ธ์—์„œ ์‚ญ์ œ๋œ ์„œ์šธ์ธ์ฆ์„œ(ELB๋ฅผ ์œ„ํ•œ)๋Š” ์–ด๋””์— ์‚ฌ์šฉํ•˜๋Š”๊ฐ€? CloudFront ์™€ ELB ๋ฅผ ๋™์‹œ์— ์‚ฌ์šฉํ•˜๋ ค๋ฉด ์–ด๋–ป๊ฒŒ ํ•ด์•ผํ•˜๋Š”์ง€ ๊ถ๊ธˆํ•˜๊ธฐ๋„ ํ•˜๊ณ , ๋‚ด ํ”„๋กœ์ ํŠธ์— ์บ์‹ฑ ๋ฐ ๋กœ๋“œ๋ฐธ๋Ÿฐ์„œ๋„ ๊ผญ ์ด์šฉํ•ด๋ณด๊ณ  ์‹ถ์—ˆ๊ธฐ ๋•Œ๋ฌธ์— ๋ฐฉ๋ฒ•์„ ์ฐพ์•„๋ณด๊ฒŒ ๋˜์—ˆ๋‹ค. ํ•ด๊ฒฐ ๊ณผ์ • [1] .. 2024. 3. 21.
[์ธ์ฆ๋ฒˆํ˜ธ] sms ๋ฌธ์ž ๋ฐœ์†ก ๊ตฌํ˜„ - ์ฟจ์—์Šค์— ์—์Šค (2024) ์ผ๊ฒฝํ—˜ ๋งˆ์ง€๋ง‰ API ๊ณผ์ œ ์ค‘ ํ•˜๋‚˜์˜€๋˜ ๋ฌธ์ž๋กœ ํšŒ์›๊ฐ€์ž… ์ธ์ฆ๋ฒˆํ˜ธ ๋ฐœ์†กํ•˜๊ธฐ ์—ฌ๋Ÿฌ ๋ฌธ์ž๋ฉ”์„ธ์ง€ ๋ฐœ์†ก ์‚ฌ์ดํŠธ์ค‘์— ๋ฌด๋ฃŒ 300ํฌ์ธํŠธ๋ฅผ ์ฃผ๋Š” ์ฟจ์—์Šค์— ์—์Šค๋ฅผ ์„ ํƒํ•จ https://coolsms.co.kr/ ๊ตฌ๊ธ€๋ง์œผ๋กœ ์ฐพ์€ ์ฝ”๋“œ๋“ค์€ ํ˜„์žฌ ์ฟจ์—์Šค์— ์—์Šค์—์„œ ์˜ฌ๋ฆฐ ๊นƒ ์ฝ”๋“œ์™€ ์•ฝ๊ฐ„์˜ ์ฐจ์ด๊ฐ€ ์žˆ์–ด์„œ ์ฟจ์—์Šค์— ์—์Šค์˜ ๊นƒํ—ˆ๋ธŒ๋ฅผ ์ฐธ๊ณ ํ•œ ์ฝ”๋“œ๋กœ ๊ธ€์„ ์ž‘์„ฑํ•จ ์ฟจ์—์Šค์— ์—์Šค ํšŒ์›๊ฐ€์ž… ๋ฐ ๋ณธ์ธ์ธ์ฆ ํ•˜๊ธฐ ๋ณธ์ธ์ธ์ฆ์‹œ 300ํฌ์ธํŠธ ๋ฌด๋ฃŒ ์ฆ์ • ์นด์นด์˜คํ†ก ์•Œ๋ฆผ๋„ ๊ฐ€๋Šฅํ•˜๋‹ค๊ณ  ํ•จ API Key์™€ API ๋น„๋ฐ€๋ฒˆํ˜ธ ํ™•์ธํ•˜๊ธฐ ๋Œ€์‹œ๋ณด๋“œ - ๊ฐœ๋ฐœ ํƒญ์—์„œ SDK ์™€ git repository ํ™•์ธํ•˜๊ธฐ net.nurigo sdk 4.3.0 ์Šคํ”„๋ง ์ฝ”๋“œ private final DefaultMessageService messageService; /** * ๋‹จ์ผ ๋ฉ”์‹œ์ง€ ๋ฐœ.. 2024. 2. 29.
[Querydsl] ๋™์ ์ฟผ๋ฆฌ - Where์—์„œ ๋‹ค์ค‘ ํŒŒ๋ผ๋ฏธํ„ฐ ์‚ฌ์šฉํ•˜๊ธฐ ๋™์ ์ฟผ๋ฆฌ - Where์—์„œ ๋‹ค์ค‘ ํŒŒ๋ผ๋ฏธํ„ฐ ์‚ฌ์šฉ ์กฐ๋ฆฝ์„ ํ•  ์ˆ˜ ์žˆ์Œ, ๋ฉ”์„œ๋“œ๋ฅผ ๋‹ค๋ฅธ ์ฟผ๋ฆฌ์—์„œ ์žฌํ™œ์šฉ ๊ฐ€๋Šฅํ•จ ์ฟผ๋ฆฌ ์ž์ฒด์˜ ๊ฐ€๋…์„ฑ์ด ๋†’์•„์ง null ์ฒดํฌ๋Š” ์ฃผ์˜ํ•ด์„œ ์ฒ˜๋ฆฌํ•ด์•ผํ•จ @Test public void ๋™์ ์ฟผ๋ฆฌ_WhereParam() throws Exception { String usernameParam = "member1"; Integer ageParam = 10; List result = searchMember2(usernameParam, ageParam); Assertions.assertThat(result.size()).isEqualTo(1); } private List searchMember2(String usernameCond, Integer ageCond) { return queryFacto.. 2024. 1. 8.
[Querydsl] SpringDataJPA + Querydsl + ์‚ฌ์šฉ์ž ์ •์˜ ์ธํ„ฐํŽ˜์ด์Šค ์‚ฌ์šฉ์ž ์ •์˜ ์ธํ„ฐํŽ˜์ด์Šค ์ž‘์„ฑ public interface MemberRepositoryCustom { List search(MemberSearchCondition condition); } SpringDataJPA๊ฐ€ ์ œ๊ณตํ•˜๋Š” ๋ฉ”์„œ๋“œ ์™ธ์— ํ•„์š”ํ•œ ๋ฉ”์„œ๋“œ๊ฐ€ ์žˆ์„ ๋•Œ ์‚ฌ์šฉ์ž ์ •์˜ ์ธํ„ฐํŽ˜์ด์Šค ๊ตฌํ˜„ public class MemberRepositoryImpl implements MemberRepositoryCustom { private final JPAQueryFactory queryFactory; public MemberRepositoryImpl(EntityManager em) { this.queryFactory = new JPAQueryFactory(em); } @Override //ํšŒ์›๋ช…, ํŒ€๋ช…, ๋‚˜์ด(ag.. 2024. 1. 7.