jenkins the definitive guide

(Jeff_L) #1
<scanIntervalSeconds>10</scanIntervalSeconds>
<connectors>
<connector
implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>${jetty.port}</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
<stopKey>foo</stopKey>
<stopPort>9999</stopPort>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
...
</plugins>
</build>
</project>

This will start up an instance of Jetty and deploy your web application to it just before the integration
tests, and shut it down afterwards.


Finally, you need to run the JMeter performance tests during this phase. You can do this by using the
maven-antrun-plugin to invoke the Ant script we wrote earlier on during the integration test phase:


<project...>
...
<profiles>
<profile>
<id>performance</id>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.4</version>
<executions>
Free download pdf