Giter VIP home page Giter VIP logo

cicdlabshol's Introduction

Create a project on VSTS

D1.png

Name the project and add description. Also choose the Git as your version control type.

D2.png The project will be create and you will have option to push code or import existing repository.

D3.png

Select import a repository and Clone URL https://github.com/krishnaji/lets-chat.git

D4.png

You should see message Import successful D5.png

Now once the repository is imported , its time to setup a new Build. D6.png

In search box find and add following tasks.

  • npm
  • grunt
  • Archive files
  • Copy and publish build Artifacts

D7.png

Rename the build letschat-CI and select the Agent as Hosted VS2017

D8.png

Now we have to configure each task. Lets start with npm. Set npm task as shown in image.

D9.png

Set Grunt task as shown in image

D10.png

Set up Archive Files task as shown in image below.

D11.png

Setup the Copy and Publish task as show in image below.

D12.png

Now save(only) the build definition. Do not queue for now.

D13.png

Select / as your save build definition folder.

D14.png

Now its time to queue the build.

D15.png

Select Agent as Hosted VS2017

D16.png

You can view the running build.

D17.png

You should see running tasks.

D18.png

Once the build is completed you should see Build Succeeded message.

D19.png

Now lets create a release.

D20.png

Rename the release definition name.

D21.png

Add artifact by selected Add artifact.

D22.png

Now add new environment

D23.png

Name it Stage

D24.png

Click Add dropdown and clone the environment.

D25.png

Name the new cloned environment as Production

D26.png

Add variables. These will be used in Stage and Production task configuration

D27.png

Add two variables as shown below. Select Release as Production and Stage for respective variables. Note the website name is set to your app service name and stage is the Stage slot.

D28.png

Now select Stage Task and add Azure App Service Deploy task. Refer below image.

D29.png

We will first deploy the app to the slot named Stage.Configure the app service deploy task. Select the Azure subscription and Authorize it. Seet the app service name as the variable that we created. Also check the Deploy to slot box. Note: If you get error, open VSTS link incognito or private browsing mode and create Azure Resource Manger Endpoint. Please refer this link

D30.png

D31.png

Now select Production task and configure it to swap the production and stage slots. Save it.

D32.png

Create a new release.

D33.png

Select all environments.

D34.png

Visit the release

D35.png

Deploy Stage manually.

D36.png

D37.png

You should refer the logs for details about the release task execution. The Stage should be successful. Once done you can browse http://<WebAppName>-<SlotName>.azurewebsites.net stage app.

D38.png

Now like stage Deploy the the Production. Once its done you should see the slots are swapped. Visit http://<WebAppName>.azurewebsites.net to verify it.


Edit build defition and enable the Continuous integration trigger.

D39.png

Edit build defition and enable Continuous deployment trigger.

D40.png

Before swapping the Stage with production we need to add an approval. So that we can verify that Stage is working fine and only after approval the swap should happen. Add post stage deployment condition. Approval. You will get notification for approval.

40.png


Finally add settings.yml file and commit changes to vsts git repository. You should be able to see that new build is triggred and running.

cicdlabshol's People

Contributors

krishnaji avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.