Jenkinsfile Generator (Declarative Pipeline)

Create a starter Jenkinsfile with sensible options for a typical build, test and deploy flow.

Use the tool

Why this tool exists

Pick an agent (any, a Docker image or a node label), enter build, test and deploy commands and the branch that may deploy. The output sets a timeout, disables concurrent builds, keeps the last 20 builds, runs each stage with sh steps, publishes JUnit results when present, restricts deploy with a when { branch } condition and cleans the workspace afterwards.

Commands are written inside single-quoted Groovy strings with quotes escaped. Credentials should come from the Jenkins credentials store via withCredentials, not from the file.

No data is sent anywhere: the work happens in your browser, so you can use it offline once the page has loaded.

How to use it

  1. Choose the agent and enter your commands.
  2. Set the deploy branch and timeout.
  3. Save as Jenkinsfile in the repository root.
  4. Create a Pipeline job that uses it.

Frequently asked questions

Declarative or scripted?

Declarative is simpler and recommended for most pipelines; this tool writes declarative.

Does it need the Docker plugin?

Only if you choose the docker agent.

How do I add secrets?

Use credentials bindings, for example withCredentials, and never print them.

Is my data sent anywhere?

No. Everything is processed in your browser, and the page makes no network requests with your input.