Skip to content

Commit 435932e

Browse files
authored
Merge pull request #14863 from wordpress-mobile/add/buildkite-lint
BuildKite integration for Lint tasks
2 parents d01c50b + 7424820 commit 435932e

File tree

4 files changed

+42
-1
lines changed

4 files changed

+42
-1
lines changed

.buildkite/pipeline.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
docker-container: &docker-container
2+
plugins:
3+
- docker#v3.8.0:
4+
image: "wordpressmobile/android-build-image"
5+
environment:
6+
- "CI=true"
7+
8+
steps:
9+
- label: "checkstyle"
10+
<<: *docker-container
11+
command: |
12+
cp gradle.properties-example gradle.properties
13+
./gradlew checkstyle
14+
- label: "ktlint"
15+
<<: *docker-container
16+
command: |
17+
cp gradle.properties-example gradle.properties
18+
./gradlew ciktlint
19+
- label: "detekt"
20+
<<: *docker-container
21+
command: |
22+
cp gradle.properties-example gradle.properties
23+
./gradlew WordPress:detekt
24+
- label: "lint"
25+
<<: *docker-container
26+
command: |
27+
cp gradle.properties-example gradle.properties
28+
./gradlew lintWordpressVanillaRelease

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ buildScan {
117117
termsOfServiceAgree = 'yes'
118118
tag 'CI'
119119
publishAlways()
120+
// Otherwise CI might shut down before it's uploaded
121+
uploadInBackground = false
120122
}
121123
}
122124

gradle.properties-example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# These are the default Gradle properties for WordPress-Android
44
# Feel free to tweak them for your machine (e.g. change -Xmx value below)
5-
org.gradle.jvmargs=-Xmx1536m -XX:+HeapDumpOnOutOfMemoryError
5+
org.gradle.jvmargs=-Xmx6g -XX:+HeapDumpOnOutOfMemoryError
66
org.gradle.parallel=true
77
org.gradle.configureondemand=true
88
org.gradle.caching=true

settings.gradle

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,14 @@ if (localBuilds.exists()) {
7979
}
8080
}
8181

82+
// Build cache is only enabled for CI, at least for now
83+
if (System.getenv().containsKey("CI")) {
84+
buildCache {
85+
remote(HttpBuildCache) {
86+
url = "http://10.0.2.215:5071/cache/"
87+
allowUntrustedServer = true
88+
allowInsecureProtocol = true
89+
push = true
90+
}
91+
}
92+
}

0 commit comments

Comments
 (0)