πŸ“™ AWS EC2에 Jenkins μ„œλ²„ ꡬ좕 (velog.io)

CIλž€ λ¬΄μ—‡μž…λ‹ˆκΉŒ? - 지속적 톡합 μ„€λͺ… - AWS (amazon.com)

  1. μ  ν‚¨μŠ€ μ„€μΉ˜
  2. κ΄€λ¦¬μž 생성
  3. Credentials 생성
  4. New Item β†’ Pipeline β†’ Configure β†’ Pipeline Script μž‘μ„± (Groovy)
  5. 원격 μ €μž₯μ†Œ clone
  6. Jenkins μ„œλΉ„μŠ€ ν™ˆνŽ˜μ΄μ§€ 곡개
  7. μœ μ € 계정
  8. κ΅¬λΆ„λœ 배포와 좔적
    1. dll 파일이 ν•„μš”ν•œ νŒ€μ›

    2. dll 파일이 ν•„μš”ν•˜μ§€ μ•ŠλŠ” νŒ€μ› - λ§€ 번 직접 λΉŒλ“œν•˜μ—¬ 생성함

    3. git sparse-checkout init --no-cone (클라 μ „μš©)

      .git/info/sparse-checkout

      /AppIcon/
      /Binaries/
      /Build/
      /Config/
      /Content/
      /Plugins/
      /Source/
      /.editorconfig
      /.gitattributes
      /.gitignore
      /.vsconfig
      /SuperPlat.uproject
      /SuperPlat.uproject.DotSettings.user
      /server.ini
      /shadertoolsconfig.json
      
      λ˜λŠ”
      
      /**
      !SPEngine/**
      !Engine/**
      
    4. git config lfs.fetchexclude "Plugins/*/Binaries/Win64/*.dll, Binaries/Win64/*.dll"

      [lfs] repositoryformatversion = 0 fetchexclude = Engine/, SPEngine/

    5. .git/info/exclude : lfs둜 μΆ”μ λ˜λŠ” νŒŒμΌμ€ μ œμ™Έλ˜μ§€ μ•ŠμŒ

      1. staged(or unstaged) λ‹¨κ³„μ—μ„œ μ œκ±°κ°€ μ•ˆλœ 경우

        git update-index --assume-unchanged <파일λͺ…> e.g. git update-index --assume-unchanged Plugins/*/Binaries/Win64/*.dll

      2. lfs νŒŒμΌμ„ exclude ν•˜λ €λ©΄ .git/config νŒŒμΌμ— λ‹€μŒμ„ μΆ”κ°€

        [lfs]
        	fetchexclude = Binaries/Win64/*.dll, Plugins/*/Binaries/Win64/*.dll
        

Groovy Script μž‘μ„± μ‹œ μ£Όμ˜μ‚¬ν•­

echo !OID!>> OIDs.txt     // O
echo !OID! >> OIDs.txt    // X

!OID! 뒀에 곡백이 있으면, 곡백을 μΆ”κ°€ν•˜μ—¬ OIDs.txt νŒŒμΌμ— μ“°μ—¬μ§„λ‹€
for /f "tokens=* usebackq" %%F in (`git diff-tree --no-commit-id --name-only -r HEAD ^| findstr /ri "Plugins/.*/Binaries/Win64/.*\\\\.dll"`) do ()

findstr 뒀에 κ²½λ‘œλŠ” '/'λ₯Ό μ‚¬μš©ν•˜μ—¬ 경둜λ₯Ό ν‘œν˜„.
λ§ˆμ§€λ§‰ dll νŒŒμΌμ„ μ§€μ •ν•  λ•ŒλŠ” '\\\\'둜 ν‘œν˜„. -> λͺ…령이 싀행될 λ•Œ, '\\\\'은 '\\'둜 해석됨

<aside>

git λͺ…λ Ήμ—μ„œ κ²½λ‘œκ°€ 쓰일 λ•Œ, 항상 β€˜/’을 μ‚¬μš©ν•˜λŠ” 것이 μ’‹λ‹€.

batch μŠ€ν¬λ¦½νŠΈμ—μ„œλŠ” β€˜\’λ₯Ό μ‚¬μš©

</aside>