From: Grégoire Aubert
Date: Mon, 6 Aug 2018 13:24:41 +0000 (+0200)
Subject: SONARCLOUD-108 Fix Bitbucket Cloud app links to SonarCloud create project page
X-Git-Tag: 7.5~608
X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7884f4e43e0264ec2c4fb920b02647957401a8bd;p=sonarqube.git
SONARCLOUD-108 Fix Bitbucket Cloud app links to SonarCloud create project page
---
diff --git a/server/sonar-bitbucketcloud/src/main/ts/components/Config.tsx b/server/sonar-bitbucketcloud/src/main/ts/components/Config.tsx
index eac079cbdcd..87415e966df 100644
--- a/server/sonar-bitbucketcloud/src/main/ts/components/Config.tsx
+++ b/server/sonar-bitbucketcloud/src/main/ts/components/Config.tsx
@@ -186,8 +186,10 @@ export default class Config extends React.PureComponent {
let descriptionComponent: React.ReactNode = (
<>
To display the quality of your repository, you have to{' '}
- provision a project on SonarCloud and
- trigger an analysis.
+
+ provision
+ {' '}
+ a project on SonarCloud and trigger an analysis.
>
);
diff --git a/server/sonar-bitbucketcloud/src/main/ts/components/RepoWidgetNotConfigured.tsx b/server/sonar-bitbucketcloud/src/main/ts/components/RepoWidgetNotConfigured.tsx
index 64648a8efca..39daf261d2a 100644
--- a/server/sonar-bitbucketcloud/src/main/ts/components/RepoWidgetNotConfigured.tsx
+++ b/server/sonar-bitbucketcloud/src/main/ts/components/RepoWidgetNotConfigured.tsx
@@ -67,8 +67,11 @@ export default class RepoWidgetNotConfigured extends React.PureComponent<{}, Sta
} else {
msgComponent = (
<>
- You have to provision a project in
- SonarCloud for this repository.
+ You have to{' '}
+
+ provision
+ {' '}
+ a project in SonarCloud for this repository.
>
);
}
diff --git a/server/sonar-bitbucketcloud/src/main/ts/components/__tests__/__snapshots__/Config-test.tsx.snap b/server/sonar-bitbucketcloud/src/main/ts/components/__tests__/__snapshots__/Config-test.tsx.snap
index 032abbe0401..7952b0b5569 100644
--- a/server/sonar-bitbucketcloud/src/main/ts/components/__tests__/__snapshots__/Config-test.tsx.snap
+++ b/server/sonar-bitbucketcloud/src/main/ts/components/__tests__/__snapshots__/Config-test.tsx.snap
@@ -258,10 +258,13 @@ exports[`should display correctly for auto binding 1`] = `
provision
- a project on SonarCloud and trigger an analysis.
+
+ a project on SonarCloud and trigger an analysis.
diff --git a/server/sonar-bitbucketcloud/src/main/ts/components/__tests__/__snapshots__/RepoWidgetNotConfigured-test.tsx.snap b/server/sonar-bitbucketcloud/src/main/ts/components/__tests__/__snapshots__/RepoWidgetNotConfigured-test.tsx.snap
index 72d80fcae83..be6827b51b4 100644
--- a/server/sonar-bitbucketcloud/src/main/ts/components/__tests__/__snapshots__/RepoWidgetNotConfigured-test.tsx.snap
+++ b/server/sonar-bitbucketcloud/src/main/ts/components/__tests__/__snapshots__/RepoWidgetNotConfigured-test.tsx.snap
@@ -22,13 +22,17 @@ exports[`should display a link to SonarCloud for auto provisioning 1`] = `
className="spacer-top"
>
- You have to
+ You have to
+
provision
- a project in SonarCloud for this repository.
+
+ a project in SonarCloud for this repository.
diff --git a/server/sonar-docs/src/pages/integrations/bitbucketcloud.md b/server/sonar-docs/src/pages/integrations/bitbucketcloud.md
index 4fd2e775166..d547c0db84a 100644
--- a/server/sonar-docs/src/pages/integrations/bitbucketcloud.md
+++ b/server/sonar-docs/src/pages/integrations/bitbucketcloud.md
@@ -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: