CodeConverter

5 of 5 free conversions left. Sign in for unlimited use.

About the Jenkinsfile Generator

The Jenkinsfile Generator writes a declarative Jenkins pipeline for Node.js, Python, Java with Maven or Gradle, Go, .NET and Rust. Choose a Docker agent (the image is picked from the stack), any agent or a labelled agent, then get install, lint, build and test stages, an optional version matrix, a timeout, build discarding, SCM polling or cron triggers, JUnit report and artifact archiving, and an optional Docker build-and-push stage.

How to use the Jenkinsfile Generator

  1. Choose the project type and where the pipeline should run (Docker image, any agent or a labelled agent).
  2. Set the commands, report and artifact paths and any triggers, or leave them empty for the defaults.
  3. Click Generate Jenkinsfile and save it as Jenkinsfile in the repository root.

Frequently asked questions

Which Jenkins plugins does it need?

Besides the Pipeline plugin, a Docker agent needs the Docker Pipeline plugin and Docker on the agent, test reports use the JUnit plugin, and the optional Docker stage also needs a username and password credential for your registry.

Why does the Docker stage only run on some branches?

Its when { branch } condition limits it to the branches you list, and Jenkins only evaluates that in a Multibranch Pipeline job. In a plain pipeline job, remove the when block.

Are my data stored when I use the Jenkinsfile Generator?

The text you submit is processed in memory to produce the result and is not saved. Like any web server, Code Converter logs basic visit data (page, IP address and browser) but never the content you paste.

Is the Jenkinsfile Generator free, and can I call it from a script?

It is free and only needs a free account (log in first). The same tool is available as a REST endpoint at POST /api/jenkinsfile-generator; see the API documentation for the fields and examples.