English 中文(简体)
如何在继承可变模版之前管理习俗工作
原标题:How to run custom jobs before inheriting from an immutable YAML template

我们想在继承从事建筑工作的不可调换的《YA马法》之前添加以下雕刻。

jobs:
  - job: PreBuild
    timeoutInMinutes: 120
    pool:
      name:  poolname 
      vmImage:  windows 
      steps:
        - checkout: self
          clean: true
          persistCredentials: true
        - task: ..........
          ......
        - task: ..........
          ......

但是,当我们在<条码>分号/代码>前添加氮时,YA将迅速:<条码>未计值>

extends:
  template: template.yml@TemplateRepo

So what is the best solution based on the immutable build templates to have us run several tasks before inheriting the template where template jobs always execute first? Or, are there any other approaches that we could have everything inheriting inside the template but have our custom steps run first?

最佳回答

通常的做法是与“可变”模板的所有人进行谈判,以略微加以改动,以接受<条码>分步骤/代码>、<代码>jobList或<条码>(取决于您的要求)。 例如,通常有选择性的<代码>preBuildSteps和postBuildSteps参数,这些参数接受<条码>、分号,以便通过在建筑之前和之后的步骤。

If it s truly immutable inasmuch as the team that owns the template will not implement such a pattern, then you won t be able to extend the template and still fulfill your requirements.

问题回答




相关问题
Should I use YAML or JSON to store my Perl data? [closed]

I ve been using the YAML format with reasonable success in the last 6 months or so. However, the pure Perl implementation of the YAML parser is fairly fidgety to hand-write a readable file for and ...

How do you put HTML or XML into a YAML?

I would like to store HTML snippets inside a YAML file. What is the best way to do that? Something like: myhtml: | <div> <a href="#">whatever</a> </div>

What is the difference between YAML and JSON?

What are the differences between YAML and JSON, specifically considering the following things? Performance (encode/decode time) Memory consumption Expression clarity Library availability, ease of use ...

热门标签