Manage Release risk profiles in YAML
Release calculates a risk level for each release based on different factors such as flags, failed or failing states, or due dates. While the Release GUI enables you to manage risk profile setting and thresholds, you can also choose to manage your risk profiles for your releases using YAML specifications.
Before you begin, review how risk awareness works in Release and how to configure the feature in the Release GUI:
To see what a risk profile looks like when expressed in YAML, use the
xl generate command to export the default risk profile.
- From the XL CLI, run the following command to create a YAML file named
xl generate xl-release -p "Default risk profile" -f DefaultRiskProfile.yaml
DefaultRiskProfile.yamland inspect the contents.
--- apiVersion: xl-release/v1 kind: Templates spec: - name: Default risk profile type: xlrelease.RiskProfile defaultProfile: true riskProfileAssessors: xlrelease.TaskWithFourFiveOrSixFlagsAtRiskRiskAssessor: "75" xlrelease.MoreThanOneTaskOverDueRiskAssessor: "35" xlrelease.TaskWithOneFlagNeedsAttentionRiskAssessor: "10" xlrelease.TaskRetriesRiskAssessor2Retries: "60" xlrelease.TaskWithMoreThanSixFlagsNeedsAttentionRiskAssessor: "40" xlrelease.ReleaseFlaggedAtRiskAssessor: "80" xlrelease.ReleaseStatusFailingRiskAssessor: "70" xlrelease.OneTaskOverDueRiskAssessor: "25" xlrelease.TaskWithTwoOrThreeFlagsAtRiskRiskAssessor: "70" xlrelease.TaskWithOneFlagAtRiskRiskAssessor: "65" xlrelease.TaskRetriesRiskAssessor5Retries: "90" xlrelease.TaskWithFourFiveOrSixFlagsNeedsAttentionRiskAssessor: "30" xlrelease.TaskWithMoreThanSixFlagsAtRiskRiskAssessor: "80" xlrelease.ReleaseStatusFailedRiskAssessor: "90" xlrelease.ReleaseFlaggedAttentionNeededRiskAssessor: "30" xlrelease.TaskRetriesRiskAssessor: "50" xlrelease.TaskRetriesRiskAssessor4Retries: "80" xlrelease.TaskRetriesRiskAssessorMoreThan5Retries: "100" xlrelease.ReleaseDueDateRiskAssessor: "30" xlrelease.TaskWithTwoOrThreeFlagsNeedsAttentionRiskAssessor: "20" xlrelease.TaskRetriesRiskAssessor3Retries: "70"
You can create a new risk profile from the GUI and generate a new YAML file, or by modifying the YAML file you generated from the Default risk profile.
- See Configure risk profile settings for how to create a new risk profile, modify the threshold values and save it using a unique name (for example
- From the XL CLI, run the following command to generate a YAML file named
xl generate xl-release -p "MyRiskProfile" -f MyRiskProfile.yaml
DefaultRiskProfile.yamlthat you generated earlier.
- Modify the threshold values in the
- Save the YAML file with a unique name (for example,
You can now include the risk profile specification YAML when creating Release templates using the XL CLI.