From today on I will start to post a series of posts on AnthillPro.
Just implemented a nightly build for one of our workflows. Here is the main points:
- Stamp strategy
NIGHTLY-build-${bsh:java.util.GregorianCalendar calendar = new java.util.GregorianCalendar(); calendar.add(java.util.Calendar.DATE,1); Date date = calendar.getTime(); new java.text.SimpleDateFormat("MM/dd/yyyy-HH:mm").format(date)}
This will create a stamp of the following pattern: "NIGHTLY-build-04/09/2008-19:38", you can change to suit your needs.
- Cron schedule
I'm not that expert in cron expressions, but that's the one I used: "0 0 3 ? * MON-FRI"
First 0 stands for 0 seconds, then 0 minutes, and 3 is the hour (3am), then not specifying the day of the month (with '?') and for last from monday to friday, as we don't usually work at weekends.
- Trigger
Now just wait until 3am to see if works : )
In the next articles I will show:
- How to create a workflow to build from the tag
- How to run QTP (quick test professional) from anthill
- How to best reuse jobs and workflow definitions
- How to deploy resources for various environments using ant and anthill without duplicating files
- and more... : )
1 comments:
Just what I was looking for! Good to see your blog.
Post a Comment