GITLAB CI/CD PROJECT · ABOUT 35 MIN · +150 XP
Ship a change through a pipeline
The storefront in ~/storefront has no pipeline yet. Add one that builds and tests every push. Then the marketing team wants free shipping from ₹799 instead of ₹999: make that change on a branch, with the test updated, and merge it through a merge request.
Your tasks
- In ~/storefront, write .gitlab-ci.yml with two stages, build and test: a build job (npm ci, npm run build) and a unit-tests job (npm ci, npm test), both using node:22-alpine.
- Check the file with glab ci lint, then commit it and push to main. The pipeline should pass.
- Make a branch called feature/cheaper-shipping. Change FREE_SHIPPING_OVER to 799 in src/pricing.js, and the test in src/pricing.test.js to match.
- Push the branch. Its pipeline should pass.
- Open a merge request titled "Free shipping from 799" and merge it.
Stuck? Every step is covered in the GitLab CI/CD lessons.