Get the sources from the branch that triggered the build in Team Services

偶尔善良 提交于 2020-01-01 09:09:07

问题


I would like to create an integration build in VS Team Services, that is triggered when a commit is done to any branch (develop/feature xy) except master.

I am able to create a trigger for this:

but how do i checkout the sources of the branch that triggered the build?

In the task tab, the first step is 'Get Sources' and here i'm only able to choose one branch (the * wildcard is not possible here):

Otherwise for example a build is triggered by a feature branch, but the sources are taken from the develop branch. How can i do this?


回答1:


You filter is perfectly fine if you want to build anything but master branch.

The branch you select in build definition is just the default branch used when you Queue New Build manually.

OTOH the build trigger establish which branch to download, e.g. if the build has been triggered by a git push on branch develop then that is the one checkout'ed and built.

When you queue a new build manually, you also have the chance to change the default value to whatever branch you would like to build.



来源:https://stackoverflow.com/questions/44133816/get-the-sources-from-the-branch-that-triggered-the-build-in-team-services

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!