Execute jobs with Edge Runners

2 minute readAutomation

Execute jobs on your edge runners by specifying runner labels in your workflow definition. Before you begin, ensure you have completed Get started with Edge Runners and have at least one registered runner available in your organization.

  1. Create a component in CloudBees Unify.

  2. Create a workflow.

    For each workflow you want to execute on-premises, use runs-on to specify the labels of your edge runner. Any runner available for the workflow (in the organization hierarchy) and matching the labels will execute the remote job. For example:

    apiVersion: automation.cloudbees.io/v1alpha1 kind: workflow name: My workflow on: push: branches: - '**' workflow_dispatch: jobs: build: runs-on: [label1] steps: - name: Say hello # note: uses is only supported when running in container based execution mode uses: docker://golang:1.20.3-alpine3.17 shell: sh run: | echo "hello world "

    All CloudBees Unify workflow features are supported in Edge runners, with the only exception being sidecar services.

  3. Trigger the workflow.

    When the workflow runs, an eligible edge runner picks up and executes the job. For a runner to be eligible, it must declare all the labels specified in the job. When more than one runner is configured and available for that workflow, any of the matching runners can execute the job.

    Anyone who can create and execute workflows in organizations where runners are available can run scripts on the runner. There is no sandboxing or containerization support at this time. You may choose to execute the runner in a container locally, if desired, for testing purposes. However, there is currently no published container image available.

Monitor the job execution in the CloudBees Unify interface and view the logs from your edge runner to verify that the job is running as expected. For more information on best practices for securing your edge runners, refer to Secure Edge Runners.