About scheduling a build with the Poll SCM build trigger

Poll SCM is a type of build trigger that is supported by HCL VersionVault. Poll SCM attempts to run a build job in Jenkins at a scheduled time.

Overview

You must enter the scheduled time in the UNIX cron format. For more documentation on how to schedule jobs, click ? on the Schedule tab.

This is the algorithm on how scheduling a build works:
  1. For the first build, there is no other job to compare with, so the build runs whenever it is manually started.
  2. From the second build onwards, the Poll SCM build trigger always searches for a baseline in the build history to find the most recent baseline available and compares the contents in the baseline with the current contents in the default stream. If there are changes, then it proceeds and builds the stream by creating a baseline. If there are no changes then, it does not proceed with the build.
  3. There is the possibility that a baseline might not be found in the build history because all the previous builds might have failed before a baseline was created or the build history is deleted. In this case, the Poll SCM build trigger proceeds with the build.

The polled builds are tied to the Create baseline option.

Scenarios

There are different scenarios that are possible:

Create baseline option disabled


Create baseline option disabled
The baseline option is mandatory for the polling to start, because the baseline serves as a reference on which the comparison is done on whether there are any changes since the last build to know if to proceed with the build. The following is a sample polling log:
HCL VersionVault polling log

Create baseline option enabled


Create baseline option enabled
When the very first build is triggered, the pre-build comparisons identify that this is the very first build and there is no previous baseline to which to compare. Therefore, the build runs and a baseline is created. In addition, an automatic view is created on top of the baseline and the build proceeds to the build steps and termination. The following is a sample build log:
Sample build log

When the scheduled timer starts the job but there are no changes since the last build

Because there are no changes since the last build or the last baseline selected, the build does not start, as shown in the following sample log:


HCL VersionVault polling log with no changes

When some changes are made to the stream and the scheduler starts up

In this sample log, the pre-build comparisons have identified that there are changes since the last baseline found in the most recent build, therefore the build job proceeds further.
HCL VersionVault polling log with changes