# Installation and Configuration - Sonatype Platform Plugin for Jenkins

## Installation

**Download latest version:**

### Install through the Jenkins UI  
1. Download the most recent version of the plugin.  
2. Sign in to Jenkins as an administrator.  
3. Navigate to the Manage Jenkins > Plugins page.  
4. Click on the Advanced tab.  
5. Choose the `.hpi` file you previously downloaded.  
6. Optionally you may enter the URL to the archive file under the Deploy Plugin section.  
7. Deploy the plugin.

### Install through the Jenkins Plugin Manager  
01. Sign in to Jenkins as an administrator.  
02. Navigate to **Manage Jenkins**.  
03. In the System Configuration section, click on **Plugins**.  
04. In available plugins, search and install the **UpdateSites Manager** plugin.  
05. Once installed, navigate to **Manage Jenkins**.  
06. In the Uncategorized section, click on **Manage UpdateSites**.  
07. Click on **Add** → **Update Site**, and enter the required information:
   1. ID: sonatype-update-site.  
   
      **Note**  
      'sonatype-update-site' must be used as stated. This ID is essential for system functionality and must not be altered or renamed.
   2. URL: `https://download.sonatype.com/integrations/jenkins-uc/update-center.json`
   3. Mark the checkbox "Need CA Certificate" and paste the following certificate:
       
       ```  
       -----BEGIN CERTIFICATE-----  
       MIIDHzCCAgegAwIBAgIJAP+lqAK85t4HMA0GCSqGSIb3DQEBCwUAMCYxCzAJBgNVBAYTAlVTMRcwFQYDVQQKDA5Tb25hdHlwZSwgSW5jLjAeFw0yNDA0MTYyMDI3MzNaFw0yNzA0MTYyMDI3MzNaMCYxCzAJBgNVBAYTAlVTMRcwFQYDVQQKDA5Tb25hdHlwZSwgSW5jLjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAOSSYo277GaxCRlk9/waQ+ytNU/suCqb8SlGeAWHpleZFwvFVxxG0MU1nEI7tgKCXoyXMdbM/bXFgTzjthAOcgNQaAFDY4aUO6DPjPxMv3FTHn4FqdCfL+zEBSzmMD9R3wwblRjcnhc0c5pq+2+jopu0no0nmvEo/KczPnDfmCS90v87ACkNMcVEaIe+AYDgBGMLcY3QeouEsLnKE6FNnovzyW8h8kBRHWiolgDlA6J0KRpqOKfpdtYrA22YzhsSw7WX4Tj2rZDhHmlZ6tT3zkXHM5evXR7H9aMalF+LVhg2ShUhCIfxVpKgvLd80N39+iBOvT02/7DsB2WaYvr6TxECAwEAAaNQME4wHQYDVR0OBBYEFIzUBWpQAwcpuPr94D7k9SMTGEV2MB8GA1UdIwQYMBaAFIzUBWpQAwcpuPr94D7k9SMTGEV2MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAFkrkGZ+PoZ5JGM0rin7pCk/1e2dCeeh3/uMaQQ0QYyC4jMbsYfid/V8io2AQLujOUt9TLhNvRDIaFanUBfBdw9deHTrJf4Zm45FQGbytDOgOcF4hZ58yBjJv+Fs9ARFmF3rkWjWDcnIE9eNeXv82UD+lDyTEVH88Sb6qddkOHnAMT7dwCVDpxycWYWpPmwPM7Yf6a+shshPJqveD65RyJbolk4u49owJ3hYpLwmPvDfN9sxaqRVrdKg3RnYWf+faU1bMGXQEj/0tIipHvYuDzOCTGC587zByu589SHYjEPg2i7ud1EYXkeb7nEjfsYUzum3jGx7u1MDQ5RaxPyNxyA=  
       -----END CERTIFICATE-----  
       ```  
   4. Click **Apply** and **Save**.  
08. Navigate to **Manage Jenkins** → Plugins page.  
09. In the Plugin Manager window, select the **Available plugins** tab and enter "Nexus Platform Plugin" in the search box.
   
   **Note**  
   If the plugin does not appear after adding the new site, try clicking the refresh button at the top right corner.
10. Mark the Install checkbox to select the Nexus Platform Plugin and click the **Install** button at the top right corner.
    Success messages will appear as the plugin and its extensions are installed.

### Install Using Alternative Methods  
Sonatype Platform Plugin for Jenkins can be installed using the Jenkins CLI.

## Configuration  
Jenkins can be configured to connect with one or more instances of IQ Server to use when evaluating your application builds. The first instance in the list is used by default.

The configured user for IQ Server must have the Evaluate Application permission. We recommend creating a Jenkins service account and using tokens to reduce the risk of exposing credentials.

1. Sign in to Jenkins as an administrator.  
2. Navigate to the Manage Jenkins > System.  
3. In the Sonatype Nexus section, select Nexus IQ Server from the _Add Nexus IQ Server_ drop-down menu and enter the following information:
   
   1. Display Name: The name used to select an IQ Server instance.  
   2. Server ID: ID to specify an IQ Server instance in pipeline builds.  
   3. Server URL: The location of the IQ Server.  
   4. Credentials:  
      1. Click **Add** and select **Jenkins**.  
      2. On the modal, enter the IQ Server username and password. Click **Add**.
         
         **Note**  
         You can [learn more about user roles](https://help.sonatype.com/en/role-management.html "Role Management") in the Sonatype Lifecycle documentation.
      3. Select the credentials from the drop-down list.

5. Click the **Test Connection** button. If the connection is successfully established, you'll see a confirmation message.

4. The IQ report summary is embedded in Jenkins build reports. Optionally, select the 'Hide embedded reports in Jenkins' checkbox to only link to the report.
5. Click the **Save** button.
