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

linux

(2)
[Shell Script] CI/CD ์ž๋™ํ™” ๋ฐฐํฌ๋ฅผ ์œ„ํ•œ ํŒŒ์ผ ๋ชจ๋‹ˆํ„ฐ๋‹ ์‰˜ ์Šคํฌ๋ฆฝํŠธ ๋งŒ๋“ค๊ธฐ ํšŒ์‚ฌ ๋‚ด์˜ ๋ฐฐํฌ ํ™˜๊ฒฝ์ด ๋ณต์žกํ•˜๋‹ค. ํ˜„์žฌ ์žฌ์ง ์ค‘์ธ ํšŒ์‚ฌ๋Š” ํŠนํžˆ, ๋ณด์•ˆ์ ์ธ ๋ถ€๋ถ„์— ๋ฏผ๊ฐํ•ด์„œ ์—…๋ฌด๋ณ„๋กœ ๋‹ค์–‘ํ•œ ๋ฐฐํฌ ํ™˜๊ฒฝ์ด ๊ตฌ์„ฑ ๋˜์–ด์žˆ๋‹ค. ๊ทธ ์ค‘์— ๊ฐœ์„ ํ•˜๊ณ  ์‹ถ์—ˆ๋˜ ๋ฐ˜์ชฝ์งœ๋ฆฌ CI/CD ํ™˜๊ฒฝ์ด ์žˆ์—ˆ๋Š”๋ฐ ์ด๋ฒˆ์— ์‹œ๊ฐ„์  ์—ฌ์œ ๊ฐ€ ์ƒ๊ฒจ ํ•ด๋‹น ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜์˜€๋‹ค. ๊ธฐ์กด์˜ ํ™˜๊ฒฝ์—์„œ Jenkis๋ฅผ ์ด์šฉํ•ด์„œ git์— ๋ฐ˜์˜๋œ ์†Œ์Šค๋ฅผ ์‹ค์ œ ๊ฐœ๋ฐœ ์„œ๋ฒ„์— ๋ฐ˜์˜ํ•˜์˜€๋Š”๋ฐ ๋ณด์•ˆ์ ์ธ ๋ฌธ์ œ๋กœ Jenkis๋ฅผ ํ†ตํ•ด์„œ ๋ฐฐํฌ๊นŒ์ง€ ์ง„ํ–‰ํ•˜์ง€๋Š” ๋ชปํ•˜๊ณ  ์••์ถ•๋œ ์†Œ์Šค ํŒŒ์ผ๋งŒ linux ํ™˜๊ฒฝ์˜ ๊ฐœ๋ฐœ ์„œ๋ฒ„๋กœ ์ „์†กํ•˜๊ฒŒ ๊ตฌ์„ฑ๋˜์–ด ์žˆ์—ˆ๋‹ค.๋”ฐ๋ผ์„œ, ๋ฐฐํฌ๋ฅผ ์œ„ํ•ด์„œ ๊ฐœ๋ฐœ์ž ์ง์ ‘ ์„œ๋ฒ„๋กœ ์ ‘์†ํ•ด ์••์ถ•๋œ ์†Œ์Šค ํŒŒ์ผ์„ ํ’€์–ด์„œ ๋ฐฐํฌ๋ฅผ ์ง„ํ–‰ํ•˜์˜€๋‹ค. ์œ„ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด์„œ ํŒŒ์ผ ๋ชจ๋‹ˆํ„ฐ๋ง ์‰˜์„ ๋งŒ๋“ค์–ด์„œ ์„œ๋ฒ„์—์„œ ์ž๋™๋ฐฐํฌ๋ฅผ ์ง„ํ–‰ํ•  ์ˆ˜ ์žˆ๊ฒŒ ๊ตฌ์„ฑํ–ˆ๋‹ค. ๐Ÿ›  ํ•ด๊ฒฐ๋ฐฉ๋ฒ•1. Jenkis๋ฅผ ํ†ต..
[Linux / Terminal] ๋ฆฌ๋ˆ…์Šค, ํ„ฐ๋ฏธ๋„ ์ž์ฃผ ์‚ฌ์šฉํ•˜๋Š” ๋ช…๋ น์–ด ์ •๋ฆฌ ์ทจ๋ฏธ๋‚˜ ์—…๋ฌด๋กœ ์ธํ•ด์„œ ๋ฆฌ๋ˆ…์Šค ํ™˜๊ฒฝ์„ ์ž์ฃผ ์ ‘ํ•ด์•ผ ํ•˜๋Š” ๋ถ„๋“ค์ด ๋งŽ์œผ์‹ค ํ…๋ฐ์š”. ์ตœ๊ทผ์— ์ €๋„ ๋ฆฌ๋ˆ…์Šค ํ™˜๊ฒฝ์„ ์ž์ฃผ ์‚ฌ์šฉํ•˜๋‹ค ๋ณด๋‹ˆ GUI์™€๋Š” ๋‹ค๋ฅธ ํŽธ๋ฆฌํ•œ ์ ๋„ ๋งŽ๋‹ค๋Š” ์ƒ๊ฐ์ด ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค. ์•ˆ ์“ฐ๋ฉด ์›Œ๋‚™ ์ž์ฃผ ์žŠ์–ด๋ฒ„๋ฆฌ๋Š” ์„ฑ๊ฒฉ ๋•Œ๋ฌธ์— ๊ฐ„๋‹จํ•˜์ง€๋งŒ ์œ ์šฉํ•œ ๋ช…๋ น์–ด๋“ค์„ ์ •๋ฆฌํ•ด๋ณผ๊นŒ ํ•ฉ๋‹ˆ๋‹ค. ๐Ÿ“ Linux ์ž์ฃผ ์‚ฌ์šฉํ•˜๋Š” ๋ช…๋ น์–ด ๐Ÿค” ํ˜„์žฌ ์œ„์น˜(working dirctory) ์ฐพ๊ธฐ - PWD (Print Working Directory) pwd ํ˜„์žฌ ์ž์‹ ์˜ ์œ„์น˜๋ฅผ ์•Œ๋ ค์ฃผ๋Š” ๋ช…๋ น์–ด์ž…๋‹ˆ๋‹ค(๋Œ€์†Œ๋ฌธ์ž ๊ตฌ๋ถ„ ์—†์ด ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค.). ๋ฆฌ๋ˆ…์Šค๋‚˜ ํ„ฐ๋ฏธ๋„์„ ์ด์šฉํ•  ๋•Œ, ์ข…์ข… ํ˜„์žฌ ๋””๋ ‰ํ„ฐ๋ฆฌ๊ฐ€ ์–ด๋””์ธ์ง€ ํ—ท๊ฐˆ๋ฆด ๋•Œ๊ฐ€ ์žˆ๋Š”๋ฐ ํ˜„์žฌ ๋””๋ ‰ํ„ฐ๋ฆฌ๋ฅผ ์ฐพ์„ ๋•Œ ์‚ฌ์šฉํ•˜๋ฉด ์œ ์šฉํ•œ ๋ช…๋ น์–ด์ž…๋‹ˆ๋‹ค. cd๋กœ ์ฐพ๋Š” ์ผ์€ ์ด์ œ ๊ทธ๋งŒ~ ํ˜„์žฌ ๋””๋ ‰ํ„ฐ๋ฆฌ(ํด๋”) ๋ฐ ํŒŒ์ผ ์ฐพ๊ธฐ / ์ˆจ๊น€ ํŒŒ..

728x90