The Crawler-Lib Build Tools are a build automation, tesing and integration toolbox made with PowerShell. It works with any PowerShell host, even the NuGet package manager console in Visual Studio and on nearly every continious integration server under Windows.
Agile Build Tools
Crawler-Lib provides several projects with very different needs in the build process which aren’t satisfied that good by the existing tools. The powershell based build tools are made to become more flexible and agile in the build process and are used in all of our projects.
The Build Tools are designed to work in conjunction with the typical build automation software on the .NET platform like MSBuild, NAnt and PSake. By executing a buld sequence the external build tools can be triggered, the build can be validated and tested with the typical unit test frameworks and can be packaged. In conjunction with the PowerShell ISE (which is in fact installed on every Windows machine) the build sequence can be debugged step by step.
A Build Tools build sequence can perform the complete integration on the desktop machine of the developer. So the design developement and test of the integration process can be made on a standard configured developer machine. This is a triggered or one-shot integration process. To make the integration continious, the build sequence can be simply triggered on any kind of continious integration server that is able to execute PowerShell.
Every developer machine becomes a build machine. So it is possible to pre-test the changes before a commit or a sync is performed. A gated commit can also be implemented with ease, using different branches on the VCS. Special support from the CI server is not needed. This reduces significantly the chance that trivial changes break the build.
Agile Software Developement
The developement of the integration (building, testing, packaging, deploying, …) is not a question of tools and processes, it is about people knowing the product best. Everyone can forge the code and extend the build sequences because the build process is decentralized. Developers can interact and discuss different aspects of the integration process.
Due to the mix of easy to read XML build configurations and inline PowerShell code the integration process needs nearly no documentation. It is self explanatory. Collaboration with the customer is easier because the integration process can be discussed and extended on normal developer machines. No build server is needed to test new steps. It is easy to respond to changes, because the integration can be altered on the developer machine and simply be distributed to the build server by merging the codebase in the baseline. By taking the credentials out of the build process, developers can work against a sandboxed test and deployment environment.
Download and Installation
Before the Build-Tools can be installed, The execution of scripts on the local machine must bne activated:
The PowerShell Build-Tools need the following prerequisites installed:
- Powershell Community Extensions (PSCX)
- Powershell-Zip Commandlet
- Versioning Controlled Build
- NuGet Command Line (Bootstrapper)
The newest Build tools release can be found at Build Tools Downloads.
After downloading the build tools, execute Install.cmd with Administrator rights. This will install the Build tools in 32 Bit and 64 Bit Powershell if available.
To enable IntelliSense in Visual Studio go to
Tools > Options > Text Editor > XML > Miscellaneous and enable
Network > Automatically download DTDs and schemas to allow the XML schema download. After that store the XML below under BuildConfig.xml in your new project:
<?xml version="1.0" encoding="utf-8"?>
<!-- Build Configuration for -->
<!-- Specify the artifacts and current build XML file location and name-->
<!-- Specify the label generation mechanism for new builds -->
<!-- Specify credentials (passwords, keys, URLs, ...) to use in the build steps with $($context.Creadentails.KeyName) -->
<!-- Solution to build -->
<!-- Specify the version generation mechanism for new builds -->
<!-- AppendLabel appends the build label to create the version. The build label must be in the format Build.Revision -->
<!-- Build Sequences are lists of build steps that can be executed. It is a good practice to implement the sequences New-Build, Test-Build, Complete-Build and Publish-Build -->
<!-- Specify the build steps to perform a new build -->
<!-- Specify the build steps to test the current build -->
<BuildSequence Name="Test-Build" NewBuild="false" Depends="New-Build">
<!-- Specify the build steps to complete the current build -->
<BuildSequence Name="Complete-Build" NewBuild="false" Depends="Test-Build">
<!-- Specify the build steps to publish the current build -->
<BuildSequence Name="Publish-Build" NewBuild="false" Depends="Complete-Build">
IntellSense should become available.
You may also look at Build Tools Configuration and Samples