Our dev team want to branch out (bad joke) into using a GitFlow like branching system where there would be a dev, uat and release branches(which would all need building from), I cant see a clever way of using the same pipeline to deploy different branches, could someone let me know the best way to do it? Is it literally create multiple pipelines for each branch needed?
Using GitFlow in Azure DevOps (Does it mean multiple pipelines?)
Asked Answered
Having a "dev", "uat", and "release" branch is not GitFlow-like. –
Ulcerate
No, you don't need to create multiple release pipelines.
I don't know what you do in the build pipelines, but in the release you can create one release pipeline with multiple "Stages" (for dev, UAT, and release), and multiple artifacts, in each stage and artifact, you can configure the branch, from which branch the artifacts will be.
See this configuration:
Of course, you need to configure the triggers, you don't want to deploy the 3 stages immediately after release (you can also "play" with it, put the release stage after the UAT, for example).
Hi, I dont think this helps as this is based on the same artifact, from gitflow you would have the dev artifact then a uat artifact then a master artifact, so this wouldn't work.. or am missing something? –
Cyclosis
You can also put 3 artifacts, see my updated answer. –
Pet
ohh that makes more sense! guessing you can force only certain artifacts to specific stages as well! thus problem solved! Thanks Shayki –
Cyclosis
We are trying to use a similar flow to this- but we've hit a wall. The problem lies in the "Pre-deployment filters" of the "UAT" and "Release" stages... We can't use branch filters like "release/*" in "Pre-deployment filters" like we can in "Continuous deployment triggers". We can use "develop" for "Dev" and "master" for "Release". Can anyone provide some advice? We're using GitFlow as our branching strategy and would like the following branch/stage triggers: develop<>Dev, release/*<>UAT and master<>Release. –
Gagger
We ended up setting up a single build pipeline that is triggered by 'develop', 'release*' and master. That build pipeline writes to the same artifact: 'drop'. We then created x3 release pipelines- 'Development', 'Test' and 'Production'. Each release pipeline was configured to deploy to the correct environment. We then set the 'Continuous Deployment trigger' to filter on the correct branch ('develop', 'release/*' and 'master'). Finally, we added a 'Pre-deployment approval' rule to the 'Production' release pipeline stage(s). Seems to do what we wanted... –
Gagger
© 2022 - 2024 — McMap. All rights reserved.