Documentation Nexus IQ Server 1.24

Our documentation site has moved. For the most current version, please see http://help.sonatype.com

22.5. Using the Nexus IQ CLI with a CI Server

We won’t be covering a specific CI here, but in general, all you need to identify (in your CI), is the location for adding a build step that includes processing a simple shell script during the building of your application.

Once you are there, make sure your script calls the Nexus IQ CLI using the following syntax:

java -jar [ScannerJar] -i [AppID] -e [IgnoreSystemErrors] -w [FailOnPolicyWarning] -s [ServerURL] [Target]

Each of the areas in the syntax above have been described in the previous section Evaluating an Application.

Given a typical setup, your syntax, including all available options will likely look similar to this:

java -jar /scanner/nexus-iq-cli-1.24.0.jar -i tester123 -s http://localhost:8070 ./target/sample-app.war

Now, when your application is built, the build step you have added will call the Nexus IQ CLI, evaluate your application, and upload results of the evaluation to the IQ Server. By default this will be placed below the build column in the Reports and Application area on the IQ Server, for your application.

[Note]

We advise you to use a separate application identifier for each of your unique applications. Using the same application identifier will result in report results being overwritten each time an application is built. While this is always the case, matching the latest evaluation to the right application can prove difficult.