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로 이름을 정해서 사용해도 좋다