When developing software, it is common to incorporate external command-line tools as a part of the build and deployment process. BuildMaster facilitates this need and allows for automatic execution of a command line utility on a remote build server.
Have the ajaxmin executable and a website with the script to be minified already on the remote server (usually previous operations in your BuildMaster deployment plan would have put them there):
First, create a General block so that server context can be set (server context can also be set in the pipeline). In this case the server is VM-BMCP-1A.
Next add the Execute Process operation adding the file name, arguments, and directory.
Once saved , every time the build is executed, the example.js file will be minified into example.min.js.
Note that in this example, two separate file names are used simply to compare the results, but you may wish to use the same file name for the output file so that you do not have to modify any script tags in your web site. Here is a comparison of the files:
It’s worth mentioning that BuildMaster will log all stdout and stderr messages (and if configured, fail the build if stderr is written to).
Using the Execute Process operation, it is trivial to automate a variety of deployment tasks. Some other common examples include: