๐ŸŒˆTravis CI : ์‚ฌ์ „ ์ค€๋น„ (IAM, S3)

๊น€์„ฑ์ธยท2023๋…„ 9์›” 18์ผ
0

[DevOps] ๐ŸณDocker & Kubernetes

๋ชฉ๋ก ๋ณด๊ธฐ
3/62

1. IAM ์‚ฌ์šฉ์ž ์ถ”๊ฐ€ํ•˜๊ธฐ

  • ๋ถ€์—ฌํ•œ ๊ถŒํ•œ

2. MFA ์„ค์ • & ์•ก์„ธ์Šค ํ‚ค

IAM ์‚ฌ์šฉ์ž ์ƒ์„ฑ ํ›„ ๊ณ„์ •์— MFA์„ค์ • ๋ฐ ์•ก์„ธ์Šค ํ‚ค๋ฅผ ํ• ๋‹น ํ•˜์˜€๋‹ค.

3. Travsi CI ํ™˜๊ฒฝ๋ณ€์ˆ˜

์ƒ์„ฑํ•œ ์•ก์„ธ์Šค ํ‚ค๋ฅผ Travis CI ๋ ˆํฌ์ง€ํ† ๋ฆฌ ํ”„๋กœ์ ํŠธ์˜ ํ™˜๊ฒฝ๋ณ€์ˆ˜์— ์ถ”๊ฐ€ํ•˜์˜€๋‹ค.

4. S3 ๋ฒ„ํ‚ท ์ƒ์„ฑ

5. .travis.yml ํŒŒ์ผ ์ˆ˜์ •

jdk:
  - openjdk11

branches:
  only:
    - master

cache:
  directories:
    - '$HOME/ .m2/repository'
    - '$HOME/ .gradle'

script: "./gradlew clean build"

before_install:
  - chmod +x gradlew

before_deploy:
  - zip -r ์••์ถ•ํŒŒ์ผ๋ช… *
  - mkdir -p deploy
  - mv ์••์ถ•ํŒŒ์ผ๋ช….zip deploy/์••์ถ•ํŒŒ์ผ๋ช….zip

deploy:
  - provider: s3
    access_key_id: $ํ™˜๊ฒฝ๋ณ€์ˆ˜๋ช…
    secret_access_key: $ํ™˜๊ฒฝ๋ณ€์ˆ˜๋ช…
    bucket: s3๋ฒ„ํ‚ท ์ด๋ฆ„
    region: ap-northeast-2
    skip_cleanup: true
    acl: private
    local_dir: deploy
    wait-until-deployed: true

6. faield to deploy

secret_access_key๋ผ๋Š” ์˜ต์…˜์ด ์ž˜๋ชป๋˜์—ˆ๋‹ค๊ณ  ํ•œ๋‹ค.
์ฐพ์•„๋ณด๋‹ˆ Travis CI ๋ ˆํฌ์ง€ํ† ๋ ˆ์ด ์„ค์ •ํ•ด๋‘” ํ™˜๊ฒฝ๋ณ€์ˆ˜๋ฅผ .travis.yml ํŒŒ์ผ์— ์ž˜๋ชป ์ ์–ด์ค˜์„œ ๋ฐœ์ƒํ•œ์˜ค๋ฅ˜์˜€์Œ.

7. ์ˆ˜์ • ํ›„ S3 ํ™•์ธ(์—ฐ๋™ ์™„๋ฃŒ)


  • ๋ฒ„ํ‚ท์— ์†Œ์Šค์ฝ”๋“œ ์••์ถ•ํŒŒ์ผ์ด ์ž˜ ์˜ฌ๋ผ๊ฐ€์ ธ์žˆ๋‹ค.
profile
๊ฐœ๋ฐœ์ž๊ฐ€ ๊ฟˆ์ธ 25์‚ด ๋Œ€ํ•™์ƒ์ž…๋‹ˆ๋‹ค.

0๊ฐœ์˜ ๋Œ“๊ธ€