Speed up ci/e2e builds (#3130)

* Make use of multi-thread builds of maven

* Bump up maven version to get rid of parallel build bug

* Apply the same to E2E tests

* Apply the same to JavaDoc task

* Revert E2E settings

* Add maven tuning opts

* Increase maven fork process memory
This commit is contained in:
kezhenxu94 2019-07-21 10:08:39 +08:00 committed by 吴晟 Wu Sheng
parent 6de3e55280
commit 3fd1f072f1
3 changed files with 18 additions and 4 deletions

View File

@ -1 +1 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip

10
Jenkinsfile vendored
View File

@ -28,6 +28,10 @@ pipeline {
timeout time: 60, unit: 'MINUTES' timeout time: 60, unit: 'MINUTES'
} }
environment {
MAVEN_OPTS = '-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -Xmx3g'
}
stages { stages {
stage('Install & Test') { stage('Install & Test') {
parallel { parallel {
@ -60,8 +64,10 @@ pipeline {
stage('Test & Report') { stage('Test & Report') {
steps { steps {
sh './mvnw -P"agent,backend,ui,dist,CI-with-IT" org.jacoco:jacoco-maven-plugin:0.8.3:prepare-agent clean install org.jacoco:jacoco-maven-plugin:0.8.3:report coveralls:report' // separate lightweight checks that don't support parallel run
sh './mvnw javadoc:javadoc -Dmaven.test.skip=true' sh './mvnw checkstyle:check apache-rat:check'
sh './mvnw -Dcheckstyle.skip -Drat.skip -T2 -Dmaven.compile.fork -Dmaven.compiler.maxmem=3072 -P"agent,backend,ui,dist,CI-with-IT" org.jacoco:jacoco-maven-plugin:0.8.3:prepare-agent clean install org.jacoco:jacoco-maven-plugin:0.8.3:report coveralls:report'
sh './mvnw -DskipTests -Dcheckstyle.skip -Drat.skip -T 2C javadoc:javadoc'
} }
} }
} }

View File

@ -25,6 +25,10 @@ pipeline {
jdk 'JDK 1.8 (latest)' jdk 'JDK 1.8 (latest)'
} }
environment {
MAVEN_OPTS = '-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -Xmx3g'
}
stages { stages {
stage('Checkout Source Code') { stage('Checkout Source Code') {
steps { steps {
@ -36,7 +40,11 @@ pipeline {
stage('Prepare Distribution Package') { stage('Prepare Distribution Package') {
steps { steps {
sh './mvnw -DskipTests clean package' // although these checks are done in ci-it, since they are lightweight/cheap
// we're using them as a barrier here to filter out some invalid PRs (fast-fail)
// thus save unnecessary E2E builds(which is expensive)
sh './mvnw checkstyle:check apache-rat:check'
sh './mvnw -Dcheckstyle.skip -Drat.skip -T2 -Dmaven.compile.fork -Dmaven.compiler.maxmem=3072 -DskipTests clean package'
sh 'tar -zxf dist/apache-skywalking-apm-bin.tar.gz -C dist' sh 'tar -zxf dist/apache-skywalking-apm-bin.tar.gz -C dist'
} }
} }