{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":32073,"path":"it-service-management/devops-change-velocity/configure-jenkins-plugin.md","title":"Configure Jenkins plugin","bundle":null,"doc_type":null,"release":"australia","body":"\n# Configure Jenkins plugin\n\nConfigure Jenkins to send real time notifications for your pipeline executions to DevOps Change Velocity.\n\n## Before you begin\n\nRole required: Jenkins admin\n\n## Procedure\n\n1.  Install the **ServiceNow DevOps** plugin from the Jenkins Marketplace by navigating to **Manage Jenkins &gt; System configuration &gt; Plugins** in your Jenkins instance.\n\n2.  Search for **ServiceNow DevOps Plugin** and select it, and then select **Install**.\n\n\n**Parent Topic:**[Jenkins integration with DevOps Change Velocity](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-change-velocity/jenkins-integration-dev-ops.md)\n\n**Related topics**  \n\n\n[Configure webhooks manually for Jenkins](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-change-velocity/configure-jenkins-plugin.md)\n\n## Configure webhooks manually for Jenkins\n\nConfigure webhooks in Jenkins to send sync notifications to the DevOps Change Velocity application.\n\n### Before you begin\n\nRole required: sn\\_devops.admin or sn\\_devops.tool\\_owner in DevOps Change Velocity, Jenkins admin\n\n### About this task\n\nYou can add a total of ten ServiceNow DevOps configurations. For example, you can configure Jenkins connections for your Development, Testing, Production instances, and so on.\n\nIf you are an upgrading customer, you must download and install the latest Jenkins plugin to enable multiple ServiceNow configurations. After installation, your existing configuration will be retained and made the default configuration.\n\nIn the ServiceNow DevOps Configuration section in Jenkins, the values in the **Name** field and the combination of the **Instance URL** and **Orchestration Tool ID** fields must be unique.\n\nIf you choose to automatically configure a tool from ServiceNow, then the existing set up for ServiceNow DevOps Configuration will be over-written in Jenkins.\n\nIf DevOps Config is installed, you will only be able to configure Jenkins manually.\n\n### Procedure\n\n1.  In DevOps Change Velocity, choose **Configure manually** when configuring the tool instance to send data.\n\n    \\[Omitted image \"jenkins-workspace-connect-8.png\"\\] Alt text: Configure webhooks automatically.\n\n2.  Select **Copy** in the appropriate field to copy the value to your clipboard.\n\n    The field label changes to **Copied**, but you can copy multiple times.\n\n    \\[Omitted image \"jenkins-workspace-connect-9.png\"\\] Alt text: Configure webhooks manually.\n\n3.  In Jenkins, navigate to **Manage Jenkins** &gt; **System configuration** &gt; **Manage Plugins** &gt; **Configure System**.\n\n4.  In the ServiceNow DevOps Configuration section, select **Add**.\n\n    **Note:** You can add multiple connections by selecting **Add** for each new configuration.\n\n5.  Configure the plugin by filling in the fields.\n\n    When enabled, Jenkins starts sending events to DevOps as inbound events.\n\n    **Note:** Values are case-sensitive.\n\n    \\[Omitted image \"jenkins-plugin.png\"\\] Alt text: Fields to be configured in Jenkins.\n\n<table id=\"table_b1g_c3x_gwb\"><thead><tr><th>\n\nField\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nActive\n\n</td><td>\n\nSelect this option to make the connection active. By default this option is selected when you select **Add** for a new connection.**Note:** All the connections that have Active enabled, will send webhook notifications for your pipeline execution,however for the change step only the connection specified will be considered.\n\n</td></tr><tr><td>\n\nDefault\n\n</td><td>\n\nSelect this option to make the connection the default one when the connection name is not passed in an existing step on a pipeline. **Note:** Not selecting this option when only one connection is available will result in error.\n\n</td></tr><tr><td>\n\nName\n\n</td><td>\n\nUnique name of the connection. **Note:** The name value is auto-generated when you auto configure a connection from ServiceNow.\n\n</td></tr><tr><td>\n\nInstance URL\n\n</td><td>\n\nEnter your ServiceNow instance URL you copied in step 2. For example, `https://<your-instance>.service-now.com`.\n\n</td></tr><tr><td>\n\nOrchestration Tool ID\n\n</td><td>\n\nThe sys\\_id of the orchestration tool you copied in step 2.\n\n Alternatively, you can copy this value from the webhook URL \\(*toolid* value\\), or obtain it directly using the `Copy sys_id` command on the Orchestration Tool record.\n\n **Note:** The combination of the Instance URL and Orchestration Tool ID values must be unique for each connection.\n\n</td></tr><tr><td>\n\nArtifact Tool ID\n\n</td><td>\n\nThe sys\\_id of the artifact tool.\n\n</td></tr><tr><td>\n\nCredentials\n\n</td><td>\n\nSelect the basic authentication credentials that you want to use for connecting to Jenkins.\n\n 1.  To add credentials, select **Add**.\n2.  In the **Username** field, enter your DevOps Integration User details. By default, it is devops.integration.user.\n3.  In the **Password** field, enter your DevOps Integration User password.\n\n\n</td></tr><tr><td>\n\nSecret Credentials\n\n</td><td>\n\nSelect the secret token that you copied in step 2. Alternatively, you can perform the following steps to obtain the secret token from the tool record.\n\n 1.  Copy the secret token for your Jenkins tool in DevOps Change.\n    -   Workspace: Navigate to the tool record, select **Configure** and copy the secret token.\n    -   Classic UI: Navigate to the tool record and select **Copy token**.\n2.  To add tokens, select **Add**.\n3.  From the **Kind** list, select **Secret text**.\n4.  In the **Secret** field, enter the secret token generated while creating the Jenkins tool connection in DevOps.\n5.  In the **ID** field, enter a name for the token.\n\n\n</td></tr><tr><td>\n\nLog Level\n\n</td><td>\n\nThe level of log messages you want to store in Jenkins logs/ ServiceNow log recorder.Select from one of the following options:\n\n-   inherit\n-   off\n-   severe\n-   warning\n-   info\n-   config\n-   fine\n-   finer\n-   finest\n-   all\n For more information on Log levels and log recorders, see [Jenkins log levels and Log Recorders](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/devops-change-velocity/devops-jenkins-log-recorders.md)\n\n</td></tr><tr><td>\n\nForce Tracking Check\n\n</td><td>\n\nSelect the check box to make a REST \\(POST\\) API call to Jenkins for each pipeline execution to determine whether the pipeline is tracked or not.\n\n Clear the check box to store details in the **snPipelineInfo.json** file and stop making API calls for every pipeline execution.\n\n **Note:** When a pipeline is tracked, all active Jenkins configurations will receive job notifications.\n\n</td></tr><tr><td>\n\nPull Request Pipeline Tracking Check\n\n</td><td>\n\nSelect the check box to enable tracking for pull request pipelines.\n\n **Note:** When a pipeline is tracked, all active Jenkins configurations will receive job notifications.\n\n</td></tr></tbody>\n</table>6.  Select **Test Connection**.\n\n    Verify that the connection successful message displays.\n\n    -   If you've added basic authentication credentials, on successful connection, you will see the message: `Connection using 'Credentials' is successful`.\n    -   If you've added the secret token, on successful connection, you will see the message: `Connection using 'Secret Credentials' is successful`.\n7.  Select **Apply** to apply the changes and select **Save**.\n\n\n"}}