ASP.NET Core CI/CD Pipeline with VS2019 in 10 Minutes!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello youtubers today I want to show you how easy it is to build a CI CD pipeline with agile resources and an asp.net application starting from scratch the new Visual Studio 2019 comes in with real powerful feature when it comes to publishing your asp.net core application that makes it so simple that you can build the entire thing into end with source control in less than 10 minutes so let me show you how this is done I'm gonna start here and create a new project with Visual Studio give it a second there and then here's an asp.net core application let's call this Microsoft demo vs pipeline that way so this is our web application and then let's let's create that alright and we gonna pick up a web application it can be anything else you want but for the purpose of this demo since we really don't care about the little details of the application I'm just gonna start a very simple application that I'm going to show you how you can build a CI CD pipeline entirely for the application for your team to be able to join in and pull in the code and and do all that stuff so this is this is a vs demo pipeline I'm just gonna run in the application here real quick so you can see that it's actually working and it's doing something there we go give it a second there just to kick off well all right so here's here's our web application I'm just kicking that off just to see if things are working as expected so this is just a very simple really and there are no details they're just just a barebone MVC application running our localhost 44 363 port there we go all right so this is your web application so it's just just just barebone just nothing there right so we want to build a pipeline meaning that we want to have source control as your board and as your device but we also want that deployed into Azure full-si ICB pipeline Visual Studio code source control github Azure devups and then asher so how do we go about doing that if you go to the publish tab in here you'll see this really cool feature would they say continuous delivery automatically publish your application to Azure with continuous delivery so if you go configure that I will tell you pick up a subscription and let's build an azure app service for you right which you can edit later and do it however you want right that's out of the scope of this but you will notice up here a message your really cool mess this is your solution needs to be in source control first before you actually can build a CI CD pipeline you need source control so you can push things over so if you go to that you're still in visuals to you it'll help you build that without leaving your ID without leaving your integrated development environment so if you see up at see up here it says as your DevOps publish git repo it'll say which account you know you want to publish your repo to and then which organizations so I'm picking up an organization you get to pick up the name of your repository and then publish repository and just by clicking that it's already building a source control and as your board and agile board and everything else everything else for you and and I'm gonna show you that in a second so this is done right here just by clicking that button it says even see it on the web so you could just click and it'll take you like it couldn't be any simpler you could literally go straight to your organization and if you already have your credentials saved in your browser it'll literally take you straight to to add your DevOps there it is so it basically built the entire thing for you pushed your existing code right but your pipeline is not really it you have nothing in here right so this is where this part comes in so now if you click configure again it'll say ok pick up from branch master here's your subscription here is your app service vs demo pipeline diff as new of course you can change that you can make it literally whatever you want so I'm gonna keep that as is and then I'm just gonna click OK and if you look at the output in here you will notice that it's going to be building resource group app service plan it's literally showing you step by step you know the like if we go to a sure if we go to my agile resources in here you'll see these things are being created in in Azure so it already created resource grab I didn't catch it super fast I already built the resource group it already built the app service plan and the app service so if I go to my resources in here I should see something that's called vs demo pipeline - death that's out there this so check this out I already created the resources for you there it is the two resources in addition to the resource group now it's building the pipeline so our hypothesis here is that this guy is gonna start having things in it see so now it built already the pipeline for you right now the last step would be as soon as it's done is that you'd be able to go and hit so the hereness it's done so it's giving you all the links that you need you have the azure resource group right you have the azure app service this is the URL that we want to hit that it'll take us to the web app I don't expect it to have the web app there yet since it's building and trying to deploy so this is empty right and then you have de vos build pipeline and the release pipeline if you go to the pipelines back in here let's go to the pipeline so you see that guy in here it's already building your your application the release isn't isn't out yet but I really built a release for you so now it's just building your application there it is and the reason why I'm showing you this part - just to show you what it's actually doing these are things like I've been doing this for so long we used to do it each and every step of those manually now it's just two clicks of buttons you know and then it'll build all of that for you since this is all just boilerplate stuff that doesn't really make your application any different from anybody else's you shouldn't be wasting any time trying to do these configurations these these things should be completely automated with with the opportunity that if you want to go in and do changes and have things you still can go in and change it it'll build the basic stuff for you and then you can go in and change it however you want just give it a second there it's doing the build just as the build is done it's gonna go and hit the release so this is the build publishing artefact post job check out everything is great so that's the bill so the bill tears complete it should show you that green nice chick mark and then in the release you'll see that guy kicking off now in a second picking up that from master there it is so now this guy's deploying which means that if we refresh this guy as soon as the deployment is completed we'll see exactly the exact same application that we were just running locally a couple of minutes ago full CIC the pipeline including source control and we gonna do a real quick test as well while we're at it just to make sure things are actually working as expected so this is the release there it is deploying to Azure app service and it's deployed so that means if we refresh this guy in here and it'll basically show us our web application there we go boom the CRM application so full CI CD pipeline with source control with Azure board creating a new project for you all from your IDE I was just showing you how things are but if you stay within the IDE everything is already built and ready for you to to use and all of this under 10 minutes under 10 minutes you're building the entirety of your CI CD pipeline without any issues now just to make sure things are actually as we advertise it to be let's go in here and go to to the views and change something real quick so instead of welcome we want it to say Microsoft is awesome like that I'm gonna go in here and just commit my code commit just a welcome message and then we're gonna commit all of that we want to sync sync is basically commit add push basically so here we sinking oh it even has Fitch commit ad push so all of these and just in just one click so you don't have to worry about any of that so now we push that code our expectation is that this will come will change into Microsoft is awesome let's see if that's actually the case let's go back here so as soon as we push new code that means a new build should have kicked off there it is changed welcome message there we go we store our tests publish post job check out all done now it's gonna kick off a release expect in here a new release will show up there it is let's click on that there is our release building and deploying and doing great things the blind deploying to Azure we get to see even a closer look if you click on the logs you get to see how things are alright deployed so that means if we refresh this page in here it'll on media show will show you the message Microsoft is awesome there is full CI CD pipeline less than ten minutes guaranteed if you have any questions comments or concerns feel free to drop a comment in the comment section and don't forget to Like and subscribe and thank you for watching
Info
Channel: Hassan Habib
Views: 34,408
Rating: undefined out of 5
Keywords: ASP.NET Core, .NET Core, ASP.NET MVC, Azure, Azure DevOps, CI/CD Pipeline
Id: 5qx12m89KCo
Channel Id: undefined
Length: 13min 14sec (794 seconds)
Published: Tue May 28 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.