如何将Bash或PowerShell脚本添加到Azure DevOps管道

时间:2019-05-09 12:10:27

标签: azure-devops continuous-integration azure-pipelines

我对CI还是很陌生,正在尝试使用Azure DevOps。

我想在我的CI管道中使用一个自动测试工具,该工具使用Bash脚本和在CI管道中运行的PowerShell脚本来触发测试工具。

如何将Bash脚本或PowerShell脚本添加到Azure DevOps的管道中,以便脚本运行并触发测试工具?

1 个答案:

答案 0 :(得分:1)

您可以将内置PowerShell / Bash任务添加到管道中。

您可以将var client = new WebClient(); client.Encoding = System.Text.Encoding.UTF8; .ps1添加到存储库中,并在任务中指定脚本文件,或放入内联脚本。

如果您使用.sh构建,则可以通过以下方式添加它们:

.yaml

如果使用可视设计器,则可以通过以下方式添加任务:

enter image description here

enter image description here

相关问题