简体   繁体   English

Azure devops yaml 管道如何重置参数

[英]Azure devops yaml pipeline how to reset a parameter

I'm using parameters within my yaml pipeline which are set on runtime by the user.我在我的 yaml 管道中使用用户在运行时设置的参数。 For example:例如:

parameters:
  - name: StartAfterDeployment
    displayName: 'Start after deployment'
    type: boolean
    default: true 

When the pipeline has ran successfully and (and the user selected false), and the user choose "Run new" on that deployment.当管道成功运行并且(并且用户选择了 false),并且用户在该部署上选择“运行新”时。 The option is selected false instead of the default true.该选项被选择为 false 而不是默认的 true。

Is it possible to "reset" the parameters to the default settings when choosing the Run new option or to disable completely the run rew option?选择 Run new 选项或完全禁用 run rew 选项时,是否可以将参数“重置”为默认设置?

Is it possible to "reset" the parameters to the default settings when choosing the Run new option or to disable completely the run rew option?选择 Run new 选项或完全禁用 run rew 选项时,是否可以将参数“重置”为默认设置?

Yes, you can 'reset' the settings via default parameter settings.是的,您可以通过默认参数设置“重置”设置。 But on that page, it will use the same configuration as this pipeline run.但在该页面上,它将使用与此管道运行相同的配置。

The 'run new' here is actually similar to 'rerun'.这里的'run new'实际上类似于'rerun'。 It's a 'sugar pill' that helps you not have to spend time ticking the same settings when you run it again when you have a lot of configuration settings.这是一个“糖丸”,当您有很多配置设置时,当您再次运行它时,它可以帮助您不必花时间勾选相同的设置。

If you want to reset the settings to default, it is also easy.如果要将设置重置为默认值,也很容易。

在此处输入图像描述

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM