Using Staging to Control Releases
With Staging, you can combine the release process controls in Nexus Repository Manager with the component intelligence from IQ Server to test a release automatically before its deployed.
To use IQ Server with Nexus Repository Manager 2.x, you must first create the following items:
In IQ Server
- An Organization
- An Application
- A Policy
In Nexus Repository Manager
- A Staging Profile
Before using IQ Server for staging you should be familiar with the general setup and usage patterns of the Nexus Repository Manager Staging Suite documented in the chapter on staging, located in the Nexus Repository Manager book. There, you will be guided through the process to get Nexus Repository Manager prepared to handle your staging needs.
Staging Profile Configuration
To utilize IQ Server evaluation and policy features as part of your build promotion you will need to select an IQ Server Application as part of the staging profile configuration. This is done via Nexus Repository Manager. An example is provided below.
Policy Actions for Staging
While not a requirement for using IQ Server with Nexus Repository Manager staging, IQ Server 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 no action (default). The figure below provides an example policy that would warn for a staging deployment and fail a release.
The configuration of the Stage Release action is used for closing the staging repository. Based on the action chosen, the staging repository responds to policy violations as follows:
- If the policy action is set to Fail, closing the staging repository fails.
- If the policy action is set to Warn, the staging repository closes successfully, but a warning is produced.
- If the policy action is set to No Action, the staging repository closes successfully regardless of any policy violations.
For more information on setting these actions see the Actions section in the Basic Policy Management chapter.
Policy Actions for Release Repositories
Nexus Repository Manager also has actions specific to the Release feature, and these can be configured to fail, warn or do nothing and are used for releasing or promoting the staging repository.
Once the staging profile is configured with the IQ Server application ID, any deployment triggers an evaluation with IQ Server. The results are visible as Activity for the staging repository as shown in the figure below. Any rule failures are provided with further information in the detail panel. The View Full Report button links back to the detailed Application Composition Report.