Manual Build Version
Specify a version when starting a job manually, then create a Git tag with that version after the build steps succeed.
Use POM Version
Use the Maven project's project.version as the OneDev build version.
Conditional Build Params
Prompt for Platform and Kernel Version when starting a job manually. Show Kernel Version only when Platform is Linux.
Matrix Build
Run a job once for every combination of parameter values. This example expands two database values (Oracle, MySQL) and two operating-system values (Linux, Windows) into four builds whenever main is updated.
Use Job Secrets
Store secret values in project settings instead of committing them to the build specification, where anyone with code read permission could see them.
Different Job Secret for Different Branch
Define multiple secrets with the same name to select a value according to job authorization. OneDev uses the first authorized secret with that name, searching the current project before its parents.
Pass Artifacts Between Jobs
Generate files in job1, publish them, and retrieve them into job2's working directory.
Clone Submodules
Enable Retrieve Submodules in a job's Checkout Code step to initialize and recursively update the submodules recorded by that commit. Commit both .gitmodules and each submodule's Git reference before running the job.
Pull Tags in Job
OneDev checks out the requested commit for a build. To make repository tags available to commands such as git describe --tags, fetch them explicitly after checking out the code.
Commit and Push in Job
A job can commit generated files and push them back to OneDev. The default checkout credential only has read permission for the current project, so configure a credential with code write permission first.
Job Retry
This tutorial explains how to retry job upon certain failures
Pull Request Verification
Run a CI job against the merge commit of a pull request to check how its changes work together with the target branch. A trigger starts the job; a branch protection rule makes a successful result mandatory for merging.
Build/Publish Docker Image
Build a Docker image in a OneDev job and publish it to Docker Hub. This example packages a small static website with Nginx; replace the website build step with your application's build and tests as needed.
Multi-Arch Docker Image
This tutorial explains how to build and publish multi-arch docker image
Use Services
A service runs alongside a job and is reachable by its service name. This example starts a disposable MySQL database for a job running with a Docker executor.
Working with Job Cache
Job caches preserve reusable files between builds, such as downloaded dependencies. A cache can be missing, so the job must always be able to populate its files from scratch.
Plain Old Build
Shell executors run commands directly on the host operating system. A Server Shell Executor uses the OneDev server host; a Remote Shell Executor uses a connected agent. This example runs sw_vers on a macOS agent.
Build Promotion
Promote a successful build to run a downstream job that depends on it. This makes the build you have verified the starting point for further processing.
Understanding Pipeline
A pipeline connects a build with its job dependencies and downstream jobs. This example publishes a file in Build and reads it in Deploy, so you can see which upstream build supplied the artifact.
Build Farm with Agents
Agents run build jobs on machines connected to OneDev. The server updates connected agents automatically when necessary. This example installs a Docker-hosted agent and runs a container job through it.
Build Farm with Kubernetes
This tutorial explains how to set up build farm with Kubernetes cluster
Auto-assign Build Failure Investigator
Create an issue when a build fails, assign an investigator, and close the issue when a later build succeeds.
Insecure Docker Registry
Docker image pulls and pushes use the Docker daemon, while the Build Image step uses a BuildKit builder. Configure the component that contacts your registry on every server or agent that can execute the job. A daemon setting alone does not configure a docker-container BuildKit builder.
Set Up Proxy for Docker Registry
Configure the proxy where registry requests originate. Docker daemon settings cover pulling job containers; Build Image uses a separate BuildKit builder, and Build Image (Kaniko), Pull Image, and Push Image contact registries from their step containers.
Job Dispatch and Aggregation
Generate files in one job, process each file in a separate build, then collect the results. This example uses a single OneDev server with a Docker job executor. The Groovy script reads that server's artifact directory; a cluster requires a script that retrieves the artifact listing from the server holding the build.
Live Preview App in Pull Request
This tutorial explains how to set up pull request to launch live preview of your application and tear it down after pull request is closed.
Restrict a Job to Commits on a Branch
This example allows Release to run only for commits on main, while other jobs can run for commits on any branch.
Protect Production Kubernetes Cluster
This tutorial explains how to prevent production Kubernetes cluster from running unauthorized jobs
Security and Compliance Scan
3 items
Update Dependencies via Renovate
Run Renovate in OneDev CI/CD to create dependency-update pull requests. The OneDev server can run natively; the Renovate step runs in a job container.
Diagnose Job Execution with Web Terminal
Use a web terminal to inspect a running command step and change its live workspace while diagnosing a problem. This requires an active Enterprise subscription, available under Administration / Subscription Management.
Run Jobs Against Local Changes
Use the tod command-line tool to run CI/CD jobs against local changes without committing them to your branch first. The job executes on OneDev's configured executors, and tod streams the build log and final status back to your terminal.
Build Spec Reuse
Import a build specification from another project to reuse its jobs, services, step templates, and properties. Local objects override imported objects with the same name. With multiple imports, later imports override earlier ones.