18

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?

Release Trigger Example

Ken White
  • 123,280
  • 14
  • 225
  • 444
Matthew Eskolin
  • 558
  • 1
  • 5
  • 20
  • As DJ suggested it's not possible now.You can raise your own uservoice [here](https://visualstudio.uservoice.com/forums/330519-visual-studio-team-services) to submit your request – Jayendran Sep 21 '18 at 09:04
  • 1
    Zapier also gives you possibility to schedule on your own pace, https://zapier.com/apps/azure-devops/integrations/ – Lex Li Feb 04 '19 at 23:42

5 Answers5

9

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

Azure Devops pre-deployment

omar5885
  • 109
  • 1
  • 3
5

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.

SimonGoldstone
  • 5,096
  • 3
  • 27
  • 38
  • 2
    This is a great solution if you have a server always running. I would recommend this solution over mine if you have a always on server, just for it's simplicity. – sheamus Mar 03 '20 at 19:59
4

I think the best solution is to have Pre-deployment approvement where you can later defer Release and specifiy exact date for the deployment. Azure DevOps Defer Release

  • I use this as well. It's unfortunate that the 'Defer deployment for later' option doesn't appear in the regular deploy form, only when approval is required. – Jorrit Schippers Mar 27 '23 at 07:00
1

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.

0

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.

sheamus
  • 3,001
  • 4
  • 31
  • 54