About policies

CloudBees SDM is a preview, with early access for select preview members. Product features and documentation are frequently updated. If you find an issue or have a suggestion, please contact CloudBees Support. Learn more about the preview program.

Policies enable engineering managers and leaders to define rules related to the development process of a product or feature. Rules can enforce specific steps that drive best practices, compliance or governance requirements for the process, which help ensure higher quality, more stable software for the customer.

If conditions match a policy’s rule, that policy’s actions are applied. Most actions add a status label indicating that the labeled item needs attention. Let’s say you create a policy that filters for GitHub pull requests without a reviewer for more than 10 days. This policy’s action adds a red status label to any GitHub repository that matches the policy. The red status label indicates that it’s a serious error blocking work.

Only CloudBees SDM administrators can create policies.

As a CloudBees SDM user, you can see when policies that have been applied but can not create, modify, or delete policies. Policies are stored in the System of Record.

Sample policies

CloudBees SDM comes with sample policies that provide basic status labels to a product’s Jobs, Repositories, and Overview screens. These sample policies use data types associated with Jenkins, Jira, and GitHub to flag repositories, jobs, or builds that meet particular criteria like no reviewer assigned or merge conflict. One or more of these services need to be integrated with CloudBees SDM before the sample policies will work.

Status labels that you see on the Repositories screen, for example, are applied by policies.

Predefined status labels

Status labels provide a visual indicator of an item that needs attention. These labels range from severe, such as builds failing, to minor, such as ready to merge. Each label indicates that some action is required.

Status labels are color-coded according to the severity of the issue. These colors correspond to the status label sorter, the color-matched circles in the upper right of the screen. The colors are explained in tooltips visible when hovering over each of the circles:

  • Red: Needs immediate attention. Work is blocked.

  • Yellow: Needs attention soon. Work might be blocked.

  • Green: Requires action. Work is not blocked.

Label Label color Why it appears What it means

Build failing

Red

A test or build for the pull request is failing.

Notify an engineer to address the issues.

Reviewer needed

Red

A pull request needs to be reviewed.

Assign a reviewer.

Failure on master branch

Red

A test or build is failing on the master branch. This label applies only at the repository level and not to pull requests.

Notify an engineer to address the issues.

Merge conflict

Red

A pull request has a merge conflict and can not be merged.

Investigate the activity and notify the owner of the PR.

Open for more than 24 hours

Yellow

A pull request has been open for more than 24 hours.

Investigate the activity.

Open for more than 10 days

Yellow

A pull request has been open for more than 10 days.

Investigate the activity.

Stalled activity

Yellow

A pull request has not been updated or has not had activity for 24 hours.

Investigate the pull request.

Ready to merge

Green

A pull request is approved but has not been merged.

Merge the pull request.

Data types

You can use one of the data types present in CloudBees SDM and contained in the System of Record to query data for a report or a policy. The data type you select is based upon the data source you wish to use, such as Jenkins, Jira, GitHub, and others.

Each query can only return one data type and its associations, but it’s possible to query across many different types to help refine your selection.

Refer to the data types reference section for detailed information.

Refer to SDM query language for information about building queries.