<%@ page isELIgnored="true" %> <%@ taglib uri="cms" prefix="cms" %> Build Tools

Build Tools

AnthillPro integrates with many build tools to support building and deploying. The integrations are implemented as job steps that allow you to execute a script written in any scripting language. For most tools, you can write your scripts within the AnthillPro UI.

When you set up your build process, the integration is added as a single step that executes your build script. For your deployment process, you use the tool to execute your deploy script that moves the artifacts to their destination.

Ant

The builder is added to your AnthillPro project as a job step. Typically, the Build step is added after a Cleanup, Populate Workspace, Stamp, and Get Dependency Artifacts step of a build job; however, your job configuration may vary (see Create a New Job). The builder is also used to perform deployments, and is added to the deployment workflow as a job step (see Create a Deployment Job).

You can write the build/deploy script within the AnthillPro UI on the Script Content tab. Or, you can write the script outside of AnthillPro and then have the server run that file.

To use Ant as part of your build or deployment process:

  1. Follow the instructions for project creation given in Setting Up a Build Process if you are building a project.

    Or:

    Follow the instructions for Setting Up a Deployment Process if you are deploying the artifacts.

  2. When you get to the Builder step, configure the Builder:

    • Name the builder. This name will be used by the AnthillPro system.

    • Working Directory Offset. Enter the working directory to use when executing this command. This is relative to current working directory (blank for the current). For some build systems, there will be a subdirectory named after the project or module.

    • Ant Script File. Give the name of the Ant script file.

    • Target Name. Enter the name of the target to run in the Ant script file.

    • Ant Properties. Give the Ant-specific arguments, such as using -v for verbose output.

    • Ant Configuration. Enter the path to the version of Ant that will be used to run the build script. If every agent that might run a build has this configured in the same location, a simple path can be entered here. More commonly, the location will vary between agents, so AnthillPro supports using a simple expression language to lookup environment variables on the agent. You may need to create an environment variable on each agent (either at those agents, or in the Agent sections under the Environment menu) with the path.

    • JVM Configuration. Give the path to the Java version used to compile the code. If every agent that might run a build has this configured in the same location, a simple path can be entered here. More commonly, the location will vary between agents, so AnthillPro supports using a simple expression language to lookup environment variables on the agent. You may need to create an environment variable on each agent (either at those agents, or in the Agent sections under the Environment menu) with the path.

    • JVM Properties. Enter the properties passed to the JVM.

    • Show Additional Options (advanced). Select the Show Additional Options link to configure more options.

      • Is Active. Select No to temporarily deactivate the step without deleting it; otherwise select Yes.

      • Pre-Condition Script. From the drop down menu, select the condition which must be met for the step to continue. Before editing an existing script or creating a new one, see Step Pre-Condition Scripts.

      • Ignore Failures. Select Yes if this step should not effect the determination for step continuation or the status determination of the job.

      • PostProcessingScript. Select a script for determining when commands should count as fail or succeed. See Post Processing Scripts.

      • Timeout. Enter the time in minutes after the start of the step when AnthillPro will consider the step as timed out and abort it.

  3. Ant Properties (optional). Select the Properties tab and provide any additional properties that should be in place when the build runs. These properties are passed to the executable. It is not necessary to escape spaces or use quoted strings. Enter each property on a separate line in the following format: name=value.

  4. Ant Environment Variables (optional). Select the Environment Variables tab to provide any additional variables that should be in place when the build runs. Environment variable values may contain references to existing values in the following format: name=${env/<NAME>};value. If the value of the <NAME> variable is value2 in the current environment, then the above example will be expanded to: name=value2;value. Using this technique, it is possible add an entry to PATH in the following manner: PATH=my/path/entry;0. Case is significant even on Windows systems.

  5. Ant Script Content. Here, you can write the build/deploy script directly in the AnthillPro UI. Click the Script Content tab to define the content of the Ant script in this step. The content will be written to file when executed.

  6. Click Save.

