Skip to main content
RapidDev - Software Development Agency
bolt-ai-integrationsDevelopment Workflow

How to Integrate Bolt.new with Jenkins

Integrate Bolt.new with Jenkins by exporting your project to GitHub and configuring a Jenkinsfile to run npm install, npm run build, and deploy to Netlify, Vercel, or S3. Jenkins polls or receives webhooks from GitHub to trigger automated builds. If you're new to CI/CD, GitHub Actions or Netlify's built-in CI are simpler alternatives that require no server setup.

What you'll learn

  • How to export a Bolt.new project to GitHub for use with external CI/CD tools
  • How to write a Jenkinsfile for Node.js projects generated by Bolt
  • How to install Node.js on a Jenkins agent and run npm build commands
  • How to deploy build output to Netlify, Vercel, or AWS S3 from a Jenkins pipeline
  • How to trigger Jenkins builds automatically via GitHub webhooks
Book a free consultation
4.9Clutch rating
600+Happy partners
17+Countries served
190+Team members
Beginner13 min read30 minutesDevOpsApril 2026RapidDev Engineering Team
TL;DR

Integrate Bolt.new with Jenkins by exporting your project to GitHub and configuring a Jenkinsfile to run npm install, npm run build, and deploy to Netlify, Vercel, or S3. Jenkins polls or receives webhooks from GitHub to trigger automated builds. If you're new to CI/CD, GitHub Actions or Netlify's built-in CI are simpler alternatives that require no server setup.

Automating Bolt.new Deployments with Jenkins CI/CD

Bolt.new generates complete, production-ready web projects — typically Vite or Next.js apps — but its built-in deployment targets are Bolt Cloud and Netlify. If your team already runs Jenkins for other projects, or if your organization requires CI/CD pipelines that enforce testing, security scans, or multi-environment promotion gates, you can slot Bolt-generated projects directly into your existing Jenkins setup.

The integration model is straightforward: Bolt handles code generation and initial scaffolding, while Jenkins takes ownership of the build and deploy process after the code lands in your repository. Since Bolt exports standard Node.js projects with a package.json and framework configuration files, Jenkins treats them exactly like any manually written project. The Jenkinsfile you write will work equally well for Bolt-generated apps and hand-coded apps.

For teams that are starting fresh without an existing Jenkins server, it's worth knowing that GitHub Actions and Netlify's built-in continuous deployment are significantly simpler to set up and require no infrastructure to maintain. This guide focuses on the Jenkins path for teams that specifically need it, but the alternatives section covers lighter-weight options if Jenkins is not already part of your stack.

Integration method

Development Workflow

Jenkins operates entirely outside Bolt.new's WebContainer. You build your app in Bolt, export or push the code to GitHub, and then Jenkins picks up from there — cloning the repository, installing Node.js dependencies, running the build, and deploying the output. There is no plugin or API key to configure inside Bolt itself; the integration is purely a post-export CI/CD pipeline.

Prerequisites

  • A Bolt.new project that is ready to export (Vite or Next.js)
  • A GitHub account and an empty repository to push the exported code into
  • A Jenkins server (version 2.387+) with the Pipeline, Git, and NodeJS plugins installed
  • Node.js configured as a global tool in Jenkins (Manage Jenkins → Tools → NodeJS installations)
  • Deployment credentials — Netlify auth token, Vercel token, or AWS credentials — stored as Jenkins credentials

Step-by-step guide

1

Export your Bolt project to GitHub

Bolt.new builds everything inside a browser-based WebContainer, but Jenkins needs access to your code through a Git repository. The cleanest export path is Bolt's built-in GitHub integration. In your Bolt project, open the menu and look for the GitHub connect option. If your project is not already linked, Bolt will walk you through OAuth authorization and repository creation. Once connected, every change you make in Bolt gets pushed to the main branch automatically. If you prefer a one-time export, Bolt also offers a ZIP download. Download the ZIP, extract it locally, run git init inside the project folder, and push to your GitHub repository using standard git commands. The exported project contains a standard package.json, a vite.config.ts (or next.config.js for Next.js projects), and all your source files — no Bolt-specific lock-in. Verify the export worked correctly by opening the GitHub repository and confirming you see package.json at the root. Jenkins will fail silently if it clones a repository where package.json is nested in a subfolder rather than at the root, so this check matters. At this stage you are not touching Jenkins at all — you are just establishing the source of truth that Jenkins will pull from on every build.

Pro tip: If your Bolt project has a .bolt folder at the root, add it to .gitignore before pushing — it contains editor state that is not needed in your pipeline.

Expected result: Your Bolt project source code is visible in a GitHub repository with package.json at the root level.

