From 4a183772d0a5f88c5f9693ea4726695ef4f562d1 Mon Sep 17 00:00:00 2001 From: Wouter Admiraal Date: Fri, 13 Jan 2023 16:44:23 +0100 Subject: [PATCH] SONAR-17732 Remove all usage of redirect.sonarsource.com --- .../main/js/app/components/GlobalFooter.tsx | 8 +-- .../__snapshots__/GlobalFooter-test.tsx.snap | 24 ++++----- .../branch-like/CurrentBranchLike.tsx | 2 +- .../CurrentBranchLike-test.tsx.snap | 6 +-- .../js/apps/maintenance/components/App.tsx | 5 +- .../__snapshots__/EditionBoxes-test.tsx.snap | 12 ++--- .../__snapshots__/EditionBox-test.tsx.snap | 2 +- .../AlmBindingDefinitionBox-test.tsx.snap | 2 +- .../CreationTooltip-test.tsx.snap | 2 +- .../other/commands/DotNetFramework.tsx | 9 ++-- .../other/commands/DownloadScanner.tsx | 9 ++-- .../DotNetFramework-test.tsx.snap | 7 ++- .../DownloadScanner-test.tsx.snap | 21 ++++---- .../components/upgrade/SystemUpgradeItem.tsx | 9 ++-- .../SystemUpgradeItem-test.tsx.snap | 49 ++++++++----------- .../sonar-web/src/main/js/helpers/editions.ts | 8 +-- .../server/platform/ClusterVerification.java | 2 +- .../platform/ClusterVerificationTest.java | 2 +- .../src/main/assembly/conf/sonar.properties | 2 +- .../extensions/jdbc-driver/oracle/README.txt | 4 +- .../sonar/core/config/ScannerProperties.java | 2 +- .../scan/SpringProjectScanContainer.java | 2 +- .../branch/DeprecatedBranchMediumTest.java | 2 +- 23 files changed, 82 insertions(+), 109 deletions(-) diff --git a/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx b/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx index d85692edfca..53de21f364d 100644 --- a/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx +++ b/server/sonar-web/src/main/js/app/components/GlobalFooter.tsx @@ -80,13 +80,9 @@ export function GlobalFooter({ hideLoggedInInfo, appState }: GlobalFooterProps) {translate('footer.documentation')}
  • - + {translate('footer.plugins')} - +
  • {!hideLoggedInInfo && (
  • diff --git a/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalFooter-test.tsx.snap b/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalFooter-test.tsx.snap index d9f37661358..492e71658d2 100644 --- a/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalFooter-test.tsx.snap +++ b/server/sonar-web/src/main/js/app/components/__tests__/__snapshots__/GlobalFooter-test.tsx.snap @@ -53,13 +53,11 @@ exports[`should display the sq version 1`] = `
  • - footer.plugins - +
  • - footer.plugins - +
  • @@ -182,13 +178,11 @@ exports[`should render the only logged in information 1`] = `
  • - footer.plugins - +
  • { values={{ link: ( here, as it relies on AppState. However, the maintenance + // app is a special app that can run in a "downgraded" environment, where the AppState + // may not yet be fully loaded. Hence, we link to this documentation page directly. + to="https://docs.sonarqube.org/latest/setup-and-upgrade/upgrade-the-server/upgrade-guide/" target="_blank" > {translate('maintenance.sonarqube_is_under_maintenance_link.2')} diff --git a/server/sonar-web/src/main/js/apps/marketplace/__tests__/__snapshots__/EditionBoxes-test.tsx.snap b/server/sonar-web/src/main/js/apps/marketplace/__tests__/__snapshots__/EditionBoxes-test.tsx.snap index 41180da2051..9e68295f6e4 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/__tests__/__snapshots__/EditionBoxes-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/marketplace/__tests__/__snapshots__/EditionBoxes-test.tsx.snap @@ -9,7 +9,7 @@ exports[`should display the available edition boxes correctly 1`] = ` edition={ { "downloadProperty": "downloadDeveloperUrl", - "homeUrl": "https://redirect.sonarsource.com/editions/developer.html", + "homeUrl": "https://www.sonarsource.com/plans-and-pricing/developer/", "key": "developer", "name": "Developer Edition", } @@ -21,7 +21,7 @@ exports[`should display the available edition boxes correctly 1`] = ` edition={ { "downloadProperty": "downloadEnterpriseUrl", - "homeUrl": "https://redirect.sonarsource.com/editions/enterprise.html", + "homeUrl": "https://www.sonarsource.com/plans-and-pricing/enterprise/", "key": "enterprise", "name": "Enterprise Edition", } @@ -33,7 +33,7 @@ exports[`should display the available edition boxes correctly 1`] = ` edition={ { "downloadProperty": "downloadDatacenterUrl", - "homeUrl": "https://redirect.sonarsource.com/editions/datacenter.html", + "homeUrl": "https://www.sonarsource.com/plans-and-pricing/data-center/", "key": "datacenter", "name": "Data Center Edition", } @@ -52,7 +52,7 @@ exports[`should display the datacenter edition box only 1`] = ` edition={ { "downloadProperty": "downloadDatacenterUrl", - "homeUrl": "https://redirect.sonarsource.com/editions/datacenter.html", + "homeUrl": "https://www.sonarsource.com/plans-and-pricing/data-center/", "key": "datacenter", "name": "Data Center Edition", } @@ -71,7 +71,7 @@ exports[`should display the enterprise and datacenter edition boxes 1`] = ` edition={ { "downloadProperty": "downloadEnterpriseUrl", - "homeUrl": "https://redirect.sonarsource.com/editions/enterprise.html", + "homeUrl": "https://www.sonarsource.com/plans-and-pricing/enterprise/", "key": "enterprise", "name": "Enterprise Edition", } @@ -83,7 +83,7 @@ exports[`should display the enterprise and datacenter edition boxes 1`] = ` edition={ { "downloadProperty": "downloadDatacenterUrl", - "homeUrl": "https://redirect.sonarsource.com/editions/datacenter.html", + "homeUrl": "https://www.sonarsource.com/plans-and-pricing/data-center/", "key": "datacenter", "name": "Data Center Edition", } diff --git a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/EditionBox-test.tsx.snap b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/EditionBox-test.tsx.snap index 544953e04d3..f239229c3d1 100644 --- a/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/EditionBox-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/marketplace/components/__tests__/__snapshots__/EditionBox-test.tsx.snap @@ -74,7 +74,7 @@ exports[`should display the edition 1`] = ` > marketplace.request_free_trial diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmBindingDefinitionBox-test.tsx.snap b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmBindingDefinitionBox-test.tsx.snap index e31673bf7f0..f72efa1d911 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmBindingDefinitionBox-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/AlmBindingDefinitionBox-test.tsx.snap @@ -564,7 +564,7 @@ exports[`should render correctly: success with branches disabled 1`] = ` values={ { "link": diff --git a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/CreationTooltip-test.tsx.snap b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/CreationTooltip-test.tsx.snap index c9564f6cefe..59011f44397 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/CreationTooltip-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/settings/components/almIntegration/__tests__/__snapshots__/CreationTooltip-test.tsx.snap @@ -11,7 +11,7 @@ exports[`should render correctly 1`] = ` { "alm": "alm.azure", "link": diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNetFramework.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNetFramework.tsx index 6936b2ff3ab..1bd7580cd0b 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNetFramework.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/DotNetFramework.tsx @@ -20,7 +20,7 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { translate } from '../../../../helpers/l10n'; -import Link from '../../../common/Link'; +import DocLink from '../../../common/DocLink'; import { DotNetProps } from './DotNet'; import DotNetExecute from './DotNetExecute'; @@ -46,12 +46,9 @@ export default function DotNetFramework(props: DotNetProps) { values={{ code: %PATH%, link: ( - + {translate('onboarding.analysis.msbuild.docs_link')} - + ), }} /> diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadScanner.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadScanner.tsx index 448319f9413..482ee6e9bce 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadScanner.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/DownloadScanner.tsx @@ -21,7 +21,7 @@ import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { translate } from '../../../../helpers/l10n'; import CodeSnippet from '../../../common/CodeSnippet'; -import Link from '../../../common/Link'; +import DocLink from '../../../common/DocLink'; import { ClipboardButton } from '../../../controls/clipboard'; import { OSs } from '../../types'; @@ -46,12 +46,9 @@ export default function DownloadScanner(props: DownloadScannerProps) { dir: bin, env_var: {os === OSs.Windows ? '%PATH%' : 'PATH'}, link: ( - + {translate('onboarding.analysis.sq_scanner.docs_link')} - + ), }} /> diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/__tests__/__snapshots__/DotNetFramework-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/other/commands/__tests__/__snapshots__/DotNetFramework-test.tsx.snap index 89e1ed7cfc4..3145cee5f66 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/__tests__/__snapshots__/DotNetFramework-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/__tests__/__snapshots__/DotNetFramework-test.tsx.snap @@ -19,12 +19,11 @@ exports[`should render correctly 1`] = ` "code": %PATH% , - "link": onboarding.analysis.msbuild.docs_link - , + , } } /> diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/__tests__/__snapshots__/DownloadScanner-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/other/commands/__tests__/__snapshots__/DownloadScanner-test.tsx.snap index 5d1b5bb5e7e..d935a1644b4 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/__tests__/__snapshots__/DownloadScanner-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/__tests__/__snapshots__/DownloadScanner-test.tsx.snap @@ -21,12 +21,11 @@ exports[`should render correctly for "linux": local 1`] = ` "env_var": PATH , - "link": onboarding.analysis.sq_scanner.docs_link - , + , } } /> @@ -111,12 +110,11 @@ exports[`should render correctly for "mac": local 1`] = ` "env_var": PATH , - "link": onboarding.analysis.sq_scanner.docs_link - , + , } } /> @@ -201,12 +199,11 @@ exports[`should render correctly for "win": local 1`] = ` "env_var": %PATH% , - "link": onboarding.analysis.sq_scanner.docs_link - , + , } } /> diff --git a/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeItem.tsx b/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeItem.tsx index 126cdd51211..d2bf2e935d3 100644 --- a/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeItem.tsx +++ b/server/sonar-web/src/main/js/components/upgrade/SystemUpgradeItem.tsx @@ -27,6 +27,7 @@ import { import { translate, translateWithParameters } from '../../helpers/l10n'; import { EditionKey } from '../../types/editions'; import { SystemUpgrade } from '../../types/system'; +import DocLink from '../common/DocLink'; import Link from '../common/Link'; import DateFormatter from '../intl/DateFormatter'; import SystemUpgradeIntermediate from './SystemUpgradeIntermediate'; @@ -99,13 +100,9 @@ export default function SystemUpgradeItem(props: SystemUpgradeItemProps) { > {translateWithParameters('system.download_x', lastUpgrade.version)} - + {translate('system.how_to_upgrade')} - + ); diff --git a/server/sonar-web/src/main/js/components/upgrade/__tests__/__snapshots__/SystemUpgradeItem-test.tsx.snap b/server/sonar-web/src/main/js/components/upgrade/__tests__/__snapshots__/SystemUpgradeItem-test.tsx.snap index 59c5067e0d4..2ab2d84ff4d 100644 --- a/server/sonar-web/src/main/js/components/upgrade/__tests__/__snapshots__/SystemUpgradeItem-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/upgrade/__tests__/__snapshots__/SystemUpgradeItem-test.tsx.snap @@ -89,13 +89,12 @@ exports[`should display correctly 1`] = ` > system.download_x.5.6.7 - system.how_to_upgrade - + `; @@ -189,13 +188,12 @@ exports[`should display correctly 2`] = ` > system.download_x.5.6.7 - system.how_to_upgrade - + `; @@ -282,13 +280,12 @@ exports[`should display correctly 3`] = ` > system.download_x.5.6.7 - system.how_to_upgrade - + `; @@ -382,13 +379,12 @@ exports[`should display correctly 4`] = ` > system.download_x.5.6.7 - system.how_to_upgrade - + `; @@ -482,13 +478,12 @@ exports[`should display correctly 5`] = ` > system.download_x.5.6.7 - system.how_to_upgrade - + `; @@ -582,13 +577,12 @@ exports[`should display correctly 6`] = ` > system.download_x.5.6.7 - system.how_to_upgrade - + `; @@ -663,13 +657,12 @@ exports[`should display correctly 7`] = ` > system.download_x.5.6.7 - system.how_to_upgrade - + `; diff --git a/server/sonar-web/src/main/js/helpers/editions.ts b/server/sonar-web/src/main/js/helpers/editions.ts index b85ee1f18e3..79d52d9a2a4 100644 --- a/server/sonar-web/src/main/js/helpers/editions.ts +++ b/server/sonar-web/src/main/js/helpers/editions.ts @@ -25,25 +25,25 @@ const EDITIONS: { [x in EditionKey]: Edition } = { community: { key: EditionKey.community, name: 'Community Edition', - homeUrl: 'https://redirect.sonarsource.com/editions/community.html', + homeUrl: 'https://www.sonarsource.com/open-source-editions/', downloadProperty: 'downloadUrl', }, developer: { key: EditionKey.developer, name: 'Developer Edition', - homeUrl: 'https://redirect.sonarsource.com/editions/developer.html', + homeUrl: 'https://www.sonarsource.com/plans-and-pricing/developer/', downloadProperty: 'downloadDeveloperUrl', }, enterprise: { key: EditionKey.enterprise, name: 'Enterprise Edition', - homeUrl: 'https://redirect.sonarsource.com/editions/enterprise.html', + homeUrl: 'https://www.sonarsource.com/plans-and-pricing/enterprise/', downloadProperty: 'downloadEnterpriseUrl', }, datacenter: { key: EditionKey.datacenter, name: 'Data Center Edition', - homeUrl: 'https://redirect.sonarsource.com/editions/datacenter.html', + homeUrl: 'https://www.sonarsource.com/plans-and-pricing/data-center/', downloadProperty: 'downloadDatacenterUrl', }, }; diff --git a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/ClusterVerification.java b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/ClusterVerification.java index be43c8b2e27..20a94de2e8c 100644 --- a/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/ClusterVerification.java +++ b/server/sonar-webserver-core/src/main/java/org/sonar/server/platform/ClusterVerification.java @@ -49,7 +49,7 @@ public class ClusterVerification implements Startable { } if (feature == null || !feature.isEnabled()) { throw MessageException.of( - "Cluster mode can't be enabled. Please install the Data Center Edition. More details at https://redirect.sonarsource.com/editions/datacenter.html."); + "Cluster mode can't be enabled. Please install the Data Center Edition. More details at https://www.sonarsource.com/plans-and-pricing/data-center/."); } } diff --git a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/ClusterVerificationTest.java b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/ClusterVerificationTest.java index c7df0c4f441..62e2d6164a3 100644 --- a/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/ClusterVerificationTest.java +++ b/server/sonar-webserver-core/src/test/java/org/sonar/server/platform/ClusterVerificationTest.java @@ -28,7 +28,7 @@ import static org.mockito.Mockito.when; public class ClusterVerificationTest { - private static final String ERROR_MESSAGE = "Cluster mode can't be enabled. Please install the Data Center Edition. More details at https://redirect.sonarsource.com/editions/datacenter.html."; + private static final String ERROR_MESSAGE = "Cluster mode can't be enabled. Please install the Data Center Edition. More details at https://www.sonarsource.com/plans-and-pricing/data-center/."; private NodeInformation nodeInformation = mock(NodeInformation.class); diff --git a/sonar-application/src/main/assembly/conf/sonar.properties b/sonar-application/src/main/assembly/conf/sonar.properties index f2f723b1785..dcbb6bb240c 100644 --- a/sonar-application/src/main/assembly/conf/sonar.properties +++ b/sonar-application/src/main/assembly/conf/sonar.properties @@ -10,7 +10,7 @@ # - be overridden by environment variables. The name of the corresponding environment variable is the # upper-cased name of the property where all the dot ('.') and dash ('-') characters are replaced by # underscores ('_'). For example, to override 'sonar.web.systemPasscode' use 'SONAR_WEB_SYSTEMPASSCODE'. -# - be encrypted. See https://redirect.sonarsource.com/doc/settings-encryption.html +# - be encrypted. See https://docs.sonarqube.org/latest/instance-administration/security/#settings-encryption #-------------------------------------------------------------------------------------------------- # DATABASE diff --git a/sonar-application/src/main/assembly/extensions/jdbc-driver/oracle/README.txt b/sonar-application/src/main/assembly/extensions/jdbc-driver/oracle/README.txt index c3d67e9c173..54e11ac42f5 100644 --- a/sonar-application/src/main/assembly/extensions/jdbc-driver/oracle/README.txt +++ b/sonar-application/src/main/assembly/extensions/jdbc-driver/oracle/README.txt @@ -1,2 +1,2 @@ -Please copy an Oracle JDBC driver in this directory. See compatible versions at https://redirect.sonarsource.com/doc/requirements.html. -Note that only a single JAR file is accepted. A failure is raised at startup if multiple JAR files are available. \ No newline at end of file +Please copy an Oracle JDBC driver in this directory. See compatible versions at https://docs.sonarqube.org/latest/requirements/prerequisites-and-overview/. +Note that only a single JAR file is accepted. A failure is raised at startup if multiple JAR files are available. diff --git a/sonar-core/src/main/java/org/sonar/core/config/ScannerProperties.java b/sonar-core/src/main/java/org/sonar/core/config/ScannerProperties.java index fb258d09054..ea2fb1ab7de 100644 --- a/sonar-core/src/main/java/org/sonar/core/config/ScannerProperties.java +++ b/sonar-core/src/main/java/org/sonar/core/config/ScannerProperties.java @@ -30,7 +30,7 @@ import static org.sonar.api.PropertyType.INTEGER; public class ScannerProperties { - public static final String BRANCHES_DOC_LINK = "https://redirect.sonarsource.com/doc/branches.html"; + public static final String BRANCHES_DOC_LINK = "https://docs.sonarqube.org/latest/analyzing-source-code/branches/branch-analysis/"; public static final String BRANCH_NAME = "sonar.branch.name"; @Deprecated diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/SpringProjectScanContainer.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/SpringProjectScanContainer.java index c5d38375188..0dc9d6adce5 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/SpringProjectScanContainer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scan/SpringProjectScanContainer.java @@ -346,7 +346,7 @@ public class SpringProjectScanContainer extends SpringComponentContainer { properties.get("sonar.branch").ifPresent(deprecatedBranch -> { throw MessageException.of("The 'sonar.branch' parameter is no longer supported. You should stop using it. " + - "Branch analysis is available in Developer Edition and above. See https://redirect.sonarsource.com/editions/developer.html for more information."); + "Branch analysis is available in Developer Edition and above. See https://www.sonarsource.com/plans-and-pricing/developer/ for more information."); }); BranchConfiguration branchConfig = getComponentByType(BranchConfiguration.class); diff --git a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/branch/DeprecatedBranchMediumTest.java b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/branch/DeprecatedBranchMediumTest.java index c5a23959ed2..8dff5b1055d 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/branch/DeprecatedBranchMediumTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/scanner/mediumtest/branch/DeprecatedBranchMediumTest.java @@ -83,6 +83,6 @@ public class DeprecatedBranchMediumTest { .execute()) .isInstanceOf(MessageException.class) .hasMessage("The 'sonar.branch' parameter is no longer supported. You should stop using it. " + - "Branch analysis is available in Developer Edition and above. See https://redirect.sonarsource.com/editions/developer.html for more information."); + "Branch analysis is available in Developer Edition and above. See https://www.sonarsource.com/plans-and-pricing/developer/ for more information."); } } -- 2.39.5