]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-14494 Adding the .NET Core tutorial in manual
authorMathieu Suen <mathieu.suen@sonarsource.com>
Thu, 25 Feb 2021 14:57:06 +0000 (15:57 +0100)
committersonartech <sonartech@sonarsource.com>
Wed, 3 Mar 2021 20:12:52 +0000 (20:12 +0000)
13 files changed:
server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNet.tsx
server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetCore.tsx [new file with mode: 0644]
server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetExecute.tsx [new file with mode: 0644]
server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetFramework.tsx [new file with mode: 0644]
server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNet-test.tsx
server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNetExecute-test.tsx [new file with mode: 0644]
server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNetFramework-test.tsx [new file with mode: 0644]
server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotnetCore-test.tsx [new file with mode: 0644]
server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNet-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNetExecute-test.tsx.snap [new file with mode: 0644]
server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNetFramework-test.tsx.snap [new file with mode: 0644]
server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotnetCore-test.tsx.snap [new file with mode: 0644]
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 0919885f23f4542ba8ba49cf1f0f240c05ba70bc..03956c08f93cfa317cb4e833bd2570d53a652a12 100644 (file)
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router';
-import { translate } from 'sonar-ui-common/helpers/l10n';
-import CodeSnippet from '../../../common/CodeSnippet';
-import InstanceMessage from '../../../common/InstanceMessage';
+import RenderOptions from '../../components/RenderOptions';
+import DotNetCore from './DotNetCore';
+import DotNetFramework from './DotNetFramework';
 
 export interface DotNetProps {
   host: string;
@@ -30,63 +28,26 @@ export interface DotNetProps {
   token: string;
 }
 
-export default function DotNet(props: DotNetProps) {
-  const { host, projectKey, token } = props;
-
-  const command1 = [
-    'SonarScanner.MSBuild.exe begin',
-    `/k:"${projectKey}"`,
-    `/d:sonar.host.url="${host}"`,
-    `/d:sonar.login="${token}"`
-  ];
-
-  const command2 = 'MsBuild.exe /t:Rebuild';
+enum Variant {
+  DotNetCoreVariant = 'dotnet_core',
+  DotNetFrameworkVariant = 'dotnet_framework'
+}
 
-  const command3 = ['SonarScanner.MSBuild.exe end', `/d:sonar.login="${token}"`];
+export default function DotNet(props: DotNetProps) {
+  const [variant, setVariant] = React.useState<Variant>(Variant.DotNetCoreVariant);
+  const DotNetTuto = variant === 'dotnet_core' ? DotNetCore : DotNetFramework;
 
   return (
-    <div>
-      <div>
-        <h4 className="spacer-bottom">{translate('onboarding.analysis.msbuild.header')}</h4>
-        <p className="spacer-bottom markdown">
-          <FormattedMessage
-            defaultMessage={translate('onboarding.analysis.msbuild.text')}
-            id="onboarding.analysis.msbuild.text"
-            values={{ code: <code>%PATH%</code> }}
-          />
-        </p>
-        <p>
-          <Link
-            className="button"
-            to="/documentation/analysis/scan/sonarscanner-for-msbuild/"
-            target="_blank">
-            {translate('download_verb')}
-          </Link>
-        </p>
-      </div>
-
-      <h4 className="huge-spacer-top spacer-bottom">
-        {translate('onboarding.analysis.msbuild.execute')}
-      </h4>
-      <InstanceMessage message={translate('onboarding.analysis.msbuild.execute.text')}>
-        {transformedMessage => <p className="spacer-bottom markdown">{transformedMessage}</p>}
-      </InstanceMessage>
-      <CodeSnippet isOneLine={true} snippet={command1} />
-      <CodeSnippet isOneLine={true} snippet={command2} />
-      <CodeSnippet isOneLine={true} snippet={command3} />
-      <p className="big-spacer-top markdown">
-        <FormattedMessage
-          defaultMessage={translate('onboarding.analysis.docs')}
-          id="onboarding.analysis.docs"
-          values={{
-            link: (
-              <Link to="/documentation/analysis/scan/sonarscanner-for-msbuild/" target="_blank">
-                {translate('onboarding.analysis.msbuild.docs_link')}
-              </Link>
-            )
-          }}
-        />
-      </p>
-    </div>
+    <>
+      <RenderOptions
+        checked={variant}
+        name="variant"
+        onCheck={value => setVariant(value as Variant)}
+        optionLabelKey="onboarding.build.dotnet.variant"
+        options={['dotnet_core', 'dotnet_framework']}
+        titleLabelKey="onboarding.build.dotnet.variant"
+      />
+      <DotNetTuto {...props} />
+    </>
   );
 }
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetCore.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetCore.tsx
new file mode 100644 (file)
index 0000000..d667ced
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2021 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+import * as React from 'react';
+import { Alert } from 'sonar-ui-common/components/ui/Alert';
+import { translate } from 'sonar-ui-common/helpers/l10n';
+import CodeSnippet from '../../../common/CodeSnippet';
+import { DotNetProps } from './DotNet';
+import DotNetExecute from './DotNetExecute';
+
+export default function DotNetCore(props: DotNetProps) {
+  const { host, projectKey, token } = props;
+
+  const commands = [
+    `dotnet sonarscanner begin /k:"${projectKey}" /d:sonar.host.url="${host}"  /d:sonar.login="${token}"`,
+    'dotnet build',
+    `dotnet sonarscanner end /d:sonar.login="${token}"`
+  ];
+
+  return (
+    <div>
+      <h4 className="huge-spacer-top spacer-bottom">
+        {translate('onboarding.analysis.dotnetcore.global')}
+      </h4>
+      <p className="big-spacer-top markdown">
+        {translate('onboarding.analysis.dotnetcore.global.text')}
+      </p>
+      <CodeSnippet snippet="dotnet tool install --global dotnet-sonarscanner" />
+      <Alert className="spacer-top" variant="info">
+        {translate('onboarding.analysis.dotnetcore.global.text.path')}
+      </Alert>
+      <DotNetExecute commands={commands} />
+    </div>
+  );
+}
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetExecute.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetExecute.tsx
new file mode 100644 (file)
index 0000000..ec2e272
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2021 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+import * as React from 'react';
+import { FormattedMessage } from 'react-intl';
+import { Link } from 'react-router';
+import { translate } from 'sonar-ui-common/helpers/l10n';
+import CodeSnippet from '../../../common/CodeSnippet';
+import InstanceMessage from '../../../common/InstanceMessage';
+
+export interface DotNetExecuteProps {
+  commands: string[];
+}
+
+export default function DotNetExecute({ commands }: DotNetExecuteProps) {
+  return (
+    <>
+      <h4 className="huge-spacer-top spacer-bottom">
+        {translate('onboarding.analysis.sq_scanner.execute')}
+      </h4>
+
+      <InstanceMessage message={translate('onboarding.analysis.msbuild.execute.text')}>
+        {transformedMessage => <p className="spacer-bottom markdown">{transformedMessage}</p>}
+      </InstanceMessage>
+      {commands.map((command, index) => (
+        <CodeSnippet key={index} snippet={command} />
+      ))}
+      <p className="big-spacer-top markdown">
+        <FormattedMessage
+          defaultMessage={translate('onboarding.analysis.docs')}
+          id="onboarding.analysis.docs"
+          values={{
+            link: (
+              <Link to="/documentation/analysis/scan/sonarscanner-for-msbuild/" target="_blank">
+                {translate('onboarding.analysis.msbuild.docs_link')}
+              </Link>
+            )
+          }}
+        />
+      </p>
+    </>
+  );
+}
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetFramework.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetFramework.tsx
new file mode 100644 (file)
index 0000000..af25c98
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2021 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+import * as React from 'react';
+import { FormattedMessage } from 'react-intl';
+import { Link } from 'react-router';
+import { translate } from 'sonar-ui-common/helpers/l10n';
+import { DotNetProps } from './DotNet';
+import DotNetExecute from './DotNetExecute';
+
+export default function DotNetFramework(props: DotNetProps) {
+  const { host, projectKey, token } = props;
+
+  const commands = [
+    `SonarScanner.MSBuild.exe begin /k:"${projectKey}" /d:sonar.host.url="${host}" /d:sonar.login="${token}"`,
+    'MsBuild.exe /t:Rebuild',
+    `SonarScanner.MSBuild.exe end /d:sonar.login="${token}"`
+  ];
+
+  return (
+    <div>
+      <div>
+        <h4 className="spacer-bottom huge-spacer-top">
+          {translate('onboarding.analysis.msbuild.header')}
+        </h4>
+        <p className="spacer-bottom markdown">
+          <FormattedMessage
+            defaultMessage={translate('onboarding.analysis.msbuild.text')}
+            id="onboarding.analysis.msbuild.text"
+            values={{ code: <code>%PATH%</code> }}
+          />
+        </p>
+        <p>
+          <Link
+            className="button"
+            to="/documentation/analysis/scan/sonarscanner-for-msbuild/"
+            target="_blank">
+            {translate('download_verb')}
+          </Link>
+        </p>
+      </div>
+
+      <DotNetExecute commands={commands} />
+    </div>
+  );
+}
index 13dcbf83e3f41d6f935d0df6e7945b24151b9941..dd5408d54eb13e53f4c55520c5f9410696c8ae16 100644 (file)
@@ -21,6 +21,6 @@ import { shallow } from 'enzyme';
 import * as React from 'react';
 import DotNet from '../DotNet';
 
-it('DotNet renders correctly', () => {
+it('Should renders correctly', () => {
   expect(shallow(<DotNet host="host" projectKey="projectKey" token="token" />)).toMatchSnapshot();
 });
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNetExecute-test.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNetExecute-test.tsx
new file mode 100644 (file)
index 0000000..5a36931
--- /dev/null
@@ -0,0 +1,26 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2021 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+import { shallow } from 'enzyme';
+import * as React from 'react';
+import DotNetExecute from '../DotNetExecute';
+
+it('Should renders correctly', () => {
+  expect(shallow(<DotNetExecute commands={['command1', 'command2']} />)).toMatchSnapshot();
+});
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNetFramework-test.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotNetFramework-test.tsx
new file mode 100644 (file)
index 0000000..a6c1d5c
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2021 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+import { shallow } from 'enzyme';
+import * as React from 'react';
+import DotNetFramework from '../DotNetFramework';
+
+it('Should renders correctly', () => {
+  expect(
+    shallow(<DotNetFramework host="host" projectKey="projectKey" token="token" />)
+  ).toMatchSnapshot();
+});
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotnetCore-test.tsx b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/DotnetCore-test.tsx
new file mode 100644 (file)
index 0000000..1de2611
--- /dev/null
@@ -0,0 +1,28 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2021 SonarSource SA
+ * mailto:info AT sonarsource DOT com
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+import { shallow } from 'enzyme';
+import * as React from 'react';
+import DotNetCore from '../DotNetCore';
+
+it('Should renders correctly', () => {
+  expect(
+    shallow(<DotNetCore host="host" projectKey="projectKey" token="token" />)
+  ).toMatchSnapshot();
+});
index 50fe953751cf1fe797f54c7e4b6a62ce3c0dd9de..a322725aec2ae53a762be089c7113068d16d6bf2 100644 (file)
@@ -1,93 +1,24 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
-exports[`DotNet renders correctly 1`] = `
-<div>
-  <div>
-    <h4
-      className="spacer-bottom"
-    >
-      onboarding.analysis.msbuild.header
-    </h4>
-    <p
-      className="spacer-bottom markdown"
-    >
-      <FormattedMessage
-        defaultMessage="onboarding.analysis.msbuild.text"
-        id="onboarding.analysis.msbuild.text"
-        values={
-          Object {
-            "code": <code>
-              %PATH%
-            </code>,
-          }
-        }
-      />
-    </p>
-    <p>
-      <Link
-        className="button"
-        onlyActiveOnIndex={false}
-        style={Object {}}
-        target="_blank"
-        to="/documentation/analysis/scan/sonarscanner-for-msbuild/"
-      >
-        download_verb
-      </Link>
-    </p>
-  </div>
-  <h4
-    className="huge-spacer-top spacer-bottom"
-  >
-    onboarding.analysis.msbuild.execute
-  </h4>
-  <InstanceMessage
-    message="onboarding.analysis.msbuild.execute.text"
-  >
-    <Component />
-  </InstanceMessage>
-  <CodeSnippet
-    isOneLine={true}
-    snippet={
+exports[`Should renders correctly 1`] = `
+<Fragment>
+  <RenderOptions
+    checked="dotnet_core"
+    name="variant"
+    onCheck={[Function]}
+    optionLabelKey="onboarding.build.dotnet.variant"
+    options={
       Array [
-        "SonarScanner.MSBuild.exe begin",
-        "/k:\\"projectKey\\"",
-        "/d:sonar.host.url=\\"host\\"",
-        "/d:sonar.login=\\"token\\"",
+        "dotnet_core",
+        "dotnet_framework",
       ]
     }
+    titleLabelKey="onboarding.build.dotnet.variant"
   />
-  <CodeSnippet
-    isOneLine={true}
-    snippet="MsBuild.exe /t:Rebuild"
+  <DotNetCore
+    host="host"
+    projectKey="projectKey"
+    token="token"
   />
-  <CodeSnippet
-    isOneLine={true}
-    snippet={
-      Array [
-        "SonarScanner.MSBuild.exe end",
-        "/d:sonar.login=\\"token\\"",
-      ]
-    }
-  />
-  <p
-    className="big-spacer-top markdown"
-  >
-    <FormattedMessage
-      defaultMessage="onboarding.analysis.docs"
-      id="onboarding.analysis.docs"
-      values={
-        Object {
-          "link": <Link
-            onlyActiveOnIndex={false}
-            style={Object {}}
-            target="_blank"
-            to="/documentation/analysis/scan/sonarscanner-for-msbuild/"
-          >
-            onboarding.analysis.msbuild.docs_link
-          </Link>,
-        }
-      }
-    />
-  </p>
-</div>
+</Fragment>
 `;
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNetExecute-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNetExecute-test.tsx.snap
new file mode 100644 (file)
index 0000000..bc62343
--- /dev/null
@@ -0,0 +1,44 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Should renders correctly 1`] = `
+<Fragment>
+  <h4
+    className="huge-spacer-top spacer-bottom"
+  >
+    onboarding.analysis.sq_scanner.execute
+  </h4>
+  <InstanceMessage
+    message="onboarding.analysis.msbuild.execute.text"
+  >
+    <Component />
+  </InstanceMessage>
+  <CodeSnippet
+    key="0"
+    snippet="command1"
+  />
+  <CodeSnippet
+    key="1"
+    snippet="command2"
+  />
+  <p
+    className="big-spacer-top markdown"
+  >
+    <FormattedMessage
+      defaultMessage="onboarding.analysis.docs"
+      id="onboarding.analysis.docs"
+      values={
+        Object {
+          "link": <Link
+            onlyActiveOnIndex={false}
+            style={Object {}}
+            target="_blank"
+            to="/documentation/analysis/scan/sonarscanner-for-msbuild/"
+          >
+            onboarding.analysis.msbuild.docs_link
+          </Link>,
+        }
+      }
+    />
+  </p>
+</Fragment>
+`;
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNetFramework-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNetFramework-test.tsx.snap
new file mode 100644 (file)
index 0000000..d52952a
--- /dev/null
@@ -0,0 +1,48 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Should renders correctly 1`] = `
+<div>
+  <div>
+    <h4
+      className="spacer-bottom huge-spacer-top"
+    >
+      onboarding.analysis.msbuild.header
+    </h4>
+    <p
+      className="spacer-bottom markdown"
+    >
+      <FormattedMessage
+        defaultMessage="onboarding.analysis.msbuild.text"
+        id="onboarding.analysis.msbuild.text"
+        values={
+          Object {
+            "code": <code>
+              %PATH%
+            </code>,
+          }
+        }
+      />
+    </p>
+    <p>
+      <Link
+        className="button"
+        onlyActiveOnIndex={false}
+        style={Object {}}
+        target="_blank"
+        to="/documentation/analysis/scan/sonarscanner-for-msbuild/"
+      >
+        download_verb
+      </Link>
+    </p>
+  </div>
+  <DotNetExecute
+    commands={
+      Array [
+        "SonarScanner.MSBuild.exe begin /k:\\"projectKey\\" /d:sonar.host.url=\\"host\\" /d:sonar.login=\\"token\\"",
+        "MsBuild.exe /t:Rebuild",
+        "SonarScanner.MSBuild.exe end /d:sonar.login=\\"token\\"",
+      ]
+    }
+  />
+</div>
+`;
diff --git a/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotnetCore-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotnetCore-test.tsx.snap
new file mode 100644 (file)
index 0000000..5621eab
--- /dev/null
@@ -0,0 +1,34 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Should renders correctly 1`] = `
+<div>
+  <h4
+    className="huge-spacer-top spacer-bottom"
+  >
+    onboarding.analysis.dotnetcore.global
+  </h4>
+  <p
+    className="big-spacer-top markdown"
+  >
+    onboarding.analysis.dotnetcore.global.text
+  </p>
+  <CodeSnippet
+    snippet="dotnet tool install --global dotnet-sonarscanner"
+  />
+  <Alert
+    className="spacer-top"
+    variant="info"
+  >
+    onboarding.analysis.dotnetcore.global.text.path
+  </Alert>
+  <DotNetExecute
+    commands={
+      Array [
+        "dotnet sonarscanner begin /k:\\"projectKey\\" /d:sonar.host.url=\\"host\\"  /d:sonar.login=\\"token\\"",
+        "dotnet build",
+        "dotnet sonarscanner end /d:sonar.login=\\"token\\"",
+      ]
+    }
+  />
+</div>
+`;
index fd7b55aecb6ce16ecac667af43b847da7433bea8..b576336b9e1f741e87ab9531fe0e2e40111df536 100644 (file)
@@ -3310,6 +3310,10 @@ onboarding.build.dotnet.linux_core=Linux + .NET Core
 onboarding.build.cfamily=C,C++ or ObjC
 onboarding.build.other=Other (for JS, TS, Go, Python, PHP, ...)
 
+onboarding.build.dotnet.variant=Choose your build tool
+onboarding.build.dotnet.variant.dotnet_core=.NET Core
+onboarding.build.dotnet.variant.dotnet_framework=.NET Framework
+
 onboarding.build.other.os=What is your OS?
 onboarding.build.other.os.linux=Linux
 onboarding.build.other.os.win=Windows
@@ -3348,9 +3352,9 @@ onboarding.analysis.java.gradle.text.2.sonarcloud=and add the following lines to
 
 onboarding.analysis.msbuild.header=Download and unzip the Scanner for MSBuild
 onboarding.analysis.msbuild.text=And add the executable's directory to the {code} environment variable
-onboarding.analysis.msbuild.execute=Execute the Scanner for MSBuild from your computer
+onboarding.analysis.msbuild.execute=Execute the Scanner for .NET from your computer
 onboarding.analysis.msbuild.execute.text=Running a {instance} analysis is straighforward. You just need to execute the following commands at the root of your solution.
-onboarding.analysis.msbuild.docs_link=official documentation of the Scanner for MSBuild
+onboarding.analysis.msbuild.docs_link=official documentation of the Scanner for .NET
 onboarding.analysis.msbuild.header.sonarcloud=Download and unzip the Scanner for MSBuild
 onboarding.analysis.msbuild.text.sonarcloud=And add the executable's directory to the <code>%PATH%</code> environment variable
 onboarding.analysis.msbuild.execute.sonarcloud=Execute the Scanner for MSBuild from your computer
@@ -3374,6 +3378,10 @@ onboarding.analysis.sq_scanner.docs_link=official documentation of the Scanner
 onboarding.analysis.sqscanner.docs.gradle.title=official documentation of the Scanner for Gradle
 onboarding.analysis.sqscanner.docs.gradle.example_project.title=live Gradle-based example project
 
+onboarding.analysis.dotnetcore.global=Scanner .NET Core Global Tool
+onboarding.analysis.dotnetcore.global.text=As a prerequisite you need to have the sonarscanner tool installed globally using the following command:
+onboarding.analysis.dotnetcore.global.text.path=Make sure dotnet tools folder is in your path. See dotnet global tools documentation for more information.
+
 onboarding.tutorial.return_to_list=Choose another option
 
 onboarding.tutorial.choose_method=How do you want to analyze your repository?