Reputation: 5056
Given following release pipeline:
Current logic:
Question:
Can this be done without recreating the stage seperately?
Upvotes: 1
Views: 519
Reputation: 18303
Yes, all you need to do is enable the Schedule pre-deployment trigger for your "Regression Tests" stage. It wouldn't seem immediately obvious, but this will run on a scheduled basis using the build artifacts from the latest release. No new builds are triggered.
When you select this option, you can select the days of the week and the time of day that Azure Pipelines will automatically start a new deployment. Unlike scheduled release triggers, you cannot configure multiple schedules for stage triggers. Note that, with scheduled triggers, a new deployment is created that deploys the artifacts from the most recently available release, overwriting any previously deployed artifacts for the stage. It does not necessarily require a newer version of the artifacts to be available
By combining both the After Stage and Schedule triggers, the "Regression Tests" stage will be executed after a successful "Deploy to Dev" and then again on the schedule you specify. Note that if you have a failed deployment this won't prevent the scheduled trigger from occurring so you'll need to ensure you have a successful "Deploy to dev" before the nightly run.
From the above quote, you'll note the term "new deployment" is used which may seem confusing based on your current usage. The term "Stage" was previously called an "Environment", and the tasks that it contained are considered a "Deployment". Since your Regression Tests doesn't actually deploy anything, it'll just run the tests.
Upvotes: 1