Which branches should be associated with deployment slots in Azure

I am running the application on Microsoft Azure using the deployment slots and source control. I doubt which branch is associated with a temporary deployment slot. If I set up the staging environment and connect it to the master branch, and then run swap, it will switch correctly to the base code base in the production slot. If I swap it, it shows the old code in production. This tells me that production is not currently associated with a branch (I did not configure it either).

Now my question is: which branch do I associate with the production and which branch do I associate with production? When and how will the code be replaced in production so that I can put the new code in the stage (main branch)?

My problems:
- If there is no branch related to production, then how can I switch between deployment slots correctly and get the value of this function? “If I associate the branch with the production slot, then this code will not go through the staging environment during deployment.” - I assume that I want not to switch the version control repository branch to my online environment every time I want to deploy. - If I set it up like this, I would think that I need to deploy in an intermediate environment, and then go to production. In order to have this code base in production, I would have to subsequently deploy the same code for production. - I thought that I would always combine a branch into a master, and not into another branch.

I believe that there is something that I do not receive. What do I need to do? Please explain what code should have in the main branch.

Thanks.

+4
source share
1 answer

There should not be separate branches associated with production and intermediate slots, or at least there is no good that I can think of. An intermediate slot exists as an intermediate step in turning your code into a live production environment, allowing you to deploy, run, and scale virtual machines before they switch to the client bay.

, Azure, , . , , Dev/Dev , VIP-, .

, , , . , , VIP-.

, , .

+2

Source: https://habr.com/ru/post/1608204/


All Articles