[AWS] Buildspec

on_cloud·2023년 3월 23일
0

AWS

목록 보기
1/13
post-thumbnail

Buildspec이란?


Code Build를 실행하기위해 yaml 형식이 스크립트


Buildspec 기본구조


version: 0.2

phases:
  install:
    runtime-versions:
      <Language>: <version>
  pre_build:
    commands:
      - <command>
  build:
    commands:
      - <command>
  post_build:
    commands:
      - <command>
artifacts:
  files:
    - <file name>

Buildspec section


version

version: 0.2 #Buildspec의 version을 나타냅니다.

phases

phases: #Build 단계에서 Code Build 단계에 실행하는 명령어를 나타냅니다.
  install: #환경설정 및 패키지 설치를 담당합니다.
    runtime-versions: #해당 Code BUild에 사용할 프로그래밍 언어를 정의합니다.
      <Language>: <version>

pre_build

pre_build: #구문확인 기존 정보를 확인합니다.
    commands: #pre_build 단계에서 실행할 스크립트를 정의합니다.
      - <command>

build

build: #build를 실행하는 단계입니다.
    commands: #build 단계에서 실행할 스크립트를 정의합니다.
      - <command>

port_build

  post_build: #image upload 및 추가적인 테스르를 실행합니다.
    commands: #port 단계에서 실행할 스크립트를 정의합니다.
      - <command>

arfitacts

artifacts: #build 진행 후 나오는 산출물을 정의합니다.
  files:
    - <file name>
profile
클라우드 엔지니어가 목표인 학생

0개의 댓글