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.
Prepare
-
Install a tod version compatible with your OneDev server. Run
tod versionandtod build run --helpto check the installed command. Current tod versions support OneDev 15.1 and later. -
Configure the server URL and an access token with code write and job-run permission on the project:
tod config set -
Work in a Git clone whose remote points to that OneDev project. Ensure
.onedev-buildspec.ymlexists at the repository root and contains the job you want to run. Save your changes to disk.
Run the Job
Stage any new source files you want included. You do not need to stage edits to already tracked files:
git add path/to/new-file
tod build run "test" --local
Replace test with your job name. For a parameterized job, pass parameters as needed:
tod build run "test" --local --param platform=linux
The local snapshot includes staged changes and unstaged changes to tracked files. The root build specification is included even if it is new. Ordinary untracked files are excluded until staged, and ignored files remain excluded unless explicitly added to Git.
Tod creates a snapshot commit and pushes it to refs/onedev/tod so the server can check it out. It preserves your current branch, HEAD, staged changes, and working files; it does not add a normal commit to your branch. In this example, the job verified tracked edits and a staged new file, while confirming that an ignored local file was absent:

Use git status afterward to inspect your local changes. The build is also available in the project's Builds page with its snapshot commit and streamed log.
Because execution happens on the server, executor selection, job dependencies, caches, and secret authorization still apply. This does not run the job on your laptop. For faster feedback, use appropriate checkout depth and job caches.