gitlab ci/cd pipeline

해피데빙·2023년 6월 27일
0
stages:
  - test
  - build
  - deploy

test:
  stage: test
  script: echo "Running tests"

build:
  stage: build
  script: echo "Building the app"

deploy_staging:
  stage: deploy
  script:
    - echo "Deploy to staging server"
  only:
    - master

deploy_prod:
  stage: deploy
  script:
    - echo "Deploy to production server"
  when: manual
  only:
    - master

ci는 continuous integration, 즉 지속적 통합을 의미한다

매번 커밋을 쌓을 때마다 어느 정도 상태의 일관성을 유지해야 지속 가능한 상태로 관리를 할 수 있다

test, build, deploy 등 stage를 정해서 각 단계마다 실행할 script를 정해준다

pipeline의 어떤 runner를 실행할지 tag로 이름을 정해서 사용해도 좋다

profile
노션 : https://garrulous-gander-3f2.notion.site/c488d337791c4c4cb6d93cb9fcc26f17

0개의 댓글