Sonatype CLM for Nexus

Chapter 10. Policy Actions

While not a requirement for using CLM with Nexus staging, CLM does have the ability to Fail or Warn on staging closure. This is managed by setting the Stage Release and Release actions for each policy. These policy actions can be configured to warn, fail, or do nothing (default). The figure below provides an example policy that would warn for a staging deployment and fail a release.

figs/web/clm-policy-staging.png

Figure 10.1. Staging and Release Configuration for a Policy in the CLM Server


Configuration of Policy Actions is managed via the Sonatype CLM Server. While we’ll cover the basic settings below, for instruction on setting these actions, please review the Policy Management Guide, specifically the section on managing policy actions.

The configuration of the Stage Release action of a policy in the CLM Server is used for closing the staging repository. Based on the action chosen, the staging repository will respond as follows:

  • If the policy action is set to Fail, when a policy is violated, the staging repository closing fails.
  • If the policy action is set to Warn, when a policy is violated, the staging repository closes successfully, but a warning will be produced.
  • If the policy action is set to Do Nothing, the staging repository closes successfully regardless of any policy violations.