Reputation: 658
I am using Azure-DevOps Release pipelines to automate deployments.
I would like to schedule release creation to occur at a specific date and time.
But according to the screenshot below, only days of the week can be selected. And you can't specify the trigger as one time only.
This is a problem because the trigger will causes a release to occur every week on the specified days, and we will have to remember to turn the trigger off after every release, until we are ready to release again.
Is it possible with the current functionality in VSTS to set a specific date, and only release once?
Possible work-workaround?
Upvotes: 26
Views: 21234
Reputation: 331
I think the best solution is to have Pre-deployment approvement where you can later defer Release and specifiy exact date for the deployment.
Upvotes: 13
Reputation: 3153
We accomplished this by using Microsoft Flow. Zapier doesn't have support for triggering releases.
We set the trigger for the flow to be the Start of a Google Calendar (could used O365, etc) event with the words "Prod Release" Or "Test Release". Depending on the name of the event, we have our flow determine with release to initiate. We also have the flow send a message to our Slack channel notifying us that the release has started/completed. It works really well.
One added bonus is that devs have to send an invite to the team lead, and he has to accept it, as the Flow only triggers on accepted events. So it has a nice side benefit of everyone on team being aware of the release.
I was dissappointed that DevOps didn't have this feature built in, but honestly this workflow is likely better than what they would have built.
It is too bad that Zapier doesn't support this, as this is the only reason we use Microsoft Flow.
Upvotes: 1
Reputation: 109
Edit your release and click on the "Schedule set" icon under the Artifacts. You can enable and "Add a new time" for repeated execution.
Otherwise, consider running a pre-deployment condition that triggers once on every build.
Azure Devops Releases screenshot
Upvotes: 9
Reputation: 5216
I’ve found a really simple way to achieve one-off scheduled releases.
Just use the VSTS CLI tool, in the marketplace...
https://marketplace.visualstudio.com/items?itemName=ms-vsts.cli
It’s published by MS and it’s super easy to kick off builds and releases from the command line.
Just use task scheduler.
Upvotes: 5
Reputation: 176
You could add a Delay task to the Agentless Phase. Sadly you have to specify a number of minutes rather than a specific time, so there's a bit of mental arithmetic involved to work this out.
I nearly always "push the button" before I finish work, I just want it to wait a few hours until the remaining users have logged off the system, so having it fixed to 180 minutes is not an issue. You could use a variable if needed.
Upvotes: 1