This is a teamcity plugin that allows you to re run previous builds with the same parameters.
A few TeamCity libraries are needed to develop this plugin. Install TeamCity locally and specify the install path in
build.properties
. This should auto resolve the libraries location (including source and documentation).
Otherwise you can copy the libraries manually from another TeamCity install and import them yourself.
The Following paths are taken from $TEAMCITY_HOME
- devPackage/agent-api.jar
- devPackage/common-api.jar
- devPackage/runtime/runtime-util.jar
- devPackage/server-api.jar
- webapps/ROOT/WEB-INF/lib/annotations.jar
- webapps/ROOT/WEB-INF/lib/jdom.jar
- webapps/ROOT/WEB-INF/lib/openapi.jar
- webapps/ROOT/WEB-INF/lib/spring-webmvc.jar
- webapps/ROOT/WEB-INF/lib/spring.jar
- webapps/ROOT/WEB-INF/lib/util.jar
- lib/servlet-api.jar
- devPackage/src/openApi-source.jar
- devPackage/javadoc/openApi-help.jar
You may need to set your path variable 'TeamCityDistribution' in IntelliJ's settings to wherever you have TC installed
Run the Ant task 'dist'. This will produce a zip file under dist/
. Copy this zip file into your TeamCity's plugin directory
($TEAMCITY_DATA_PATH/plugins
) and restart TeamCity to install the plugin.
Spring does a bit of magic when it comes to the beans (src/META-INF/build-server-plugin-rerun.xml
)
- Omitted constructor arguments will attempt to be autowired. This works for some arguments but not others, have fun working it out
- Accessing includeUrl files use a path of format
/plugins/reRunPlugin/rerun.jsp
wherererun.jsp
is actually located underresources/buildServerResources/rerun.jsp
- Setting up resource paths that don't end with
.html
must begin with/app
in both the controller and references to it. - Controllers handle the server's context path behind the scene but references to that path will need to factor it in.
Use
${pageContext.request.contextPath}
before your controller's path to accommodate for it (e.gaction="${pageContext.request.contextPath}/app/rerun"
where the controller path is/app/rerun
) - The current user can be accessed via
SessionUser.getUser(request)
whererequest
is aHttpServletRequest
- Show a notification if a run started successfully