Groovy (Builder)

The builder is added to your AnthillPro project as a job step. Typically, the Build step is added after a Cleanup, Populate Workspace, Stamp, and Get Dependency Artifacts step of a build job; however, your job configuration may vary (see Create a New Job). The builder is also used to perform deployments, and is added to the deployment workflow as a job step (see Create a Deployment Job).

You can write the build/deploy script within the AnthillPro UI on the Script Content tab. Or, you can write the script outside of AnthillPro and then have the server run that file.

To use Groovy as part of your build or deployment process:

  1. Follow the instructions for project creation given in Setting Up a Build Process if you are building a project.

    Or:

    Follow the instructions for Setting Up a Deployment Process if you are deploying the artifacts.

  2. When you get to the Builder step, configure the Builder:

    • Name the builder. This name will be used by the AnthillPro system.

    • Working Directory Offset. Enter the working directory to use when executing this command. This is relative to current working directory (blank for the current).

    • Groovy Script File. Give the name of the Groovy script file.

    • Groovy Location. Enter the path to the version of Groovy that will be used to run the build script.

    • Show Additional Options (advanced). Select the Show Additional Options link to configure more options.

      • Is Active. Select No to temporarily deactivate the step without deleting it; otherwise select Yes.

      • Pre-Condition Script. From the drop down menu, select the condition which must be met for the step to continue. Before editing an existing script or creating a new one, see Step Pre-Condition Scripts.

      • Ignore Failures. Select Yes if this step should not effect the determination for step continuation or the status determination of the job.

      • PostProcessingScript. Select a script for determining when commands should count as fail or succeed. See Post Processing Scripts.

      • Timeout. Enter the time in minutes after the start of the step when AnthillPro will consider the step as timed out and abort it.

  3. Groovy Properties (optional). Select the Properties tab and provide any additional properties that should be in place when the build runs. These properties are used as if they were passed to the Groovy executable on the command line. Enter each property on a separate line.

  4. Groovy Environment Variables (optional). Select the Environment Variables tab to provide any additional variables that should be in place when the build runs. Environment variable values may contain references to existing values in the following format: name=${env/<NAME>};value. If the value of the <NAME> variable is value2 in the current environment, then the above example will be expanded to: name=value2;value. Using this technique, it is possible add an entry to PATH in the following manner: PATH=my/path/entry;0. Case is significant even on Windows systems.

  5. Groovy Script Content. Here, you can write the build/deploy script directly in the AnthillPro UI. Click the Script Content tab to define the content of the Groovy script in this step. The content will be written to file when executed.

  6. Click Save.

Make

The builder is added to your AnthillPro project as a job step. Typically, the Build step is added after a Cleanup, Populate Workspace, Stamp, and Get Dependency Artifacts step of a build job; however, your job configuration may vary (see Create a New Job). The builder is also used to perform deployments, and is added to the deployment workflow as a job step (see Create a Deployment Job).