2

Create a Jenkinsfile in the repository root

A Jenkinsfile is a text file that lives in the root of your repository and defines your CI/CD pipeline as code. Jenkins reads this file automatically when it discovers or processes the repository. Create a file named Jenkinsfile (no extension) at the project root and paste in the pipeline definition below. The pipeline has four stages: Checkout (Jenkins clones your repo), Install (runs npm ci for a clean install), Build (runs npm run build to produce the dist folder), and Deploy (ships the output to your target platform). The NodeJS tool reference in the agent section tells Jenkins to use the Node.js installation you configured in the global tools settings — change 'Node 20' to match the exact name you gave that installation. For Vite projects, the build output lands in dist/. For Next.js projects it lands in .next/ (or out/ if you use static export). Adjust the deploy stage path to match your framework. The pipeline also references credentials by ID — you will create those credentials in the Jenkins UI in the next step, so use the IDs shown here as placeholders and update them to match what you create.

Jenkinsfile
1// Jenkinsfile
2pipeline {
3 agent any
4 tools {
5 nodejs 'Node 20'
6 }
7 environment {
8 // Reference credentials stored in Jenkins Credentials Manager
9 NETLIFY_AUTH_TOKEN = credentials('netlify-auth-token')
10 NETLIFY_SITE_ID = credentials('netlify-site-id')
11 }
12 stages {
13 stage('Checkout') {
14 steps {
15 checkout scm
16 }
17 }
18 stage('Install') {
19 steps {
20 sh 'npm ci'
21 }
22 }
23 stage('Build') {
24 steps {
25 sh 'npm run build'
26 }
27 }
28 stage('Deploy to Netlify') {
29 steps {
30 sh 'npm install -g netlify-cli'
31 sh 'netlify deploy --prod --dir=dist --auth=$NETLIFY_AUTH_TOKEN --site=$NETLIFY_SITE_ID'
32 }
33 }
34 }
35 post {
36 failure {
37 echo 'Build or deploy failed. Check the console output above.'
38 }
39 success {
40 echo 'Deployed successfully.'
41 }
42 }
43}

Pro tip: Use npm ci instead of npm install in pipelines. npm ci performs a clean install from package-lock.json, ensuring identical dependencies on every build and preventing 'works on my machine' issues.

Expected result: A Jenkinsfile exists at the root of your GitHub repository and is visible when you browse the repo on GitHub.com.

3

Configure Jenkins credentials and create the pipeline job

