Skip to content

Commit c02836b

Browse files
authored
SONARTEXT-69 Gradle add fastBuild task (#304)
1 parent a92258b commit c02836b

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

.cirrus.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ env:
2828
ORG_GRADLE_PROJECT_signingPassword: VAULT[development/kv/data/sign data.passphrase]
2929
ORG_GRADLE_PROJECT_signingKeyId: 0x7DCD4258
3030
GRADLE_USER_HOME: ${CIRRUS_WORKING_DIR}/.gradle
31-
GRADLE_COMMON_FLAGS: --console plain
31+
GRADLE_COMMON_FLAGS: --console plain --no-daemon
3232

3333
win_vm_definition: &WINDOWS_VM_DEFINITION
3434
ec2_instance:
@@ -105,7 +105,7 @@ ws_scan_task:
105105
<<: *SETUP_GRADLE_CACHE
106106
whitesource_script:
107107
- source cirrus-env QA
108-
- ./gradlew ${GRADLE_COMMON_FLAGS} processResources
108+
- GRADLE_OPTS="-Xmx64m -Dorg.gradle.jvmargs='-Xmx1G'" ./gradlew ${GRADLE_COMMON_FLAGS} processResources
109109
- ./export_ws_variables.sh
110110
- source ws_scan.sh
111111
allow_failures: "true"
@@ -124,7 +124,7 @@ qa_plugin_task:
124124
<<: *SETUP_GRADLE_CACHE
125125
plugin_script:
126126
- source cirrus-env QA
127-
- ./gradlew ${GRADLE_COMMON_FLAGS} -Dsonar.runtimeVersion=${SQ_VERSION} :its:plugin:check
127+
- ./gradlew ${GRADLE_COMMON_FLAGS} -Dsonar.runtimeVersion=${SQ_VERSION} :its:plugin:integrationTest
128128
<<: *CLEANUP_GRADLE_CACHE_SCRIPT
129129

130130
qa_ruling_task:
@@ -133,7 +133,7 @@ qa_ruling_task:
133133
<<: *SETUP_GRADLE_CACHE
134134
ruling_script:
135135
- source cirrus-env QA
136-
- ./gradlew ${GRADLE_COMMON_FLAGS} -Dsonar.runtimeVersion=LATEST_RELEASE :its:ruling:check
136+
- ./gradlew ${GRADLE_COMMON_FLAGS} -Dsonar.runtimeVersion=LATEST_RELEASE :its:ruling:integrationTest
137137
<<: *CLEANUP_GRADLE_CACHE_SCRIPT
138138

139139
promote_task:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ This component helps you prevent the leakage of secrets even before you push the
2424
Simple build skipping integration tests.
2525

2626
```shell
27-
./gradlew build -x integrationTest
27+
./gradlew build
2828
```
2929

3030
Full build including integration tests.
3131

3232
```shell
33-
./gradlew build
33+
./gradlew build integrationTest
3434
```
3535

3636
### Apply code formatting.
@@ -75,7 +75,7 @@ After the change, addition or removal of secret specifications, this script can
7575
for the inclusion or deletion of these secrets and to update static RSPEC files.
7676

7777
As we use the enforcer plugin to define a file size of the build, this can lead to test failures after adding new secret specifications.
78-
The `<minsize>` and `<maxsize>` can be changed in `sonar-text-plugin/pom.xml`.
78+
The `<minsize>` and `<maxsize>` can be changed in `sonar-text-plugin/build.gradle.kts` (search for `enforceJarSize`).
7979
```shell
8080
./secretSpecificationInclusionGenerator.sh
8181
```

build-logic/src/main/kotlin/org.sonarsource.text.integration-test.gradle.kts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,3 @@ val integrationTestTask = tasks.register<Test>("integrationTest") {
1818
classpath = configurations[integrationTest.runtimeClasspathConfigurationName] + integrationTest.output
1919
}
2020

21-
tasks.check {
22-
dependsOn(integrationTestTask)
23-
}
24-

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ plugins {
55
}
66

77
tasks.artifactoryPublish { skip = true }
8+

0 commit comments

Comments
 (0)