每个功能分支,环境分支和Azure管道 [英] Branch-per-feature, Environment branches and Azure Pipelines

查看:53
本文介绍了每个功能分支,环境分支和Azure管道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


背景:



我们有一个基于F#的FAKE的内部CI / CD工具 执行以下工作流程:




  • 用户输入2个参数:  $ source-branch    $ target-environment

  • pull  master

  • pull  $ source-branch

  • pull  $ target-environment  (
    是每个环境的git分支:  DEV ,  TEST
    等,除了  PROD  其中
    被硬编码为  master

  • 从  $ target-environment   called  $ target-environment- $ current-date- $ source-branch  (对于
    实例  DEV-201811271840-SomeNewFeature

  • 将master合并到temp分支

  • merge  $ source-branch  到
    temp branch

  • 执行构建脚本

  • deploy

  • 如果部署成功,则将temp分支合并到  $ target-environment

  • 删除临时分支


问题:



如果没有详细了解构建/部署步骤(这是一个完全不同的对话),我想知道是否/如何在Azure管道中复制此工作流程。



似乎所有文档甚至UI中的所有选项都引用了不同的用例。



我们希望能够推送我们的功能分支,将它们合并到环境分支(最终到 master )  after  它们是
已部署,而不是之前,这就是我们在临时分支中执行构建/测试/部署步骤的原因,这些步骤将合并到  $ environment  仅在构建/测试/部署步骤成功后



问题:



这是否可以使用Azure管道而不需要使用自定义代码?我没有找到任何关于它的文档,UI中的选项似乎也没有帮助。



问题2:



也许我从错误的角度接近这个?我也想知道是否有更好的方法来实现同样的拉动请求,这将给我一个机会执行在部署之前进行代码审查。



非常感谢任何建议。



解决方案

此论坛是关于
Azure Stack ,Azure的扩展,可在内部持续运行混合应用程序。  ;


Azure TFS涵盖在 Azure Devops ,正式名称为VSTS。 根据
Azure DevOps支持页面 ,提出这些问题的最佳地点是
Azure-Devops下的StackOverflow 标记。


Background:

We have an in-house CI/CD tool based on F#'s FAKE that performs the following workflow:

  • user enters 2 parameters: $source-branch and $target-environment
  • pull master
  • pull $source-branch
  • pull $target-environment (there is a git branch for every environment: DEVTEST, etc, except for PROD which is hard-coded to master)
  • create a temporary branch from $target-environment called $target-environment-$current-date-$source-branch (for instance DEV-201811271840-SomeNewFeature)
  • merge master into temp branch
  • merge $source-branch into temp branch
  • execute build script
  • deploy
  • if deploy succeeds, then merge temp branch into $target-environment.
  • delete temp branch

Problem:

Without getting into too much detail about the build/deploy steps (which are a whole different conversation) I'd like to know if/how can I replicate this workflow in Azure Pipelines.

It seems that all documentation and even all the options in the UI refer to a different use case.

We want to be able to push our feature branches, have them merged to the environment branches (and eventually to masterafter they're deployed, and not before, which is why we're performing build/test/deploy steps in a temporary branch, which gets merged into $environment ONLY after the build/test/deploy steps succeed.

Question:

Is this even possible using Azure Pipelines without resorting to custom code? I haven't found any documentation about it and the options in the UI don't seem to help either.

Question 2:

Maybe I'm approaching this from the wrong angle? I'd also like to know if there's a better way to achieve the same thing with pull requests, which would give me a chance to perform a code review before deploying.

Any advice is greatly appreciated.

解决方案

This Forums Is for questions regarding Azure Stack, An extension of Azure to consistently run hybrid applications on-premise. 

Azure TFS is covered under Azure Devops, formally known as VSTS.  According to the Azure DevOps Support page, the best place to ask these questions is on StackOverflow under the Azure-Devops tag.


这篇关于每个功能分支,环境分支和Azure管道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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