Search for a command to run...
Comprehensive guide for setting up and configuring GitLab CI/CD pipelines in your projects.
This guide provides detailed instructions for setting up GitLab CI/CD in your projects and creating efficient pipelines.
.gitlab-ci.yml
file in repository root# .gitlab-ci.yml
stages:
- build
- test
- deploy
build:
stage: build
image: node:20
script:
- npm ci
- npm run build
test:
stage: test
image: node:20
script:
- npm ci
- npm test
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
- .npm/
artifacts:
paths:
- dist/
reports:
coverage: coverage/lcov.info
junit: junit.xml
Pipeline Optimization
Security
Maintenance