TFS 2017构建为代码 [英] TFS 2017 build as code

查看:46
本文介绍了TFS 2017构建为代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何在2017年的构建"和发布"中将构建任务配置为代码? 我正在为Jenkins Pipelines搜索类似Jenkinsfiles的文件.

How I can configure the build tasks in 2017 within "build" and "release" as code? I am searching for something like the Jenkinsfiles for the Jenkins Pipelines.

用例是:

  1. 我需要验证参数,然后基于全局传递的参数来决定按什么顺序等调用哪些任务
  2. 在Web用户界面中没有唯一的更改来源
  3. 将配置包含在源代码管理中

这样做是否有可能或可用的插件?

Is there may be a possibility or a Plugin available doing this?

推荐答案

没有开箱即用的方法.市场上有一些任务可以将构建和发布定义导出为JSON,并且您可以使用REST API创建或更新构建和发布定义.结合这些东西,您当然可以实现您想要的.通过针对TFS 2015和VSTS的PowerShell通过脚本创建/发布定义创建脚本,我取得了一些成功.

There's no out of the box way. There are marketplace tasks to export build and release definitions as JSON, and you can use the REST APIs to create or update build and release definitions. Combine those things, and you certainly can achieve what you want. I've had some success with scripting build/release definition creation via PowerShell against TFS 2015 and VSTS.

这篇关于TFS 2017构建为代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