speed up the CI/CD

the existing CI/CD process in the team is extremely slow, its always taking 20+ minutes to complete, and in extreme cases, its taking 50+ minutes.

These are some steps i am taking to speed up the process:

besides leveraging on maven parallel builds

mvn clean install/verify/package -T xC

the test stage could also be put into parallel mode in newer version of maven, the change is needed is:

    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>3.0.0</version>
    <configuration>
        <forkCount>3</forkCount>. <!---leverage on fork, which is spin up parallel process, instead of concurrent threads-->
        <reuseForks>true</reuseForks>
        <argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
        <systemPropertyVariables>
            <databaseSchema>MY_TEST_SCHEMA_${surefire.forkNumber}</databaseSchema>
        </systemPropertyVariables>
        <workingDirectory>FORK_DIRECTORY_${surefire.forkNumber}</workingDirectory>
    </configuration>
  </plugin>

in addition, to the maven incrementalCompiliation.

the trick is false is for true, which is using incrementalCompilation.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s