- gradle
- sonar
script:
- - bash ./gradlew sonarqube
+ - bash ./gradlew sonar
caches:
sonar: ~/.sonar
- gradle
- sonar
script:
- - bash ./gradlew sonarqube
+ - bash ./gradlew sonar
caches:
sonar: ~/.sonar
- gradle
- sonar
script:
- - bash ./gradlew sonarqube
+ - bash ./gradlew sonar
caches:
sonar: ~/.sonar
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;
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"
/>
<FinishButton
onClick={[MockFunction]}
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"
/>
<FinishButton
onClick={[MockFunction]}
}
const BUILD_TOOL_SPECIFIC = {
- [BuildTools.Gradle]: { image: 'gradle:jre11-slim', script: () => 'gradle sonarqube' },
+ [BuildTools.Gradle]: { image: 'gradle:jre11-slim', script: () => 'gradle sonar' },
[BuildTools.Maven]: {
image: 'maven:3.6.3-jdk-11',
script: (projectKey: string) => `
key: \\"\${CI_JOB_NAME}\\"
paths:
- .sonar/cache
- script: gradle sonarqube
+ script: gradle sonar
allow_failure: true
only:
- merge_requests
key: \\"\${CI_JOB_NAME}\\"
paths:
- .sonar/cache
- script: gradle sonarqube
+ script: gradle sonar
allow_failure: true
only:
- merge_requests
}
stage('SonarQube Analysis') {
withSonarQubeEnv() {
- sh "./gradlew sonarqube"
+ sh "./gradlew sonar"
}
}
}`;
}
stage('SonarQube Analysis') {
withSonarQubeEnv() {
- sh \\"./gradlew sonarqube\\"
+ sh \\"./gradlew sonar\\"
}
}
}"
}`;
const command = [
- './gradlew sonarqube',
+ './gradlew sonar',
`-Dsonar.projectKey=${component.key}`,
`-Dsonar.host.url=${baseUrl}`,
`-Dsonar.login=${token}`,
<CodeSnippet
snippet={
Array [
- "./gradlew sonarqube",
+ "./gradlew sonar",
"-Dsonar.projectKey=projectKey",
"-Dsonar.host.url=host",
"-Dsonar.login=token",