To use Make as part of your build or deployment process:

  1. Follow the instructions for project creation given in Setting Up a Build Process if you are building a project.

    Or:

    Follow the instructions for Setting Up a Deployment Process if you are deploying the artifacts.

  2. When you get to the Builder step, configure the Builder:

    • Name the builder. This name will be used by the AnthillPro system.

    • Working Directory Offset. Enter the working directory to use when executing this command. This is relative to current working directory (blank for the current).

    • Make File Name. Give the name of the Make file in the source repository. This only needs to be set if you use a non-standard Make file name.

    • Make Targets. Enter the target(s) to execute in the Make file. The default target will be executed if you do not specify any here. If entering multiple targets, separate each target with a space just as you would on the command line. (optional).

    • Command-line Arguments. Specify any additional command line arguments to pass to Make. Enter them exactly as they would appear on the command line.

    • Show Additional Options (advanced). Select the Show Additional Options link to configure more options.

      • Is Active. Select No to temporarily deactivate the step without deleting it; otherwise select Yes.

      • Pre-Condition Script. From the drop down menu, select the condition which must be met for the step to continue. Before editing an existing script or creating a new one, see Step Pre-Condition Scripts.

      • Ignore Failures. Select Yes if this step should not effect the determination for step continuation or the status determination of the job.

      • PostProcessingScript. Select a script for determining when commands should count as fail or succeed. See Post Processing Scripts.

      • Timeout. Enter the time in minutes after the start of the step when AnthillPro will consider the step as timed out and abort it.

  3. Make Environment Variables (optional). Select the Environment Variables tab to provide any additional variables that should be in place when the build runs. Environment variable values may contain references to existing values in the following format: name=${env/<NAME>};value. If the value of the <NAME> variable is value2 in the current environment, then the above example will be expanded to: name=value2;value. Using this technique, it is possible add an entry to PATH in the following manner: PATH=my/path/entry;0. Case is significant even on Windows systems.

  4. Click Save.

Maven (Builder)

The builder is added to your AnthillPro project as a job step. Typically, the Build step is added after a Cleanup, Populate Workspace, Stamp, and Get Dependency Artifacts step of a build job; however, your job configuration may vary (see Create a New Job). The builder is also used to perform deployments, and is added to the deployment workflow as a job step (see Create a Deployment Job).

If you are a Maven 2 user, you can configure AnthillPro to act as a Maven repository. This enables AnthillPro to provide extended visibility into Maven's dependency-management capabilities. See Maven 2.

To use the Maven builder as part of your build or deployment process:

  1. Follow the instructions for project creation given in Setting Up a Build Process if you are building a project.

    Or:

    Follow the instructions for Setting Up a Deployment Process if you are deploying the artifacts.

  2. When you get to the Builder step, configure the Builder:

    • Name the builder. This name will be used by the AnthillPro system.

    • Working Directory Offset. Enter the working directory to use when executing this command. This is relative to current working directory (blank for the current).

    • Maven File Path. Location of the project.xml or pom.xml file relative to the project root. If your .xml file is in the root of the project, then leave this blank.

    • Maven Goal. The name of the goal/target to run. If there are multiple goals enter them in order separated by a space

    • Maven Properties. The name of the goal/target to run. If there are multiple goals enter them in order separated by a space

    • Maven Home. The path to the installation of Maven that will be used.

    • Maven Version. The version of maven that will be used. Select either 1.x or 2.x.

      If you are using the Maven 2 integration to allow AnthillPro to manage dependencies, you must select Maven 2 from the drop-down menu. See Maven 2 for more about the integration.
    • Java Home. The path to the installation of Java for Maven to use.

    • JVM Properties. Properties passed to the JVM.

    • Show Additional Options (advanced). Select the Show Additional Options link to configure more options.

      • Is Active. Select No to temporarily deactivate the step without deleting it; otherwise select Yes.

      • Pre-Condition Script. From the drop down menu, select the condition which must be met for the step to continue. Before editing an existing script or creating a new one, see Step Pre-Condition Scripts.

      • Ignore Failures. Select Yes if this step should not effect the determination for step continuation or the status determination of the job.

      • PostProcessingScript. Select a script for determining when commands should count as fail or succeed. See Post Processing Scripts.

      • Timeout. Enter the time in minutes after the start of the step when AnthillPro will consider the step as timed out and abort it.

  3. Maven Properties (optional). Select the Properties tab and provide any additional properties that should be in place when the build runs. These properties are used as if they were passed to the maven executable on the command line. Enter each properties on a separate line in the following format: -Dname=value.

  4. Maven Environment Variables (optional). Select the Environment Variables tab to provide any additional variables that should be in place when the build runs. Environment variable values may contain references to existing values in the following format: name=${env/<NAME>};value. If the value of the <NAME> variable is value2 in the current environment, then the above example will be expanded to: name=value2;value. Using this technique, it is possible add an entry to PATH in the following manner: PATH=my/path/entry;0. Case is significant even on Windows systems.

  5. Click Save.

