automating build schedules
On my TeamCity 2017.1 (build 46533) I am looking for a way to complete the following;
I have a project that is currently being built on a nightly basis using a scheduled trigger. It also has another VCS trigger attached that causes the project to be run whenever a change is submitted to the code repository. The artifacts are published only to the teamcity server for use by the developers. This is what we call the ‘overnight build’
This works as expected.
We have created a copy of this overnight build and added some steps that publish the artifacts to Octopus deploy – which then forms an automatic release out to our test and QA environments. The rules for triggering this (release) build are;
• The ‘Overnight build’ must be successful
• The ‘Overnight build’ must have been triggered by a VCS change
Is there a way to accomplish this automatically as i currently either have to wait until the ‘overnight build’ completes successfully and manually start a ‘release build’ or add the same VCS trigger to both builds and add a long wait period to the ‘Release build’ hoping that the overnight build finishes successfully.
I am looking for suggested approaches to remove the manual aspect from this project and any help would be appreciated.
Please sign in to leave a comment.
Hi Paul,
I would do the following:
Hope the resulting behavior is what you are looking for.
Thanks for your quick response. I have applied the configuration and will be able to update over the next few days. Working through the logic of the proposal I think it should work as required.
many thanks,
Paul
Hi Julia
update on this solution - the 'release' build that should be triggered when a successful 'overnight' build has been completed by a VCS change has not automatically started. I think this is because all of the conditions for a Scheduled build must be met. This means that a release build will not be available until the scheduled time has been reached.
The environment is such that once a successful 'overnight' build has been completed by a change the release build should immediately be triggered.
Have I missed a setting?
Looking forward to any additional help
Paul
Hi Paul,
You can configure a cron expression in the schedule trigger to fire every X minutes. With the "watch build in the build configuration" and "trigger only if there are pending changes" settings the build should start only when all these conditions are met.
Many thanks Julia - that was the piece I was missing! It now works perfectly and my chained jobs run automatically as expected!!