Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-13161

Auto-configuration of branches in Jenkins

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.3
    • Component/s: None
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      Branch analysis in Jenkins
      The Bitbucket, GitHub and Gitlab Branch Source Plugins are a popular way to trigger project analysis from Jenkins.

      Jenkins will set up the job and perform SCM checkout based on values exposed by those plugins through an API.

      It also sets environment variables that we could use to make configuration of SonarQube analysis simpler.

      Detect Jenkins
      First, to detect that the scanner is running on Jenkins, we could verify that JENKINS_URL and JENKINS_HOME are set.

      Detect branches

      BRANCH_NAME can be used to get the branch name.

        Attachments

          Activity

            People

            Assignee:
            duarte.meneses Duarte Meneses
            Reporter:
            duarte.meneses Duarte Meneses
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: