]> source.dussan.org Git - sonarqube.git/commitdiff
SONARCLOUD-108 Fix Bitbucket Cloud app links to SonarCloud create project page
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Mon, 6 Aug 2018 13:24:41 +0000 (15:24 +0200)
committerSonarTech <sonartech@sonarsource.com>
Fri, 10 Aug 2018 18:21:32 +0000 (20:21 +0200)
server/sonar-bitbucketcloud/src/main/ts/components/Config.tsx
server/sonar-bitbucketcloud/src/main/ts/components/RepoWidgetNotConfigured.tsx
server/sonar-bitbucketcloud/src/main/ts/components/__tests__/__snapshots__/Config-test.tsx.snap
server/sonar-bitbucketcloud/src/main/ts/components/__tests__/__snapshots__/RepoWidgetNotConfigured-test.tsx.snap
server/sonar-docs/src/pages/integrations/bitbucketcloud.md

index eac079cbdcd6b44ebd1eb82378730be553fe69b1..87415e966df1895b40b5fa1f47fc17484dd79d78 100644 (file)
@@ -186,8 +186,10 @@ export default class Config extends React.PureComponent<Props, State> {
     let descriptionComponent: React.ReactNode = (
       <>
         To display the quality of your repository, you have to{' '}
-        <a href={getBaseUrl() + '/projects/create'}>provision</a> a project on SonarCloud and
-        trigger an analysis.
+        <a href={getBaseUrl() + '/projects/create'} rel="noopener noreferrer" target="_blank">
+          provision
+        </a>{' '}
+        a project on SonarCloud and trigger an analysis.
       </>
     );
 
index 64648a8efca919f5a6a31790ab94f3613690ecc6..39daf261d2a1cf10bdb0aca7451aa389dd403cc5 100644 (file)
@@ -67,8 +67,11 @@ export default class RepoWidgetNotConfigured extends React.PureComponent<{}, Sta
       } else {
         msgComponent = (
           <>
-            You have to <a href={getBaseUrl() + '/projects/create'}>provision</a> a project in
-            SonarCloud for this repository.
+            You have to{' '}
+            <a href={getBaseUrl() + '/projects/create'} rel="noopener noreferrer" target="_blank">
+              provision
+            </a>{' '}
+            a project in SonarCloud for this repository.
           </>
         );
       }
index 032abbe04011a466d3f60e350b39190110b3983a..7952b0b5569d3fd6a9f698f172efc3c84456a6af 100644 (file)
@@ -258,10 +258,13 @@ exports[`should display correctly for auto binding 1`] = `
          
         <a
           href="/projects/create"
+          rel="noopener noreferrer"
+          target="_blank"
         >
           provision
         </a>
-         a project on SonarCloud and trigger an analysis.
+         
+        a project on SonarCloud and trigger an analysis.
       </React.Fragment>
     </p>
     <React.Fragment>
index 72d80fcae83d8f682000ecf8554332bf456d57bd..be6827b51b4c2778738961df88d177355dc1e944 100644 (file)
@@ -22,13 +22,17 @@ exports[`should display a link to SonarCloud for auto provisioning 1`] = `
     className="spacer-top"
   >
     <React.Fragment>
-      You have to 
+      You have to
+       
       <a
         href="/projects/create"
+        rel="noopener noreferrer"
+        target="_blank"
       >
         provision
       </a>
-       a project in SonarCloud for this repository.
+       
+      a project in SonarCloud for this repository.
     </React.Fragment>
   </div>
 </React.Fragment>
index 4fd2e77516609ed2ccf1c3b8f36467ee9d8a09f0..d547c0db84a0f23bb8dbee67b1daa32e2908d82a 100644 (file)
@@ -17,9 +17,9 @@ In Bitbucket Cloud, go to your team's "Settings > Find integrations" page, searc
 
 SonarCloud integrates with Bitbucket Pipelines to make it easier to trigger analyses. Follow the steps:
 
-1.  On SonarCloud, open and follow the "New Project" tutorial available from the `+` icon available at the top right part of the screen. You can copy-paste the command line displayed at the end.
+1.  On SonarCloud, once your project is created, follow the tutorial on the dashboard of the project. You can copy-paste the command line displayed at the end.
 
-2.  On Bitbucket Cloud, go to the "Settings > Pipelines > Environment variables" page of your team, and add a new SONAR_TOKEN variable that contains the value of the SonarCloud token (something like `9ad01c85336b265406fa6554a9a681a4b281135f`) which you created during the [tutorial](/#sonarcloud#/onboarding) (and which is available inside the command line that you copy-pasted). **Make sure that you click on the "Lock" icon to encrypt and hide this token.**
+2.  On Bitbucket Cloud, go to the "Settings > Pipelines > Environment variables" page of your team, and add a new SONAR_TOKEN variable that contains the value of the SonarCloud token (something like `9ad01c85336b265406fa6554a9a681a4b281135f`) which you created during the tutorial (and which is available inside the command line that you copy-pasted). **Make sure that you click on the "Lock" icon to encrypt and hide this token.**
 
 3.  Inside the `bitbucket-pipelines.yml` file of your repository, copy the command line provided by the tutorial and replace the actual token by its variable name. For example, for a Java Maven-based project, you should have something like:
 
@@ -30,7 +30,7 @@ script:
 
 When this change on `bitbucket-pipelines.yml` is committed and pushed, Pipelines should automatically run a new build and therefore trigger the analysis of the repository. Shortly after, your project will appear on SonarCloud in your organization.
 
-4.  Once you see your project in SonarCloud, go to the Bitbucket Cloud "Settings > SonarCloud" page of your repository and find it in the select box to link it.
+4.  Once you see your project in SonarCloud, go to the Bitbucket Cloud "Settings > SonarCloud" page. If the dropdown is empty, find your project in the select box to link it.
 
 From now on, everytime Pipelines triggers a build, SonarCloud will: