docs/versioned_docs/version-1.0-beta/adopting/triggers/jenkins.mdx
Dagger runs your checks in Jenkins via dagger check, so the same checks you run locally run on every job — without rewriting your pipeline. You keep all of your existing Jenkins infrastructure and Jenkinsfile, and simply invoke the Dagger CLI from it.
:::tip
For checks with no Jenkinsfile changes at all, enable Cloud Checks with dagger ws autocheck on. The Jenkinsfile below is the hybrid-mode alternative for when you want to drive Dagger from your existing Jenkins setup.
:::
There are many ways to run Dagger on Jenkins. The simplest way to get started is having a Jenkins agent with OCI compatible container runtime.
The general workflow looks like this:
Jenkinsfile from repository or from UI configuration.Jenkinsfile and downloads the Dagger CLI.dagger check against the modules installed in your workspace.DAGGER_CLOUD_TOKEN environment variable is set.Running the examples shown below requires:
dagger labeldocker:dind)docker client installed on your Jenkins agent.dagger/config.toml) — see Workspace Setup.The following code sample demonstrates how to run your Dagger checks in Jenkins. dagger check runs all checks from the modules installed in your workspace and exits non-zero if any check fails; scope it to a single module's checks with a pattern such as dagger check go:*.
By default the CLI starts a Dagger Engine inside the Jenkins agent. For a faster, more reliable experience, offload execution to a managed Dagger Engine provided by Dagger Cloud by adding --cloud to the command (dagger check --cloud). Cloud Engines provide a large persistent cache shared across runs and far more compute than a Jenkins agent, so checks are typically much faster — and you don't provision or maintain any infrastructure. This requires the DAGGER_CLOUD_TOKEN credential configured above.
If you have any questions about additional ways to use Jenkins with Dagger, join our Discord and ask your questions in our Jenkins channel.
Jenkins is an open-source automation server that enables teams to automate the build, test, and deploy processes of software projects. Jenkins supports many plugins that integrate with various tools, making it a popular choice for Continuous Integration and Continuous Deployment.