Reputation: 1634
I am building a continuous deployment pipeline in VSTS. Simplified it looks like this:
Trigger -> Staging -> Approval -> Live
In this case:
Trigger
is everyday at 10:00 (business requirement)
Approval
one of the senior staff needs to review staging and approve the changes for live.
VSTS has a notification system to send an email for approves list, which is great.
The problem however that there might be cases where there was no changes whole day, but the release would still be triggered and email sent. This would be spamming people. Is there a way to configure the flow so that release would not be triggered if the build artifact was already successfully released? Or maybe some other workaround for this situation?
Upvotes: 1
Views: 313
Reputation: 33738
You can add additional release environment to check current artifact version through PowerShell (e.g. Build.SourceVersion, check variables in release), then fail task if there was already successfully released.
For Staging environment, choose After environment option and select previous environment.
On the other hand, you may do it through Scheduled Build with Only schedule builds if the source or definition has changed enabled.
Create a new build definition and enable schedule with Only schedule builds if the source or definition has changed option checked
Remove schedule from release definition
Associate to that build definition artifact
Enable Continuous deployment trigger for the artifact
Upvotes: 1
Reputation: 38136
The email notification will be sent for every release no matter the artifacts are updated or not.
And there is no way to send the email notification only for the artifacts are updated from all the scheduled releases.
The workaround is change schedule triggered release to continous deployment if you want the approver only receive emails for artifacts updated.
Upvotes: 0