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.
Try the Example
Save the following as .onedev-buildspec.yml. Build publishes app.txt containing its build number. Deploy depends on Build, retrieves that artifact, and prints its contents. The example does not deploy to an external system.
version: 53
jobs:
- name: Build
steps:
- !CommandStep
name: Build application
runInContainer: true
image: alpine:3.20
interpreter: !PosixInterpreter
shell: sh
commands: echo @build_number@ > app.txt
useTTY: false
runAs: '0:0'
condition: SUCCESSFUL
- !PublishArtifactStep
name: Publish application
artifacts: app.txt
condition: SUCCESSFUL
retryCondition: never
maxRetries: 3
retryDelay: 30
timeout: 3600
- name: Deploy
steps:
- !CommandStep
name: Verify promoted artifact
runInContainer: true
image: alpine:3.20
interpreter: !PosixInterpreter
shell: sh
commands: cat app.txt
useTTY: false
runAs: '0:0'
condition: SUCCESSFUL
jobDependencies:
- jobName: Build
requireSuccessful: true
artifacts: '**'
retryCondition: never
maxRetries: 3
retryDelay: 30
timeout: 3600
-
Commit the specification and run Build from its play button in the build specification's Jobs tab.
-
Wait for success and inspect
app.txtin the build's Artifacts tab. -
Open the promotion action beside the build status. Its menu lists downstream jobs defined by job dependencies. Click the play button beside Deploy.

-
Open the downstream build's log. It should print the promoted Build job's number, confirming which artifact it consumed. Use the Pipeline tab or Depends on link to inspect the dependency.
Running a Job Directly
You can also run Deploy using its play button in the build specification:

A direct run does not necessarily create a new pipeline or rerun the upstream job. For this example, running Deploy again on the same commit reuses its existing build record and dependency on the successful Build job. Running it on a new commit creates builds for that commit, including the required upstream job.
Use promotion when starting from a specific build you have inspected, and verify the dependency and artifact before using a downstream job for a real deployment.