Jenkins stores sensitive values like API tokens and deploy keys in its Credentials Manager, keeping them out of your Jenkinsfile and out of your repository. Navigate to Manage Jenkins → Credentials → (global) → Add Credentials. For Netlify deployment, create two Secret text credentials: one with the ID netlify-auth-token (value: your Netlify personal access token from app.netlify.com/user/applications) and one with the ID netlify-site-id (value: your site's API ID from Site Settings → General). If you are deploying to Vercel instead, create a single credential with ID vercel-token and update the deploy stage in your Jenkinsfile accordingly. For AWS S3, you will store AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as separate credentials and bind them using the withCredentials block. Now create the pipeline job: from the Jenkins dashboard click New Item, give the job a name (e.g., bolt-app-deploy), select Pipeline, and click OK. In the job configuration, scroll to the Pipeline section and set Definition to Pipeline script from SCM. Set SCM to Git, enter your repository URL, and under Credentials add your GitHub credentials if the repository is private. Set the Script Path to Jenkinsfile and save. Run the job once manually by clicking Build Now to confirm the pipeline works before setting up automatic triggers.

Jenkinsfile
1// For Vercel deployment, replace the Deploy stage with:
2stage('Deploy to Vercel') {
3 environment {
4 VERCEL_TOKEN = credentials('vercel-token')
5 }
6 steps {
7 sh 'npm install -g vercel'
8 sh 'vercel --prod --token=$VERCEL_TOKEN --yes'
9 }
10}
11
12// For AWS S3 deployment:
13stage('Deploy to S3') {
14 environment {
15 AWS_ACCESS_KEY_ID = credentials('aws-access-key-id')
16 AWS_SECRET_ACCESS_KEY = credentials('aws-secret-access-key')
17 }
18 steps {
19 sh 'aws s3 sync dist/ s3://your-bucket-name --delete'
20 sh 'aws cloudfront create-invalidation --distribution-id YOUR_DIST_ID --paths "/*"'
21 }
22}

Expected result: The Jenkins pipeline job runs successfully, producing a green build with all four stages passing and the app visible at its deployed URL.

4

Set up GitHub webhooks for automatic builds

Right now Jenkins only builds when you click Build Now manually. To trigger builds automatically every time you push to GitHub (including when Bolt pushes changes to your connected repo), you need to configure a GitHub webhook. In your Jenkins job configuration, scroll to Build Triggers and check GitHub hook trigger for GITScm polling. Save the job. Next, go to your GitHub repository → Settings → Webhooks → Add webhook. Set the Payload URL to http://YOUR_JENKINS_URL/github-webhook/ (note the trailing slash — Jenkins requires it). Set the Content type to application/json. Under Which events would you like to trigger this webhook, choose Just the push event. Save the webhook. GitHub will send a ping event immediately; if the webhook shows a green checkmark the connection is confirmed. From now on every push to the repository — whether from your local machine, from Bolt's GitHub integration, or from a pull request merge — will automatically trigger a Jenkins build. To restrict builds to only the main branch, add a when clause to your pipeline stages: when { branch 'main' }. If your Jenkins server is behind a firewall and not accessible from the public internet, GitHub webhooks cannot reach it. In that case, use the GitHub Checks API with Jenkins's SCM Polling as a fallback: check Poll SCM in Build Triggers and set a schedule like H/5 * * * * to poll every five minutes.

Jenkinsfile
1// Add branch filtering to Jenkinsfile to only deploy from main:
2pipeline {
3 agent any
4 tools {
5 nodejs 'Node 20'
6 }
7 stages {
8 stage('Checkout') {
9 steps { checkout scm }
10 }
11 stage('Install') {
12 when { branch 'main' }
13 steps { sh 'npm ci' }
14 }
15 stage('Build') {
16 when { branch 'main' }
17 steps { sh 'npm run build' }
18 }
19 stage('Deploy') {
20 when { branch 'main' }
21 environment {
22 NETLIFY_AUTH_TOKEN = credentials('netlify-auth-token')
23 NETLIFY_SITE_ID = credentials('netlify-site-id')
24 }
25 steps {
26 sh 'npm install -g netlify-cli'
27 sh 'netlify deploy --prod --dir=dist --auth=$NETLIFY_AUTH_TOKEN --site=$NETLIFY_SITE_ID'
28 }
29 }
30 }
31}

Pro tip: Bolt's GitHub integration pushes to your default branch automatically. If you want Bolt changes to trigger Jenkins builds, make sure Bolt and Jenkins are configured to use the same branch name.

Expected result: Pushing a commit to GitHub (or having Bolt push a change) automatically triggers a Jenkins build within seconds, visible in the Jenkins dashboard.

Common use cases

Multi-environment promotion pipeline

Your organization requires all deployments to pass through staging before reaching production. Jenkins builds the Bolt app, deploys to a staging URL, waits for manual approval, and then promotes to production — enforcing a review gate that Bolt's one-click deploy cannot provide.

Bolt.new Prompt

Set up a Vite project with environment-specific configuration. Create a .env.staging and .env.production file with placeholder values for VITE_API_URL and VITE_APP_ENV so Jenkins can substitute them during pipeline builds.

Copy this prompt to try it in Bolt.new

Security scanning before deployment

Compliance requirements mandate that every build run npm audit and a dependency vulnerability scan before any code ships to production. Jenkins orchestrates the scan, fails the build if high-severity issues are found, and sends a Slack notification to the security team.

Bolt.new Prompt

Add an npm audit script to package.json that exits with a non-zero code if high severity vulnerabilities are found. I need this to integrate with our Jenkins pipeline security gate.

Copy this prompt to try it in Bolt.new

Deploy to AWS S3 static hosting

The production environment is an AWS S3 bucket with CloudFront for CDN. Jenkins builds the Bolt-generated Vite app, uploads the dist folder to S3 using the AWS CLI, and invalidates the CloudFront cache — a deployment target that Bolt's native publish button cannot reach.

Bolt.new Prompt

Build me a Vite React app. Include a build script and make sure all assets use relative paths or a configurable VITE_BASE_URL so the output works when hosted in an S3 bucket subfolder.

Copy this prompt to try it in Bolt.new

Troubleshooting

Jenkins build fails with 'npm: command not found' or 'node: command not found'

Cause: The NodeJS plugin is installed but Node.js is not configured as a global tool in Jenkins, or the tool name in your Jenkinsfile does not exactly match the name configured in Manage Jenkins → Tools.

Solution: Go to Manage Jenkins → Tools → NodeJS installations → Add NodeJS. Give it a name (e.g., 'Node 20'), select the version, and save. In your Jenkinsfile, update the tools block to use the exact same name: nodejs 'Node 20'. Then re-run the build.

Build output says 'dist not found' or 'No such file or directory' during the deploy stage

Cause: The build succeeded but the output directory name does not match what the deploy command expects. Vite outputs to dist/ by default, but if the project uses Next.js static export it outputs to out/. If it is a Next.js server-rendered app, the output is .next/ and cannot be deployed as static files.

Solution: Check the build output in the Jenkins console log to see which folder was created. Update the --dir flag in your netlify deploy command to match. For Next.js static export, make sure next.config.js contains output: 'export' and use out/ as the deploy directory.

typescript
1// next.config.js — enable static export for Next.js
2/** @type {import('next').NextConfig} */
3const nextConfig = {
4 output: 'export',
5 trailingSlash: true,
6};
7export default nextConfig;

GitHub webhook shows a red X and Jenkins does not trigger on push

Cause: Jenkins is not publicly accessible from GitHub's servers (common with Jenkins behind a corporate firewall or VPN), the webhook URL is missing the required trailing slash, or the GitHub plugin is not configured to listen for webhook events.

Solution: Verify the webhook URL format is exactly http://YOUR_JENKINS_URL/github-webhook/ with a trailing slash. Check that the GitHub plugin is installed and that 'GitHub hook trigger for GITScm polling' is checked in your job's Build Triggers. If Jenkins is behind a firewall, switch to SCM polling by setting the build trigger to 'Poll SCM' with the schedule H/5 * * * *.

Best practices

  • Use npm ci instead of npm install in your Jenkinsfile — it always installs from the lockfile, making builds reproducible across agents and environments.
  • Store all deployment tokens and API keys in Jenkins Credentials Manager, never directly in the Jenkinsfile or in environment variables committed to your repository.
  • Add a .bolt folder and node_modules/ to your .gitignore before connecting Bolt to GitHub — these directories should never be in source control.
  • Pin your Node.js version in Jenkins Tools to match the version Bolt uses (Node 20 as of 2026) to avoid subtle compatibility differences between development and CI.
  • Run npm run build locally after exporting from Bolt to confirm there are no build errors before connecting the repository to Jenkins — catching issues before the pipeline saves debugging time.
  • For teams not already running Jenkins, seriously consider GitHub Actions or Netlify CI as simpler alternatives — both support the same Node.js build workflow with far less infrastructure overhead.
  • Add a post-build notification (Slack plugin, email, or Teams webhook) to the Jenkinsfile so the team is alerted to deployment failures without checking the Jenkins dashboard manually.

Alternatives

Frequently asked questions

Does Bolt.new have a native Jenkins integration?

No. Jenkins is a server-side CI/CD tool that runs outside of Bolt's browser-based WebContainer environment. The integration is entirely post-export: you push your Bolt project to GitHub, and Jenkins picks it up from there. There is no Jenkins plugin or configuration inside Bolt itself.

Can Jenkins build a Bolt project directly without going through GitHub?

Not practically. Jenkins needs a Git repository to clone. While you could manually upload the exported ZIP and configure a local repository on the Jenkins server, connecting to GitHub is the standard approach and enables automatic webhook-triggered builds. Bolt's native GitHub integration makes the export seamless.

What Node.js version should I configure in Jenkins for Bolt projects?

Bolt.new uses Node.js 20 in its WebContainer as of early 2026. Configure Node 20 LTS in Jenkins Tools to match. Using a significantly older version (Node 16 or earlier) can cause build failures with modern Vite and Next.js versions that Bolt generates.

Is Jenkins the right tool for a Bolt.new project, or should I use something simpler?

If your team already uses Jenkins for other projects, adding Bolt-generated apps to the same pipeline makes sense. If you are starting fresh, GitHub Actions, Netlify CI, or Vercel's built-in Git integration are much simpler to configure and require no server to maintain. Jenkins is best justified when you need enterprise features like multi-environment promotion gates, compliance scanning, or integration with an existing Jenkins-based organization.

Will Jenkins be able to deploy a Bolt Next.js app with server-side rendering?

Yes, but the deployment target matters. Netlify and Vercel both support Next.js server-side rendering through their platform adapters. If you are deploying to S3, you must configure Next.js static export (output: 'export' in next.config.js), which disables SSR features like getServerSideProps. For full SSR on S3, you would need an EC2 instance or Lambda@Edge setup.

RapidDev

Talk to an Expert

Our team has built 600+ apps. Get personalized help with your project.

Book a free consultation

Need help with your project?

Our experts have built 600+ apps and can accelerate your development. Book a free consultation — no strings attached.

Book a free consultation

We put the rapid in RapidDev

Need a dedicated strategic tech and growth partner? Discover what RapidDev can do for your business! Book a call with our team to schedule a free, no-obligation consultation. We'll discuss your project and provide a custom quote at no cost.