Maven 2

Use the Maven 2 integration to have AnthillPro act as a Maven repository for projects built in AnthillPro, as well as a caching proxy for external Maven repositories. Once the external Maven repository is configured on the System page, AnthillPro will get the artifacts from the Maven and cache them, in the form of Codestation projects, for future use. The integration allows AnthillPro to provide complete visibility into the project dependencies you manage using Maven 2.

The integration allows you to either have the artifacts retrieved from Codestation (AnthillPro's artifact repository) or directly from your Maven repositories. If pulling the artifacts directly from Maven, the system will check for AnthillPro projects first, and then check Maven. When the projects are found in Maven, AnthillPro will replicate the Maven repository in Codestation (AnthillPro's artifact management system) for future use.

When using an external Maven repository, your AnthillPro projects need to be associated with a Life-Cycle Model that contains an artifact set named "maven" (see Using a Maven-specific Life-Cycle Model), and must contain Maven-specific project properties. To use the Maven 2 integration you will need to:

  1. Modify the Maven POM file. To use AnthillPro as a Maven repository, the POM file will need to point to the AnthillPro server.

  2. Modify build agent settings.xml file. The agent must supply the user name and password used to connect to AnthillPro.

  3. Create Maven 2 Repository. Under the Integrations menu on the System page, tell AnthillPro about the repository you want to create. To have AnthillPro act as more than one Maven repository, complete multiple configurations.

  4. Configure Maven 2 Projects. The integration allows you to create both Codestation and Life-Cycle-based projects.

  5. Modify Settings on Developer Machines. Each developer will need change their POM file to point to the correct URL and provide the correct password and username.

When a build is needed, AnthillPro will use it's local cache to fulfill dependencies -- using the most recent version. If the appropriate dependency is not found, it will then retrieve the dependency from your other Maven repositories.

Maven 2 Prerequisites

  • The build agent must be on the same machine as Maven (or Maven must be downloaded with the project).

  • You must have administrative permissions to configure projects and to the System page.

  • You must be able to edit the build agent's settings.xml file.

  • You must be able to edit Maven POM file.

Modify Maven POM File

The POM file must reference what repository AnthillPro should use. To use AnthillPro as a Maven repository, the POM should be similar to the following example:

<project>
 <distributionManagement>
    <repository>
      <id>anthill</id>
      <name>Anthill3 Repo</name>
      <url>${env.AH_WEB_URL}rest/maven2dist/${env.AH_BUILD_LIFE_ID}</url>
    </repository>
    <snapshotRepository>
      <uniqueVersion>false</uniqueVersion>
      <id>anthill</id>
      <name>Anthill3 Repo</name>
      <url>${env.AH_WEB_URL}rest/maven2dist/${env.AH_BUILD_LIFE_ID}</url>
    </snapshotRepository>
  </distributionManagement>
</project>

Because AnthillPro will always favor it's local cache, you may need to add a setting in your POM file to clear the cache before the build occurs. This will ensure AnthillPro retrieves the artifacts from your other Maven repositories for the build.

Modify Build Agent Settings

The build agent settings.xml file must be modified to supply the user name and password (it will be will eventually be obfuscated) for basic authentication with Maven.

The integration allows AnthillPro to also act as a Maven repository for developer dependency resolves, as well as collect the deployed artifacts through AnthillPro builds and for storing dependencies. Your developers will have to make a similar change in their individual setting file or overwrite the URL. See Modify Settings on Developer Machines.

The settings.xml file should be similar to the following:

<settings>
  <servers>
    <server>
      <id>anthill</id>
      <username>username</username>
      <password>password</password>
    </server>
  </servers>
</settings>

Create Maven 2 Repository

