我有一个发布管理发布管道,它是这样设置的:
Artifacts >> Development (trigger on build success) >> Production (manual trigger after Development)
我想做的是,合并开发分支到主从开发提升到主,所以主总是有生产版本代码,但释放代理不拉git repo和没有访问git。我发现了this,它表明这是不可能的(至少没有hacks)。感谢您的指点。
我使用的是github.com,不是vsts存储库。
发布于 2018-05-28 10:33:17
要在VSTS发布环境中将开发分支合并为主分支,可以通过添加PowerShell任务来实现。具体内容如下:
使用脚本添加PowerShell任务:
git clone https://username:password@github.com/username/repo repo
cd repo
git checkout development
git checkout master
git merge development
git push origin master
备注:
应在PowerShell任务中取消选择
development
分支期间存在合并冲突,则master
任务将失败。所以你最好为git merge
命令添加-X
选项:git merge development -X the #通过在开发分支上保留版本来解决合并冲突文件git merge development -X ours #通过在主分支上保留版本来解决合并冲突文件
https://stackoverflow.com/questions/50555004
复制相似问题