Advanced Settings for Jenkins

version 2.3 or later

1. Restrict the number of concurrent executions

Sider Scan detects duplicates in the source code and uses a proprietary algorithm to detect omissions in modifications. We keep working to reduce the processing time of the analysis, however, especially the first analysis of a repository, which can take more than an hour depending on the size of the repository because all the source code is analyzed.

For Jenkins, the build process can be executed on a separate node from the server running Jenkins (master node). In addition, the number of simultaneous runs can be limited to one to reduce the impact on the build process of other jobs.

1-1. Creating a new node

From your Dashboard, click “Manage Jenkins” in the side menu, then click “Manage Nodes and Clouds” to enter the Node configuration view.

Click “New Node” in the side menu to create a node dedicated for Sider Scan.

Setup the “Number of executors” and “Usage” as shown below.

  • Number of executors: 1
  • Usage: Only build jobs with label expressions matching this node

You can set the other items depends on your environment.

1-2. Project settings

Open the project where you want to install Sider Scan, and click “Configure” in the side menu. In the configuration view, specify the nodes to run Sider Scan as follows.

  • Enable “Restrict where this project can be run”
  • Enter the node name or node label that you created at section 1-1 into the “Label Expression” text box.

You can now restrict the number of Sider Scans running across Jenkins to only one. If multiple builds that use Sider Scan at the same time, the build executed later will be waited for the completion the other build. If you have enough computing recourses, you can increase ” Number of executors” in the node settings to shorten each build time.

Reference

For more details about Jenkins Node, please visit the pages below.

  • https://www.jenkins.io/doc/book/managing/nodes/#creating-agents
  • https://www.jenkins.io/doc/book/using/using-agents/