【问题标题】:Azure Pipeline Timeout issueAzure 管道超时问题
【发布时间】:2022-07-25 10:06:31
【问题描述】:

Azure 构建管道在 60 分钟后超时。 至于发布管道,我已经看到它们运行了超过一个小时 - 相同的 60 分钟超时规则是否不适用于发布?

另外,是否可以通过 yaml 创建 Release 管道?

【问题讨论】:

  • 在 YAML 中,没有“构建”或“发布”管道之类的东西。如果您在管道中使用环境和部署作业,则它是一个“发布”管道。
  • 这能回答你的问题吗? Azure Pipelines task timeout not respected

标签: azure-pipelines


【解决方案1】:

是否可以通过 yaml 创建 Release 管道?

2018 Q4 Features 中,MS 通过 Multi-stage YAML 管道发布了 YAML 的 CD:

为此,我们现在提供统一的 YAML 体验,因此您可以 将每个管道配置为一起执行 CI、CD 或 CI 和 CD。 使用 YAML 文档定义管道允许您检查 将您的 CI/CD 配置为源代码控制以及您的 应用程序的代码,便于管理、版本控制和控制。

以下内容是从文章中复制和粘贴的,并使用各个阶段进行演示:

stages:
- stage: Build
  jobs:
  - job: Build
    pool:
      vmImage: 'Ubuntu-16.04'
    continueOnError: true
    steps:
    - script: echo my first build job
- stage: Deploy
  jobs:
    # track deployments on the environment
  - deployment: DeployWeb
    pool:
      vmImage: 'Ubuntu-16.04'
    # creates an environment if it doesn’t exist
    environment: 'smarthotel-dev'
    strategy:
      # default deployment strategy
      runOnce:
        deploy:
          steps:
          - script: echo my first deployment

注意:对于管道的超时,我们可以设置timeoutInMinutes: xx

jobs:
- job: Test
  timeoutInMinutes: 10 # how long to run the job before automatically cancelling
  cancelTimeoutInMinutes: 2 # how much time to give 'run always even if cancelled tasks' before stopping them

您可以参考文档Timeouts 了解更多详细信息。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-08-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多