Uploaded image for project: 'Minimal Marketable Features'
  1. Minimal Marketable Features
  2. MMF-1781

Onboarding tutorial for BitBucketCloud users who use BitBucket pipelines

    Details

      Description

      Why

      We want to ease the setup of quality analysis for BitbucketCloud users who use Bitbucket pipelines. 

      Currently information to set up quality is dispersed among tutorial, documentation in our doc, and in the doc associated to the step to integrate to Bitbucket pipeline and we want to make it straightforward for the user.

      [_Also see why of epic parent_]

      Hypothesis Statement

      We believe that guiding Bitbucket Cloud user to integrate quality in their Bitbucket pipelines will result in decreasing the time to setup quality in Bitbucket pipelines of users and increasing the adoption of SonarCloud for Bitbucket users.

      We will know this to be true when we see

      Define metrics

      • an increase in number of users that set up their BBC project with Bitbucket pipeline
      • an increase in the activity of the projects bound to BBC

      Additional metrics:

      • number of users initiating the project with BB pipelines vs number of users initiating the project with the "manual mode"

      What

      For this first minimal step, we will provide a guided tutorial to help users set up their quality with Bitbucket pipelines. 

      The user should still have the possibility to manually set up their CI, although we should keep in mind that we don't want to promote manual setup.

      Use cases

      • Bitbucket Pipelines
        • Does not exist -> yml file and pipeline does not exist 
        • Already exists -> yml file and pipeline exist, but not the quality step
      • Building tools:
        • Maven => use mvn-scanner in scan pipe, quality check pipe cannot be used
        • Gradle => use SonarScanner for gradle, quality check pipe cannot be used
        • MSBuild => use SonarScanner for MSBuild, quality check pipe cannot be used (=> Azure pipelines?)
        • Other (for JS, TS, Go, Python, PHP, ...)=> scan pipe, quality check can be used, example of yml file : https://bitbucket.org/globalbbcteam/angularexample/src/master/bitbucket-pipelines.yml
      • Pipes:
        • scan
        • quality check pipe supports only projects using the scan pipe (so not maven, not gradle)

      To check:

      • Dev workflow (to remember):
        • analysing branches
        • analysing PR
        • default branch
      • Visibility of projects
        • Public projects
        • Private project 

       

      Detailed use case :

      • As a Bitbucket user  :
        • I click on analyze a new project
        • I can choose to analyze with Bitbucket pipelines, that I see first
        • If I don't want to analyse with Bitbucket pipelines, it means that I want to analyze with an external CI or launch manually the analysis, and I'm guided to set up manually the analysis of my project.

       

      • As BBC user who wants to analyse a BBC repo with Bitbucket pipelines, and I don't have a bitbucket-pipelines.yml file already
        •  I choose to follow the tutorial to analyse with Bitbucket Pipelines
        • I activate pipelines in BBC settings
        • I put the SONAR_TOKEN in the settings of the account or the repo in BBC
        • I create the bitbucket-pipelines.yml in my repo (preferably) directly on BBC and copy the step to launch analysis (step quality scan)
          • The content of the file is different whether I'm using maven, gradle (launch the associated scanner) or not (use the pipe scan)
        • I commit and push the file on BBC
        • I check that the pipelines is launched on BBC
        • When results are OK, I can see the results of the analysis on SC :
          • Of the master if I configured the master pipeline
          • Of the PR if I configured the PR pipeline
          • Of the branch if I configured the branch pipeline

       

      • As a BBC user who wants to analyse a BBC repo with Bitbucket pipeline, and I already have a bitbucket-pipelines.yml 
        • I update my yml file to integrate the quality check step in my pipeline
        • TBC

       

      Notes :

      • Don't forget to update the existing documentation (SC + SC pipe) + update existing projects

       

      Current design

      https://invis.io/AZTE614DMGE#/378322869_FirstAnalysisTutorial_1-BitBucket--tutorial-Choice

       

      Current sources of information to set up a quality in BB pipelines :

      How

       

        Attachments

          Activity

            People

            • Assignee:
              aurelie.boiteux Aurélie Boiteux
              Reporter:
              aurelie.boiteux Aurélie Boiteux
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: