VSTS build from multiple repositories

后端 未结 3 473
被撕碎了的回忆
被撕碎了的回忆 2021-01-04 07:08

I have two repositories - one in TFVC and another in Git. There are specific technical reasons for keeping them separate.

The code in TFVC is built on a private buil

3条回答
  •  遥遥无期
    2021-01-04 07:30

    TFVC

    And the inverse of Marina's answer is also possible. After binding your build definition to Git by default, you can add a powershell script to map a workspace and fetch the sources:

    tf workspace /new /noprompt /location:local /permission:private 
    tf workfold /map $/Server/Path "$(Agent.BuildDirectory)\tfvc" /workspace:
    tf get "$(Agent.BuildDirectory)\tfvc"
    

    And add a "always run task" to clean up the workspace afterwards:

    tf workspace /delete 
    rd /s /q "$(Agent.BuildDirectory)\tfvc"
    

    Download artifact

    Another option is to use the Download Artefact task to download the artifacts from the following extension: TFS Artifacts for Release Management.

    Or the Download Artifact task that comes with VSTS, though that one requires a link to a Build Definition to download from, which means you could have a CI build on either Git or TFVC that build the sources, or simply attaches the sources directory, then fetch those in the "other" build.

提交回复
热议问题