continuous integration - How to create a build definition in "visual studio team services" that is using source codes from multiple "Team Projects"? -


i use vsts ("visual studio team service") have major problem.

basically, have few class library solutions (e.g. classlibrary1 , classlibrary2 ) use them reference in other projects (e.g. websitesolution1, websitesolution2 , websitesolution3.)

of course, have separate git repo (team project in vsts) each solution, let's "team projects" have same name solution contain.

now create build definitions below rules:

  1. if commit change 1 of classlibrary "team project" (e.g. classlibrary1) first build classlibrary solution , use result ( dll file) feed websites solutions (e.g. websitesolution1, websitesolution2 , websitesolution3.) , build web solutions (which in different team project same account)

  2. if commit change 1 of websites solutions (e.g. websitesolution1) first build every classlibrary "team projects" (e.g. classlibrary1 , classlibrary2 ) , use result ( dll file) feed websites solutions thehas commit (e.g. websitesolution1, ) , build web solution (which in different team project same account)

problem : when create new "build definition" can see codes within same team project contains build definition.

multiple repositories vsts git build not supported. (we can map multiple sources if using tfvc)

there related user voice can vote it.

the workaround:

you can additional files in other repository via git command (command line build step , need check allow scripts access oauth token in option tag of build definition).

enter image description here

1.if commit change 1 of classlibrary "team project" (e.g. classlibrary1) first build classlibrary solution , use result ( dll file) feed websites solutions (e.g. websitesolution1, websitesolution2 , websitesolution3.) , build web solutions (which in different team project same account)

steps:

  1. create new build definition classlibrary project/solution
  2. add powershell build step call build rest api queue build of website (check this article code)
  3. check continuous integration (ci) , set branch filters in triggers tab of build definition

2.if commit change 1 of websites solutions (e.g. websitesolution1) first build every classlibrary "team projects" (e.g. classlibrary1 , classlibrary2 ) , use result ( dll file) feed websites solutions thehas commit (e.g. websitesolution1, ) , build web solution (which in different team project same account)

steps:

  1. create build definition websites solution
  2. add command line build step run git command classlibrary files in repository (refer previous screenshot)
  3. add visual studio build step build classlibrary project/solution
  4. add copy files step copy build result file (e.g. .dll files) necessary folder per related path of classlibray reference of website project. can check in project file,

for example:

<reference include="classlibraryb">       <hintpath>..\..\msbuilddemosolution1\classlibrary1\lib\classlibraryb.dll</hintpath>     </reference> 
  1. add visual studio build step build website project/solution

Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -