Automate local build and deploy with a Dockerfile and a manifest.
What it does well
Flexible pipelines and integrations extensible through plugins.
Control over CI infrastructure and operation in isolated environments.
Same goal, two paths
See how to do each task with both tools. The examples assume the setup described in each case; adapt names, credentials and infrastructure.
01 / USE CASE
Ship a new version
The shop app is already registered in both tools, with source access and the server configured. On the Runner side, commands run on a Linux server with Docker and Traefik already set up.
With Jenkins
Commit a Jenkinsfile with build, test and deploy steps. The deploy stage needs a real script, credentials and a configured target.
Run Build Now or Build with Parameters, depending on the job. Pick the version through the parameter the pipeline defines, follow the console and validate the target.
Publish the new version to the configured source. In the Git + Dockerfile path, the Runner fetches the code and builds on the server, without pushing the app image to a registry.
With polling configured, the pipeline runs automatically. To trigger it now, run the commands below on the server and check the status and history.
Examplebash · example
runner preflight shop
runner deploy shop
runner status shop
runner logs history shop
The Runner works on one server at a time. Host-published ports and shared writable volumes may require a downtime window. The Runner can run the local build and the deploy automatically. Keeping Jenkins to produce images is optional; keep the tests, approvals and integrations your team requires.
02 / USE CASE
Roll back a version
The shop app is already registered in both tools, with source access and the server configured. On the Runner side, commands run on a Linux server with Docker and Traefik already set up. Declarative pipeline with a deploy stage that references an image by version/digest and keeps the required artifacts.
With Jenkins
On a previous run of a Declarative Pipeline, use Restart from Stage and choose the deploy stage that ran for that version. Parameters and SCM information are preserved.
That stage must fetch an immutable image from that run. If it depends on stash, set up stash preservation ahead of time; if the artifact has expired, rebuild the version through the project's flow. Validate the new deploy.
List the retained versions and confirm the previous one still has its code and image available.
Roll back to the previous version and check the application. To pick a different retained version, use --version with the listed identifier.
Examplebash · example
runner versions shop
runner rollback shop
runner status shop
runner logs history shop
A rollback changes code/image; it does not undo migrations, databases or persistent files. Check that the current configuration is compatible with the previous version.
03 / USE CASE
Change configuration
The shop app is already registered in both tools, with source access and the server configured. On the Runner side, commands run on a Linux server with Docker and Traefik already set up.
With Jenkins
In the Jenkinsfile, add LOG_LEVEL = "info" to the deploy stage's environment directive and commit the change.
Run the job. The script must apply this variable to the target's runtime configuration and recreate the container; environment configures the pipeline's processes.
In this example, shop already uses env_sync: skip in the reviewed manifest, which preserves the local environment; LOG_LEVEL is not pinned under environment in the manifest.
Write the non-secret variable on the server and force the container to be recreated. Check the log level in the application's behavior.
Examplebash · example
runner env set shop LOG_LEVEL info
runner deploy shop --force
runner status shop
The application must read LOG_LEVEL at runtime. Pipeline variables only reach the container if the deploy process passes them along.
Documented reports and historical context
Removing a plugin that another one requires can keep the controller from starting.
The runner deploy uses a versioned binary, with no pipeline plugins to install. The operator is still responsible for updating runner, Docker and Traefik.
Plugins require keeping up with security advisories and updates.
Separating the deploy step from CI plugins reduces that coupling. runner also needs security maintenance and runs Dockerfiles and the app: it is not a barrier against third-party code.
Groovy/CPS can produce confusing results in closures, constructors and methods.
The Dockerfile and the manifest define the local build and the automated deploy. Validate the manifest before registering; adapt the Jenkinsfile's specific tests and integrations to the flow you choose.
When to stay with the tool
Stay with Jenkins if your complex pipelines and integrations already do the job for your team. Use runner only for the deploy step when it makes sense.
How to evaluate the deploy step
The commands use shop as the example app. Adjust the identifier and instance to the generated manifest. Only remove the previous deploy after validating the new path.
Identify what your stages do. Runner can take over the Docker build and the deploy on the server itself; keep or adapt specific tests, approvals and integrations. Keeping Jenkins producing images is an option, not a prerequisite.
Prepare a Linux server with compatible Docker and Traefik, DNS and a persistence strategy. Back up your data with your backup tool and test the restore. Install and initialize the runner following the start guide.
In the app folder with a Dockerfile or image, generate and review the manifest. Check network, healthcheck, secrets and version. The wizard does not deploy on its own.
Example for a GitHub repository: commit the reviewed manifest to the main branch before registering. Replace my-org/shop with your repo, main with the published branch and production with the reviewed instance; set up read access to the private repo first. On the server, register, review the preflight and only then deploy.
Example with runnerbash · example
runner add --repo my-org/shop --branch main --instance production --ckey v2
runner preflight shop
runner deploy shop
runner status shop
runner logs history shop
Validate the domain and the app's behavior before turning off the previous deploy. Disable the old trigger to avoid two deployers on the same app. Set up polling to automate the pipeline on the server. If you prefer an external build, configure the source of the image or artifact produced by CI. The start guide covers the prerequisites.