Internet Explorer is no longer supported. Many things will still work, but your experience will be degraded and some things won't function. Please use a modern browser such as Edge, Chrome, or Firefox.

Deploy Windows Service Script Template

view on GitHub

A script template is a simple, no-code solution for performing common build or deployment operations, and can be converted to OtterScript at any time.

The Deploy Windows Service script template will:

This article will detail the options for these steps, as well as how they're performed.

Using this Script Template

To add this script template to your application, navigate to Scripts, click "Add Script", and then select "Deploy Windows Service" from the list of Deploy Script Templates. After doing so, you'll see a dialog like this:

This article will discuss how these options work in the deployment process.

Stop Windows Service

First, the script template will stop the specified Windows service, and waits for the service to be stopped.

Deploying Artifact

The script template will deploy an artifact to the specified path, such as C:\Apps\MyApp. To reduce deployment time, an incremental deployment approach will copy only the files that changed. A file is considered to be changed if the file size or last-modified-on date is different. To learn more, see Build Artifacts for more details.

Additional Artifact Options

On the "Artifact options" tab, there are two fields you can set:

  • Artifact name is the name of the artifacts file attached to your build; the default name for this file is Default, but you may have named it something different when creating it
  • Transfer all files will not use the incremental deployment method, and instead transfer all files; this may be helpful if your file has thousands of small files, and it's simply quicker to deploy them all instead of compare them

Deploying Config Files

If you selected an option for the "Configuration file" field, the script template will deploy or transform a configuration file.

Deploy BuildMaster Configuration File

If "Deploy BuildMaster Configuration File" is selected, you must have first created a configuration file in your BuildMaster application. You may select this configuration file from the Config File Options tab to include it as part of your deployment.

Transform Config File

If "Transform config file" is selected, the script template will use the Microsoft web.config transformation process to create a configuration file from a "base config file" and a "transform config file". Both the base and transform config files should be included in the artifact that was already deployed.

This feature can be used for any files that follow Microsoft's transformation format, even those that are not web.config files.

Start Windows Service

Finally, the script template will start the specified Windows service.