Issue
What I Have
I have a ASP.NET MVC Web application project.Its one of the basic ones that you get while creating a new project.I have 3 stages of deployment.
- Test
- Staging
- Prod
All these are on IIS running on VMs. I tried to create a build and release. I am able to build and I am able to do a release for test environment.
Problem
The main issue is I want the dlls/views from test environment to go to staging environment after successful testing and hence staging to prod.
What I tried
I created a clone of test. Option selected is after environment.
My doubt is When I create a release to test it will automatically go to staging if approval is set to off.
If I have a approval process turned on then lets say a developer fixes issues and pushes code to test environment. Lets say I push code 20 times in a day then approver has to reject it 19 times and has to approve 20th time to successfully deploy to staging.
Is there anything like I click on test and say take release to staging. Then there will be some approver who either approves or rejects this.
I want a proper way of how I should set up pipeline with proper options. I want to deploy to a virtual machine.
PS: I am very new to VSTS and still exploring. Any good article which does exactly the same or somewhat similar will be of a great help.
Solution
If you want to manually decide when to deploy the Staging environment, then you just need to specify Manual only trigger for the Staging environment pre-deployment conditions (you can also specify Pre-deployment approvals etc in pre-deployment settings).
So when a new release is created, Test environment it deployed after release created, when Test environment finish deploying, you can manually deploy Staging Environment.
Note: files generated or updated from Test environment cannot persist to Staging Environment. And there are some options you can get the files from Test environment to Staging Environment:
Option 1: use the same agent to deploy the two environments
You can deploy the two environments by same agent, so that in the end of Test environment, you can add a task to copy the dlls/views into a directory. Then add another task at the beginning of Staging Environment to copy the dlls/views from certain directory to the working directory.
Option 2: store the files into the place where it can be access from different agent machines
You can also store dlls/views in the place where all the agent machines can access. Such as you can store the file into Git repo hosted in GitHub or bitbucket etc. Then clone the git repo in Staging environment.
Answered By - Marina Liu Answer Checked By - Marie Seifert (PHPFixing Admin)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.