检索当前环境状态

发布于 2025-01-19 02:05:45 字数 603 浏览 2 评论 0原文

我们对仅在工作时间内运行的Azure VM上设置了一个较小的开发/测试环境。有时,我们的开发人员之一可能会在下班后完成公关。由于Azure VM被关闭,这通常会导致失败的构建/部署。

对于一个使用经典版本和部署组的不同项目,我有一个PowerShell脚本检查Azure VM,并在关闭时启动它们。 (这是通过

清楚地了解了我们的整体构建/发布过程。

我目前使用YAML设置了一些新管道,其中部署利用环境进行批准等...这些新管道正在运行而没有任何问题,并更 能够确定如何在开始部署工作之前检查环境的状态。环境?view = azure-devops-rest-6.0“ rel =“ nofollow noreferrer”>环境API 文档没有显示任何状态项。当然,我在返回的对象中看不到任何任何状态

。有关如何检查状态的选项,然后随后在部署过程中根据需要启动并停止VM。

We have a small development/testing environment setup on Azure VMs that only run during business hours. Sometimes one of our Devs may complete a PR after hours. This generally results in a failed build/deployment as the Azure VMs are shutdown.

For a different project that utilises the Classic Release and Deployment Groups, I have a PowerShell script that checks the Azure VMs and starts them if they're shutdown. (this is done via the DeploymentGroups API

I'm currently setting up some new pipelines using YAML where the deployments utilise environments for approvals, etc... These new pipelines are running without any problems and provide a clearer picture of our overall build/release process.

One thing I haven't been able to determine is how to check the status of the Environment prior to commencing a deployment job. The Environment API documentation doesn't show any status items. And of course I don't see anything in the returned object.

Open to options on how to check the status, then subsequently start and stop the VMs as required during the deployment process.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文