Azure DevOps - Is it possible to schedule a release for a specific day and time?

烂漫一生 提交于 2019-12-14 03:50:03

问题


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?


回答1:


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.




回答2:


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.




回答3:


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



来源:https://stackoverflow.com/questions/52429366/azure-devops-is-it-possible-to-schedule-a-release-for-a-specific-day-and-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!