The information given here will be used by your AnthillPro projects. If you have more than one Maven repository, create a new repository for each.

  1. Go to System > Maven under the Integrations menu.

    On the Maven Repositories page, determine the dependency trigger type and create new repositories.

  2. Dependency Trigger Type. When AnthillPro detects dependencies between AnthillPro projects through Maven, the type of build trigger that will be automatically created is configured globally, and is based on your current practices defined in your POM file. To set a dependency-trigger strategy, click Edit and choose either No Trigger, Push or Pull.

    • No Trigger. AnthillPro will not use a dependency trigger.

    • Push. See Pushing Builds for more on AnthillPro pushing dependency triggers.

    • Pull. See Pulling Builds for more on AnthillPro pulling dependency triggers.

  3. Maven Repositories. Click Create Repository and configure the repository:

    • Repository Name. Give the name of the repository AnthillPro should retrieve the artifacts from. This is the name set in Maven.

    • Description (optional). Provide a unique description of this repository.

    • URL. Give the exact URL of the Maven repository AnthillPro will retrieve the artifacts from.

    • Proxy. If you need to use a proxy, select it from the drop-down menu.

      If AnthillPro must connect to a Maven 2 repository via a proxy (e.g., it is public or behind a firewall), set up a proxy server before continuing. Once the AnthillPro proxy is set up, associate all the Maven 2 repositories with the AnthillPro proxy that will connect to them. If you have multiple Maven repositories that must be connected via a proxy, configure a separate proxy for each. To configure a proxy:
      1. Select the Maven link under the Integration menu on the System page. Follow the Proxies link on the Maven Settings page.

      2. See Create Server Proxy.

  4. Click Save.

  5. To add another repository, repeat Items 3 and 4 then click Done.

  6. See Configure Maven 2 Projects.

Configure Maven 2 Projects

Basic project configuration is the same as outlined in the Setting Up a Build Process and Using Codestation Projects sections. The instructions below assume you are using the Maven Builder integration for builds and the "Maven Projects" Life-Cycle Model.

Setting project properties. The Maven 2 integration requires you to set specific AnthillPro project properties and use a specialized Life-Cycle Model.

  • Life-Cycle-based projects (for builds). Create a maven.groupId property containing the project's Maven groupId and a maven.artifactId property containing the project's Maven artifactId.

    When Maven publishes artifacts to AnthillPro and parses the published POM file for dependencies, the system will automatically set the correct maven.version property on the Build Life.
  • Codestation projects. Create a maven.groupId property containing the project's Maven groupId and a maven.artifactId property containing the project's Maven artifactId.

    Make sure that the Codestation project includes a POM file if you manually create one. Otherwise, the integration may fail during the resolve or build.

Using a Maven-specific Life-Cycle Model. Any project using the Maven 2 integration must include an artifact set called "maven". The artifacts will then be stored in a folder named 'Maven Projects' when using an external Maven repository. You can either use the "Maven Projects" Life-Cycle Model that ships with AnthillPro (go to System > Project Support > Life-Cycle Models > Maven Projects for an example), or add the "maven" artifact set to an existing Life-Cycle Model.

Modify Settings on Developer Machines

The integration allows AnthillPro to act as a Maven repository for developer dependency resolves, as well as collect the deployed artifacts through AnthillPro builds and for storing dependencies. Each developer will need to change their POM file to point to their local repository URL. It should look something like this:

<project>
   <repositories>
   <repository>
      <id>anthill</id>
      <name>Anthill3 Repo</name>
      <url>http://anthillpro.yourcompany.com:8080/rest/maven2</url>
   </repository>
  </repositories>
</project>

In addition, each developer will need to modify their settings.xml file (similar to what was outlined in the Modify Build Agent Settings section) to provide the correct username and password. It should look something like this:

<settings>
  <servers>
    <server>
      <id>anthill</id>
      <username>username</username>
      <password>password</password>
    </server>
  </servers>
</settings>

