DevTools Logo

Jenkins Pipeline Builder

Jenkins Pipeline Builder

Build a declarative Jenkinsfile — agent, environment, stages with shell steps, and post actions.

Pipeline settings

Stage 1

Stage 2

Post actions

Jenkinsfile

pipeline {
  agent any
  environment {
    CI = 'true'
  }
  stages {
    stage('Build') {
      steps {
        sh 'npm ci'
        sh 'npm run build'
      }
    }
    stage('Test') {
      steps {
        sh 'npm test'
      }
    }
  }
  post {
    always {
      echo 'Cleanup'
    }
  }
}
client-side
Groovy

Examples

Build and test

Input
agent any; env CI=true
Build: npm ci / npm run build
Test: npm test
Output
pipeline {
  agent any
  environment { CI = 'true' }
  stages {
    stage('Build') { steps { sh 'npm ci' } }
  }
}

A declarative pipeline with one environment variable and shell steps.

About this tool

The Jenkins Pipeline Builder writes a declarative Jenkinsfile from a form. Set the agent, declare environment variables, add stages with shell steps, and optionally add post.always and post.failure actions. The output is a complete pipeline block you drop into your repo — nothing is uploaded.

How to use

  1. Set agent and env

    Pick an agent (any or a Docker image) and add KEY=VALUE environment variables.

  2. Add stages

    Each stage carries shell steps; they are wrapped in sh calls with single quotes.

  3. Copy the Jenkinsfile

    Commit the file to your repo and point a Jenkins pipeline job at it.

Use cases

Migration to Pipeline as Code

Replace freestyle jobs with a committed Jenkinsfile.

Common mistakes

Mistake:Unescaped single quotes in sh.

Fix:The builder escapes them, but keep shell quoting in mind when editing by hand.

Frequently asked questions

References & standards