Back to blog

Setup a Node.js Pipeline

Published March 03, 2026

In software development CI/CD (Continuous Integration and Continuous Delivery) is foundational to high performant software development teams. A CI/CD Pipeline is a great way to automate your build test and deployment processes. This makes sure that your code is always correctly integrated with your team and deployed to production. With this blog post we will explain how to setup a Node.js pipeline.

What is a pipeline?

Before we start, we have to know, what is a pipeline? A pipeline is a script that will run your project steps, to get your project online. A pipeline consists of multiple stages, for example, lint, build, unit tests, integration tests, deploy.

Node.js

For Node.js, the steps are typically done via npm ( Node Package Manager ), but could also be done via yarn, pnpm. If you take Next.js for example, a popular framework for React Web, npm could look like this:

{
  "name": "zippy.sh",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "eslint",
    "test": "jest",
    "test:ci": "jest --ci"
  },
  "dependencies": {
    "next": "16.1.6",
    "react": "19.2.3",
    "react-dom": "19.2.3"
  },
  "devDependencies": {
    "@tailwindcss/postcss": "^4",
    "@testing-library/dom": "^10.4.1",
    "@testing-library/jest-dom": "^6.9.1",
    "@testing-library/react": "^16.3.2",
    "@types/jest": "^30.0.0",
    "@types/node": "^20",
    "@types/react": "^19",
    "@types/react-dom": "^19",
    "eslint": "^9",
    "eslint-config-next": "16.1.6",
    "jest": "^30.2.0",
    "jest-environment-jsdom": "^30.2.0",
    "tailwindcss": "^4",
    "ts-jest": "^29.4.6",
    "ts-node": "^10.9.2",
    "typescript": "^5"
  }
}

As you could see, npm has 3 commands that are useful to our build process

npm run lint
npm run test:ci
npm run build

We want these commands to be run for our build pipeline, and have at least continuous integration set up.

Set up your build pipeline

Base Image

The first step is to make sure the build environment is ready to run npm commands. In your project make a ubuntu.sh as a base image, to ensure fast build process each time you run your build pipeline.

ubuntu.sh:

#!/bin/bash
set -e

echo "📥 Setting up Ubuntu 24.04 environment..."
apt-get update
apt-get install -y curl
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs

echo "✅ Node.js and npm installed successfully"

The first time zippy will run your project, it will start a new ubuntu container that will load node and npm. It will only do this once, so your build process will eventually not be slowed down to install node. If you change your ubuntu.sh, zippy will understand this and automatically spin up a new ubuntu container with your new setup.

Pipeline

The next step is to actually create your pipeline, in our case this is quite an easy step. We want to run the 3 commands lint, test and build. We do this by making a file in our root called zippy.sh

#!/bin/bash
set -e

echo "Start build for nodejs demo"

npm install  --loglevel=error
npm run lint
npm run test:ci
npm run build

Results:

Try it. One minute to set up.

If you've ever waited for a CI runner to spin up, you'll get why this exists.

14-day Pro trial. No credit card.