Build Forge: Start build on changed directory
- Create a selector such that if files are found in the designated location then the server is available to run the build. First, I'm not sure if this would work, second, it doesn't seem conceptually accurate.
- Use a cron job on the target server and somehow (?) initiate the build via API or command line tool (I've not gotten into BF enough to know what command line tools it has available). Though this seems workable, it also seems to contradict the whole point of an automation framework. If I have to kick it from outside I may as well just kick the build process from outside.
Accepted answer
One other answer
The .monitor command causes the system to halt the project while it watches a file to see when the file size stops changing. When a step issues this command, the system checks the indicated file; it then rechecks the file every <interval> seconds. When the file size fails to change between two intervals, the system continues to the next step.
If you use the -c option, the system writes the contents of the monitored file out to the step log after it determines that it has stopped changing; then it continues on to the next step.
If the file does not exist, then the system does not wait but continues immediately after the first interval. Use the -w option to force the system to wait for the file to be created before starting the monitoring process.
Comments
Thanks, that does sound like a viable alternative. I'm actually looking at this from another angle, now, since the process that gets the file to the directory is also under my control. It would be the cleanest approach to kick off the build at the same time as the file was dropped. Do you know if Build Forge has a REST or other web service interface that would facilitate that?