MSBuild

The builder is added to your AnthillPro project as a job step. Typically, the Build step is added after a Cleanup, Populate Workspace, Stamp, and Get Dependency Artifacts step of a build job; however, your job configuration may vary (see Create a New Job). The builder is also used to perform deployments, and is added to the deployment workflow as a job step (see Create a Deployment Job).

You can write the build/deploy script within the AnthillPro UI on the Script Content tab. Or, you can write the script outside of AnthillPro and then have the server run that file.

To use MSBuild as part of your build or deployment process:

  1. Follow the instructions for project creation given in Setting Up a Build Process if you are building a project.

    Or:

    Follow the instructions for Setting Up a Deployment Process if you are deploying the artifacts.

  2. When you get to the Builder step, configure the Builder:

    • Name the builder. This name will be used by the AnthillPro system.

    • Working Directory Offset. Enter the working directory to use when executing this command. This is relative to current working directory (blank for the current).

    • Command Path. The full path to msbuild.exe including msbuild.exe (blank if it is on the path).

    • Build File. The name of the build file to execute.

    • Targets. The name of the targets to run. Multiple targets can be separated with semi-colons or commas.

    • Verbosity Level. The verbosity level.

    • Show Additional Options (advanced). Select the Show Additional Options link to configure more options.

      • Is Active. Select No to temporarily deactivate the step without deleting it; otherwise select Yes.

      • Pre-Condition Script. From the drop down menu, select the condition which must be met for the step to continue. Before editing an existing script or creating a new one, see Step Pre-Condition Scripts.

      • Ignore Failures. Select Yes if this step should not effect the determination for step continuation or the status determination of the job.

      • PostProcessingScript. Select a script for determining when commands should count as fail or succeed. See Post Processing Scripts.

      • Timeout. Enter the time in minutes after the start of the step when AnthillPro will consider the step as timed out and abort it.

  3. MSBuild Properties (optional). Select the Properties tab and provide any additional properties that should be in place when the build runs.

    • Properties. These properties are passed to the MSBuild executable. It is not necessary to escape spaces or use quoted strings. Enter each property on a separate line in the following format: name=value (e.g., WarningLevel=2 will become /p:WarningLevel=2 on the command line).

    • Parameters. These parameters are directly passed to the MSBuild executable. It is not necessary to escape spaces or use quoted strings. Enter each parameter on a separate line (e.g., /clp:PerformanceSummary).

  4. MSBuild Environment Variables (optional). Select the Environment Variables tab to provide any additional variables that should be in place when the build runs. Environment variable values may contain references to existing values in the following format: name=${env/<NAME>};value. If the value of the <NAME> variable is value2 in the current environment, then the above example will be expanded to: name=value2;value. Using this technique, it is possible add an entry to PATH in the following manner: PATH=my/path/entry;0. Case is significant even on Windows systems.

  5. MSBuild Script Content. Here, you can write the build/deploy script directly in the AnthillPro UI. Click the Script Content tab to define the content of the Groovy script in this step. The content will be written to file when executed.

  6. Click Save.

Nant

The builder is added to your AnthillPro project as a job step. Typically, the Build step is added after a Cleanup, Populate Workspace, Stamp, and Get Dependency Artifacts step of a build job; however, your job configuration may vary (see Create a New Job). The builder is also used to perform deployments, and is added to the deployment workflow as a job step (see Create a Deployment Job).

You can write the build/deploy script within the AnthillPro UI on the Script Content tab. Or, you can write the script outside of AnthillPro and then have the server run that file.

