Documentation Nexus IQ Server 1.25

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

17.3. Job Configuration

After a completed installation (see Section 17.1, “Installation”) and global configuration (see Section 17.2, “Global Configuration”) of IQ for Hudson/Jenkins, you are ready to configure an invocation as part of a specific job.

Depending on your job type it will be available as a pre and/or post-build step as well as an invocation as a main build step. A pre-build step or a main build step executed before your main build invocation step could be used to examine components existing in the workspace or being placed into the workspace by an earlier build step.

The typical invocation would be as main build step, after the package that should be examined has been created. An example configuration from Jenkins is displayed in Figure 17.3, “Build Scan Configuration for a Build Step”.

figs/web/ci-jenkins-build-scan.png

Figure 17.3. Build Scan Configuration for a Build Step


The configuration options for IQ for Hudson/Jenkins invocations mimic the parameters from the global configuration described in Section 17.2, “Global Configuration” and are appended to the global parameters. The configuration parameters are:

Optional Job Specific Authentication

While username and password can be configured globally, in some cases you may want a certain job to be associated with a user who has permissions to specific organization and/or applications. Job Specific Authentication allows you to configure a user for this job and use the associated permissions to select the application for the evaluation.

Username
The IQ Server username you wish to use for this job.
Password
The password for the username above.

Depending on what application is used, the policies associated to the application will be used for the analysis of this build job output. There are two options for choosing what IQ application to associate with the build:

Select an IQ Application
The IQ application dropdown will be populated with the names of applications based on the permissions for the configured user name and password.
Specify an IQ Application
If you want to use a build variable to provide the IQ Application ID, you can enter it in the field displayed after selecting this option. Click on the help icon to the right of the field for information on using build variables (e.g. ${THE_APPLICATION_ID}) to evaluate the application at build time.
Fail the build

Check this option if you want to fail the build when a policy evaluation can’t be performed. Once checked, if for any reason the evaluation is not generated, the build will be failed.

An example of this might be if the IQ Server is inaccessible. In this scenario, the build would fail. In the same example, but where the Fail the build option is left unchecked, the build would be marked unstable.

Stage

This corresponds to the stage you wish the policy evaluation of the application/project to be run against. Additionally, this will correspond to the stage location when viewing report information via the IQ Server (e.g. if you chose the Build stage, summary and dashboard violation results will be displayed accordingly).

[Note]

Depending on how your policies are configured, this may impact warning and fail actions.

Scan targets
The scan targets setting allows you to control which files should be examined with an Apache Ant styled pattern. The pattern is relative to the project workspace root directory and inherits the global configuration.
Module excludes
You can exclude modules from being scanned with module information files configured in this setting. The default value is inherited from the global configuration.
Advanced options
A number of additional parameters can be supplied to the plugin using this input field. Typically these parameters will be recommended to you by the Sonatype support team.