<%@ page isELIgnored="true" %> <%@ taglib uri="cms" prefix="cms" %> Configure and Edit Agent Filters

Configure and Edit Agent Filters

Agent filters are used to select one or more agent(s) at run time and to monitor the quiet period (see Using Agent Filters and Quiet Periods). Agent filters are scoped by environments, and select from the agents allocated to the environment. When an agent filter is asked to select one or more agent(s), it selects from the agents available in the environment within which the filter is executing.

Only scripted agent filters are capable of targeting multiple agents. See Agent Settings and Agent Filter (Selection) Scripts.

AnthillPro uses three types of agent filters:

  • Any Agent Filter. Selects the first available agent. Returns all online agents in the environment, ordered by a combination of current load and throughput metric.

  • Fixed Agent Filter. Always selects a specific agent within the environment. If the requested agent is locked or can't receive more work, the request will be queued until the agent frees up.

  • Scripted Agent Filter. Selects agent based on an agent filter script. See Agent Filter (Selection) Scripts.

See also About AnthillPro Agents.

Using Agent Filters and Quiet Periods

Quiet periods are configured on the project (Administration page), and play an integral part in ensuring that the source code AnthillPro obtains from the SCM contains a consistent set of changes. The quiet period is a measure of time that must pass without anyone committing changes to the source. When the specified time has passed without commits, AnthillPro triggers a build.

Any agent-filter type may be used to monitor the quiet period. Unless a fixed agent filter is used, the selection will be from within the requested environment for the build.

  1. Go to Administration > Edit Project.

  2. Select the Quiet Period tab on the Project Main page.

    • Quite Period. Input the desired quite period in seconds. For CI, it is usually best practice to set the quiet period at 60 seconds. This usually allows a developer enough time to make all their related commits. If you find that you are seeing broken builds because related commits are not within the same build, try lengthening the quiet period.

    • Quiet Period Type. Select the quiet period type.

      • Changelog Triggered Quiet Period. Periodically polls the repository for changes since the last build; typically used with a scheduled trigger. The changelog quiet period should be used for any project that has at least one workflow using a scheduled trigger. For example, if your project has one workflow that uses a repository trigger (that builds every time a commit is made) and one workflow that uses a scheduled trigger for a nightly build, use the changelog quiet period. This will ensure that AnthillPro builds when you want it to. See also Workflow Triggers and Scheduled Builds.

      • Repository Triggered Quite Period. Listens to notifications sent from the repository and builds the project based on the changes found in the commit; used with repo triggers. This should only be used if every workflow in your project uses a repository trigger and you want AnthillPro to build every time a commit is made. See also Workflow Triggers and Scheduled Builds.

      • No Quiet Period. Will not enforce a quiet period. While there are some instances where a quiet period is not necessary, it is best practice to always use a quiet period. If you elect not to use a quiet period, it is possible to end up with a substantial number of unnecessary builds -- many of which will be broken.

    • Should Cleanup. If 'Yes' is selected, a cleanup will be performed prior to checking out source for a build. If 'No' is selected, no cleanup will be performed prior to source check out. With some SCM systems, it is possible to only check out changed source for a build, making the process quicker.

  3. Select agent filter type and click Set.

    • Any Agent. Selects available agent.

    • Fixed Agent. Always selects a specific agent.

    • Scripted Agent. Selects available agent based upon agent filter script. See Agent Filter (Selection) Scripts.

  4. Click Save.

  5. To edit an existing Agent Filter and/or Quiet Period, repeat Items One through Four.

Agent Security

User access to an agent is managed on the Security tab. Administrators can define what roles have access to read, write, or determine security for agents. You need administrative permissions to set agent security. See Setting Up Security.

  1. Go to the Agents > Agent page and select the appropriate agent from the list.

  2. Select the agent's Security tab and click Edit.

  3. Check the Roles and permissions for this agent. See Define Roles and Using Permissions.

  4. Click Save then Done.