To use Nant as part of your build or deployment process:

  1. Follow the instructions for project creation given in Setting Up a Build Process if you are building a project.

    Or:

    Follow the instructions for Setting Up a Deployment Process if you are deploying the artifacts.

  2. When you get to the Builder step, configure the Builder:

    • Name the builder. This name will be used by the AnthillPro system.

    • Working Directory Offset. Enter the working directory to use when executing this command. This is relative to current working directory (blank for the current).

    • Nant Script File. The name of the Nant script file.

    • Target Name. The name of the target(s) to run in the Nant script file.

    • Nant Properties. Nant-specific arguments, such as -ext.

    • Nant Location. The path to the version of Nant that will be used to run the build script.

    • Mono Location. The path to the version of mono to run Nant to run with. If this is empty or evaluates to nothing on the agent, mono will not be used.

    • Show Additional Options (advanced). Select the Show Additional Options link to configure more options.

      • Is Active. Select No to temporarily deactivate the step without deleting it; otherwise select Yes.

      • Pre-Condition Script. From the drop down menu, select the condition which must be met for the step to continue. Before editing an existing script or creating a new one, see Step Pre-Condition Scripts.

      • Ignore Failures. Select Yes if this step should not effect the determination for step continuation or the status determination of the job.

      • PostProcessingScript. Select a script for determining when commands should count as fail or succeed. See Post Processing Scripts.

      • Timeout. Enter the time in minutes after the start of the step when AnthillPro will consider the step as timed out and abort it.

  3. Nant Properties (optional). Select the Properties tab and provide any additional properties that should be in place when the build runs. These properties are used as if they were passed to the Nant executable on the command line. Enter each properties on a separate line in the following format: -D:name=value.

  4. Nant Environment Variables (optional). Select the Environment Variables tab to provide any additional variables that should be in place when the build runs. Environment variable values may contain references to existing values in the following format: name=${env/<NAME>};value. If the value of the <NAME> variable is value2 in the current environment, then the above example will be expanded to: name=value2;value. Using this technique, it is possible add an entry to PATH in the following manner: PATH=my/path/entry;0. Case is significant even on Windows systems.

  5. Nant Script Content. Here, you can write the build/deploy script directly in the AnthillPro UI. Click the Script Content tab to define the content of the Groovy script in this step. The content will be written to file when executed.

  6. Click Save.

Shell Builder

The builder is added to your AnthillPro project as a job step. Typically, the Build step is added after a Cleanup, Populate Workspace, Stamp, and Get Dependency Artifacts step of a build job; however, your job configuration may vary (see Create a New Job). The builder is also used to perform deployments, and is added to the deployment workflow as a job step (see Create a Deployment Job).

To use the Shell builder as part of your build or deployment process:

  1. Follow the instructions for project creation given in Setting Up a Build Process if you are building a project.

    Or:

    Follow the instructions for Setting Up a Deployment Process if you are deploying the artifacts.

  2. When you get to the Builder step, configure the Builder:

    • Name the builder. This name will be used by the AnthillPro system.

    • Working Directory Offset. Enter the working directory to use when executing this command. This is relative to current working directory (blank for the current).

    • Interpreter (optional). By default, the following platform-specific command-line behavior will be used when this filed is left blank:

      • Windows: .bat file interpreter.

      • VMS: .com file interpreter.

      • Other systems: the shell specified by 'anthill3/shell' agent variable if present (see Agent Properties). *nix systems may override this by having the Command Line starts with a #! sequence.

      If you need AnthillPro to use a different interpreter to evaluate the command, specify it here.

    • Shell Script. Enter the script to be executed. The script is going to be passed to and run on the native shell of the selected agent.

    • Daemon. Check this option to run the command in the background while permitting the step to complete immediately. AnthillPro does not capture of the output of a daemon command.

      • Output File. Enter the path of the file to which the command output is directed. Leave blank to discard the output. Setting a value for this option does not cause AnthillPro to capture the output as part of the step.

    • Impersonation. Check the box to run the builder as an impersonated user. This option requires the agent run as root on Unix or Local System on Windows. Note that any commands available to the superuser will be available to the agent when impersonation is used.

      Impersonation is only necessary when a user may have permission to do one part of a process but does not have permission to execute another part of the process. For example, take the common application-specific IDs "oracle" and "websphere." In order to run a database update script, the user needs to be the "oracle" user; however, to update the application the user needs to be "websphere." Using impersonation, the same user can run the update script as the "oracle" user and also update the application as the impersonated "websphere" user. This will allow you to combine these steps into a single process.

      • User. Give the user name for the impersonated user.

      • Password. Give the password for the impersonated user.

      • Confirm. Give the password again.

    • Show Additional Options (advanced). Select the Show Additional Options link to configure more options.

      • Is Active. Select No to temporarily deactivate the step without deleting it; otherwise select Yes.

      • Pre-Condition Script. From the drop down menu, select the condition which must be met for the step to continue. Before editing an existing script or creating a new one, see Step Pre-Condition Scripts.

      • Ignore Failures. Select Yes if this step should not effect the determination for step continuation or the status determination of the job.

      • PostProcessingScript. Select a script for determining when commands should count as fail or succeed. See Post Processing Scripts.

      • Timeout. Enter the time in minutes after the start of the step when AnthillPro will consider the step as timed out and abort it.

  3. Shell Builder Environment Variables (optional). Select the Environment Variables tab to provide any additional variables that should be in place when the build runs. Environment variable values may contain references to existing values in the following format: name=${env/<NAME>};value. If the value of the <NAME> variable is value2 in the current environment, then the above example will be expanded to: name=value2;value. Using this technique, it is possible add an entry to PATH in the following manner: PATH=my/path/entry;0. Case is significant even on Windows systems.

  4. Click Save.

