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, complete Get started with Edge Runners and ensure that your organization has at least two registered runners.

  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. 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 review the logs on your edge runner to verify that the job is running as expected. For more information about best practices for securing your edge runners, refer to Edge Runners security best practices.

CloudBees Unify recommends registering at least two groups of runners for workflow job execution; one for operations with private tools like SCM, and one for user defined workflow execution. Integration with GitHub enterprise requires at least two runner groups.