Bamboo 3.4 : Polling the Repository for Changes

"Polling the Repository for changes" means that Bamboo will check out the source code on a regular basis and examine it for changes. If Bamboo detects a change, Bamboo triggers a build of your Plan.

You can configure Bamboo to poll the repository for changes periodically (e.g. every 180 seconds) or based on a schedule (e.g. the second Sunday of every month at 5:00 am).

Triggering a Plan Build by Polling for Changes Periodically


To trigger a Plan's build by polling its source repository for changes:

  1. Navigate to the repository settings for desired Plan, as described on Specifying the Source Repository for a Plan.
  2. In the 'Build Strategy' field, select 'Polling the Repository for changes' (see screenshot below).
  3. In the 'Polling Strategy' field, select 'Periodically'.
  4. In the 'Polling Frequency' field, specify how often (in seconds) Bamboo should check out the source code and examine it for changes.
  5. Click the 'Save' button.


Screenshot above: Polling the repository for changes

Triggering a Plan Build by Polling for Changes on a Schedule

You can use the Schedule Editor to set up a polling schedule for your repository. Note, this is a schedule for polling your repository for changes (that can then trigger a build), not a schedule for directly triggering Plans.

The schedule can be daily (times per day), weekly (days per week), monthly (days per month) or based on a Cron expression.


To trigger a Plan's build by polling its source repository for changes:

  1. Navigate to the repository settings for desired Plan, as described on Specifying the Source Repository for a Plan.
  2. In the 'Build Strategy' field, select 'Polling the Repository for changes' (see screenshots below).
  3. In the 'Polling Strategy' field, select 'Scheduled'.
  4. The 'Schedule' field will display the last configured schedule, e.g. 'The second Sunday of every month at 5:00 am'. Click the edit icon () next to this value to display the Schedule Editor.
  5. In the Schedule Editor, select the type of polling schedule that you want to configure for your repository:
    • 'Daily' — Polls at specified intervals during the day, every day. For example, daily every 3 hours from 12:00am to 9:00am.
    • 'Days per Week' — Polls at specified intervals during the day, on specified days of the week. For example, each Sunday and Saturday every 3 hours from 12:00am to 9:00am.
    • 'Days per Month' — Polls at a specified time during the day, on specified days of the month. For example, the second Sunday of every month at 5:00 am
    • 'Cron' — Use a Cron expression to specify when the repository will be polled. A cron expression consists of 6 mandatory and one optional field. The fields in sequential order are: seconds, minutes, hours, day-of-month, month, day-of-week and (optional) year. For example, 0 0 1 ? * 1#2. For information on Cron expressions, see this FAQ: How do I construct a cron expression in Bamboo
  6. Click the 'Save' button.

Screenshots: Scheduling polling for changes

Notes

Related Topics

Triggering a Plan Build when Code is Updated
Triggering a Plan Build Based on a Schedule