Trigger a job or pipeline on an external CI/CD platform from a CloudBees workflow and surface the results in CloudBees Unify. For context on when to use this approach, refer to Understanding external CI/CD integrations. For input and output details for each supported platform, refer to External CI/CD action reference.
Trigger an external job
All external CI/CD actions follow the same pattern: provide the remote system URL and credentials as secrets, then specify the job or pipeline name.
The following example triggers a CloudBees CI job:
Replace the action URL, input names, and secret references with those for your platform. Refer to External CI/CD action reference for the action URL and required inputs for each supported platform.
Publish test results
To surface test results in the CloudBees Unify Test insights dashboard, add the test-type and test-result-location inputs to your step.
| Both inputs are required. If either is omitted, the workflow completes successfully but no test results are published. |
The test-result-location input accepts pattern matching, such as my-dir/*/my-file.
Pass parameters to an external job
Use the parameters input to pass additional parameters to the remote job as a JSON key/value string.
- name: Run a CloudBees CI job uses: https://github.com/cloudbees-io/cbci-run-job@v2 with: url: ${{ vars.CBCI_URL }} username: ${{ secrets.CBCI_USERNAME }} token: ${{ secrets.CBCI_TOKEN }} job-name: "CloudBees_CI_job_name" parameters: '{"BRANCH_NAME":"main","ENV_NAME":"stage"}'
Use output from an external job
CloudBees CI and Jenkins can return structured output back to the calling workflow.
Add an id to the step, declare the output on the job, then reference individual values in downstream steps using fromJSON().
| Output variable names differ by platform. Refer to External CI/CD action reference for the output name for each platform. |
The following example passes output from a CloudBees CI job to a downstream step and to a dependent job.
The Jenkinsfile below defines the outputs on the remote CloudBees CI job:
The following workflow triggers the job, exposes the output in a downstream step, and makes it available to a dependent job: