From a9f83b6f7a9a8b0bb4a2d67a40ccbf61a9395ba5 Mon Sep 17 00:00:00 2001 From: Wouter Admiraal Date: Fri, 11 Nov 2022 14:06:48 +0100 Subject: [PATCH] SONAR-17593 Update ./gradlew commands to use 'sonar' --- .../__tests__/__snapshots__/AnalysisCommand-test.tsx.snap | 4 ++-- .../tutorials/bitbucket-pipelines/commands/Gradle.ts | 2 +- .../js/components/tutorials/github-action/commands/Gradle.tsx | 2 +- .../commands/__tests__/__snapshots__/Gradle-test.tsx.snap | 4 ++-- .../js/components/tutorials/gitlabci/commands/PipeCommand.tsx | 2 +- .../__tests__/__snapshots__/PipeCommand-test.tsx.snap | 4 ++-- .../components/tutorials/jenkins/buildtool-steps/Gradle.tsx | 2 +- .../__tests__/__snapshots__/Gradle-test.tsx.snap | 2 +- .../js/components/tutorials/other/commands/JavaGradle.tsx | 2 +- .../commands/__tests__/__snapshots__/JavaGradle-test.tsx.snap | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/__tests__/__snapshots__/AnalysisCommand-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/__tests__/__snapshots__/AnalysisCommand-test.tsx.snap index c1c0ee6a435..795b1c6600c 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/__tests__/__snapshots__/AnalysisCommand-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/__tests__/__snapshots__/AnalysisCommand-test.tsx.snap @@ -289,7 +289,7 @@ definitions: - gradle - sonar script: - - bash ./gradlew sonarqube + - bash ./gradlew sonar caches: sonar: ~/.sonar @@ -344,7 +344,7 @@ definitions: - gradle - sonar script: - - bash ./gradlew sonarqube + - bash ./gradlew sonar caches: sonar: ~/.sonar diff --git a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Gradle.ts b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Gradle.ts index cedaa641248..fb8e6a16466 100644 --- a/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Gradle.ts +++ b/server/sonar-web/src/main/js/components/tutorials/bitbucket-pipelines/commands/Gradle.ts @@ -28,7 +28,7 @@ definitions: - gradle - sonar script: - - bash ./gradlew sonarqube + - bash ./gradlew sonar caches: sonar: ~/.sonar diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Gradle.tsx b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Gradle.tsx index 8c690c04d7a..a9b1e8921b8 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Gradle.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/Gradle.tsx @@ -58,7 +58,7 @@ const GRADLE_YAML_STEPS = ` GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }} - run: ./gradlew build sonarqube --info`; + run: ./gradlew build sonar --info`; export default function Gradle(props: GradleProps) { const { component, branchesEnabled, mainBranchName } = props; diff --git a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/__tests__/__snapshots__/Gradle-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/__tests__/__snapshots__/Gradle-test.tsx.snap index 08060e05dfa..30fbb0dd5d6 100644 --- a/server/sonar-web/src/main/js/components/tutorials/github-action/commands/__tests__/__snapshots__/Gradle-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/tutorials/github-action/commands/__tests__/__snapshots__/Gradle-test.tsx.snap @@ -80,7 +80,7 @@ jobs: GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: \${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: \${{ secrets.SONAR_HOST_URL }} - run: ./gradlew build sonarqube --info" + run: ./gradlew build sonar --info" /> 'gradle sonarqube' }, + [BuildTools.Gradle]: { image: 'gradle:jre11-slim', script: () => 'gradle sonar' }, [BuildTools.Maven]: { image: 'maven:3.6.3-jdk-11', script: (projectKey: string) => ` diff --git a/server/sonar-web/src/main/js/components/tutorials/gitlabci/commands/__tests__/__snapshots__/PipeCommand-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/gitlabci/commands/__tests__/__snapshots__/PipeCommand-test.tsx.snap index 9b66a6ec41e..920cdd263c7 100644 --- a/server/sonar-web/src/main/js/components/tutorials/gitlabci/commands/__tests__/__snapshots__/PipeCommand-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/tutorials/gitlabci/commands/__tests__/__snapshots__/PipeCommand-test.tsx.snap @@ -148,7 +148,7 @@ exports[`should render correctly for gradle: branches enabled 1`] = ` key: \\"\${CI_JOB_NAME}\\" paths: - .sonar/cache - script: gradle sonarqube + script: gradle sonar allow_failure: true only: - merge_requests @@ -171,7 +171,7 @@ exports[`should render correctly for gradle: branches not enabled 1`] = ` key: \\"\${CI_JOB_NAME}\\" paths: - .sonar/cache - script: gradle sonarqube + script: gradle sonar allow_failure: true only: - merge_requests diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Gradle.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Gradle.tsx index 29755547ddc..be3551b9c10 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Gradle.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/Gradle.tsx @@ -31,7 +31,7 @@ const JENKINSFILE_SNIPPET = `node { } stage('SonarQube Analysis') { withSonarQubeEnv() { - sh "./gradlew sonarqube" + sh "./gradlew sonar" } } }`; diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/__tests__/__snapshots__/Gradle-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/__tests__/__snapshots__/Gradle-test.tsx.snap index a6458f4cf17..dacb1238ea2 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/__tests__/__snapshots__/Gradle-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/buildtool-steps/__tests__/__snapshots__/Gradle-test.tsx.snap @@ -28,7 +28,7 @@ sonar { } stage('SonarQube Analysis') { withSonarQubeEnv() { - sh \\"./gradlew sonarqube\\" + sh \\"./gradlew sonar\\" } } }" diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaGradle.tsx b/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaGradle.tsx index c53753f360b..11609d1fe67 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaGradle.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/JavaGradle.tsx @@ -40,7 +40,7 @@ export default function JavaGradle(props: JavaGradleProps) { }`; const command = [ - './gradlew sonarqube', + './gradlew sonar', `-Dsonar.projectKey=${component.key}`, `-Dsonar.host.url=${baseUrl}`, `-Dsonar.login=${token}`, diff --git a/server/sonar-web/src/main/js/components/tutorials/other/commands/__tests__/__snapshots__/JavaGradle-test.tsx.snap b/server/sonar-web/src/main/js/components/tutorials/other/commands/__tests__/__snapshots__/JavaGradle-test.tsx.snap index 1054fc3fccf..d40117206ec 100644 --- a/server/sonar-web/src/main/js/components/tutorials/other/commands/__tests__/__snapshots__/JavaGradle-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/tutorials/other/commands/__tests__/__snapshots__/JavaGradle-test.tsx.snap @@ -46,7 +46,7 @@ exports[`renders correctly 1`] = `