This plugin allows for the execution of a NAnt build as a build step.
This plugin provides functionality similar to the Ant features built in to Jenkins. Windows environments and non-Windows environments, running NAnt via Mono, are supported.
Using the plugin without any configuration (recommended)
If the NAnt executable is in your system's path, then you can use the default executable without any further configuration. Unless there is a need to use multiple versions of NAnt, this approach is recommended rather than configuring an installation.
Windows: the default executable is NAnt.exe
Other OS's: the default executable is nant
Configuring a NAnt installation (optional)
- Go to the Jenkins configuration page (i.e. http(s)://<your-jenkins-url>/configure)
- Add a new NAnt installation in the NAnt Builder section
- Enter a name for the installation (i.e. nant-0.86-beta1)
- Enter the NAnt home directory.
Windows: this must be a directory where the nant executable can be found from the relative path .\bin\NAnt.exe
Other OS's (Mac, Linux, etc.): this must be a directory where the NAnt executable can be found from the relative path ./bin/nant
Note: If you have a master-slave configuration where one node is running on Windows and the other running on a Unix-based platform, you can configure a NAnt installation based on the node you wish to target. Even if the plugin shows validation errors, you will still be able to save the configuration. There are future plans to clean this functionality up, but for now you will just have to ignore any validation errors.
Adding a NAnt build step
- Open the configuration for a new or existing Jenkins freestyle build job
- In the "Build" section, add a new "Top Level NAnt Target" build step
- Choose a NAnt installation from the dropdown
- Optionally enter a build file
- The build file path, if entered, is relative to the workspace root directory
- Optionally enter targets (separate multiple targets by a space)
- Click the "Advanced" button to enter optional property definitions.
Property definitions are entered 1 per line, in the following format: property1=value1 property2=value2 ... propertyN=valueN
Use of build parameters is supported when setting property values build.config=$buildConfiguration
Version 1.4.3 (Nov 1, 2012)
- integrated pull #1 allow nant plugin to be seen as a valid builder in the Conditional BuildStep Plugin
Version 1.4.2 (Aug 5, 2011)
- Update for Jenkins
Version 1.4.1 (Mar 4, 2010)
- The default executable will now be chosen based on the platform of the node that NAnt is running on. Previously, the default executable was being chosen based on the platform that the master node was running on, even if a build was being done on a slave node.
- Resolved an issue regarding the configuration and execution of the NAnt plugin on non-Windows pltforms (i.e. Linux, Mac, etc.) (JENKINS-4504)
- Changed the supported/dependent Hudson version to 1.347
- Added the ability to set property values that will be passed to a
- This is equivalent to the functionality provided by the Ant task.
- Fixed a bug in using multiple NAnt (JENKINS-1977)