1. Go to the Jenkins> Manage Jenkins> System log. (Steps to add logging support)
  2. Add new log recorder” for Jenkins Plugin.
  3. The Logger should be com.acellere.plugins and the log level should be mentioned as “All”.
  4. You should only view Embold Jenkins Plugin related logs.

Post steps configuration of Jenkins Plugin

  1. Go to the “Configure” page.
  2. Go to Post Steps and from Add post-build step dropdown list, select “
    Embold Jenkins Plugin
    ” option.
  3. Embold Configuration Page is displayed to the user. Specify valid Embold URL (http://IP address of Embold Server:3000).
  4. Click on the Add button for adding Embold Credentials.
  5. In the Jenkins Credentials Provider pop-up, from Kind dropdown, choose “GAMMA Credentials”.
  6. Specify Name and Description which could be any value (it can be your Repo name or job name).
  7. Generate an Embold Access Token from the deployed Embold application website and add the Access Token under the Token section. Refer this article for generating Embold Access Token.
  8. After adding the Jenkins Credentials, select the added credential from the dropdown of Embold Credentials.
  9. Fill up the details in Subsystems section:
    1. Subsystem UID: Repository UID. Can be obtained from Repository information in corresponding project on Embold. Incorrect UID will throw an error.
    2. Snapshot Label (Optional): Provide the snapshot level value for Embold analysis. You can also provide environment variable. For example: BUILD_NUMBER

Configure Jenkins Plugin as Post-build Action

  1. Go to Post build Actions tab and add Embold Jenkins Plugin.
  2. You should see the Embold Jenkins configuration page.
  3. Embold Configuration Page is displayed to the user. Specify valid Embold URL (http://IP address of Embold Server:3000).
  4. Click on the Add button for adding Embold Credentials.
  5. In the Jenkins Credentials Provider pop-up, from Kind dropdown, choose “GAMMA Credentials”.
  6. Specify Name and Description which could be any value (it can be your Repo name or job name).
  7. Generate an Embold Access Token from the deployed Embold application website and add the Access Token under the Token section. Refer this article for generating Embold Access Token.
  8. After adding the Jenkins Credentials, select the added credential from the dropdown of Embold Credentials.
  9. Fill up the details in Subsystems section:
    1. Subsystem UID: Repository UID. Can be obtained from Repository information in corresponding project on Embold. Incorrect UID will throw an error.
    2. Snapshot Label (Optional): Provide the snapshot level value for Embold analysis. You can also provide environment variable. For example:  BUILD_NUMBER

Configure Analysis Configuration file for Embold Jenkins Pugin for both modes

  • Use Analysis configuration from Embold:
  1. Embold analysis configuration file with name ‘.gammascan.json’ containing subsystem configuration will be picked at runtime from. Embold server associated with the Subsystem ID specified.
  2. With this option, the configuration file will take the default path for Junit and Clover.
  • Use Analysis configuration file from Source code base directory:
  1. Embold configuration file with name ‘.gammascan.json’ containing subsystem configuration should be present in the base(root) directory.
    1. Windows: C:/Program Files (x86)/Jenkins/workspace/{Project_Name}/.gammascan.json
    2. Linux: /var/lib/Jenkins/workspaces/{Project_Name}/.gammascan.json
  • Use Analysis configuration from Jenkins:
  1. Login to Embold. Create a project. Link the repository you want to scan.
  2. On your remote Embold instance, navigate to the repository you want to scan. Click on “…”. Download configuration json from Embold UI.
  3. Update the following fields in json.
    1. Replace baseDir value with $WORKSPACE OR %WORKSPACE%
      Note: WORKSPACE = Jenkins workspace
    2. Give custom directory path for Data directory
      Note: Make sure Jenkins user has Write permission for dataDir.
  4. Give the analysis configuration JSON  in Jenkins UI. Click on the “Apply” button. Check if any errors are displayed in any configuration field. Click on the “Save” button.

For more information to understand repository-configuration.json, refer to this article.

Steps for Master Slave:

  1. Go to Jenkins -> Manage Jenkins -> Manage Nodes (only required for master – slave configuration)
  2. Open the particular Slave Node (only required for master – slave configuration).
  3. Go to Configuration.
  4. Add the new environment variables CORONA_HOMECORONA_LOG and EMBOLD_SCANNER_HOME.

Steps for master only

  1. Go to Jenkins -> Manage Jenkins -> Configure System page and add the following 3 environment variables in “Global properties” section (In a case of master slave add these variables into slave configuration)
  2. Add the environment variables CORONA_HOMECORONA_LOG and EMBOLD_SCANNER_HOME.
    1. CORONA_HOME : Specify the location where Embold Analyzer will be downloaded (e.g /opt/gamma/corona).
    2. CORONA_LOG : Specify the location where logs for Embold Analysis will be generated. Note: The directory should have write permissions.
    3. EMBOLD_SCANNER_HOME: Specify the path till embold-scanner.