Visual Studio (headless mode)

The builder is added to your AnthillPro project as a job step. Typically, the Build step is added after a Cleanup, Populate Workspace, Stamp, and Get Dependency Artifacts step of a build job; however, your job configuration may vary (see Create a New Job). The builder is also used to perform deployments, and is added to the deployment workflow as a job step (see Create a Deployment Job).

To use the Visual Studio builder as part of your build or deployment process:

  1. Follow the instructions for project creation given in Setting Up a Build Process if you are building a project.

    Or:

    Follow the instructions for Setting Up a Deployment Process if you are deploying the artifacts.

  2. When you get to the Builder step, configure the Builder:

    • Name the builder. This name will be used by the AnthillPro system.

    • Working Directory Offset. Give the working directory to use when executing this command. This is relative to current working directory (blank for the current).

    • Solution File. The location of the solution file.

    • Command Path. The path to the devenv executable file in the Visual Studio Installation.

    • Build Command. The Visual Studio Command to Run.

    • Mode. Whether you are building in Debug or Release mode.

    • Show Additional Options (advanced). Select the Show Additional Options link to configure more options.

      • Is Active. Select No to temporarily deactivate the step without deleting it; otherwise select Yes.

      • Pre-Condition Script. From the drop down menu, select the condition which must be met for the step to continue. Before editing an existing script or creating a new one, see Step Pre-Condition Scripts.

      • Ignore Failures. Select Yes if this step should not effect the determination for step continuation or the status determination of the job.

      • PostProcessingScript. Select a script for determining when commands should count as fail or succeed. See Post Processing Scripts.

      • Timeout. Enter the time in minutes after the start of the step when AnthillPro will consider the step as timed out and abort it.

  3. Visual Studio Properties (optional). Select the Properties tab and provide any additional properties that should be in place when the build runs. These properties are used as if they were passed to the devenv executable on the command line. Enter each property on a separate line.

  4. Visual Studio Environment Variables (optional). Select the Environment Variables tab to provide any additional variables that should be in place when the build runs. Environment variable values may contain references to existing values in the following format: name=${env/<NAME>};value. If the value of the <NAME> variable is value2 in the current environment, then the above example will be expanded to: name=value2;value. Using this technique, it is possible add an entry to PATH in the following manner: PATH=my/path/entry;0. Case is significant even on Windows systems.

  5. Click Save.