Bonjour, hi, welcome to another video of cloud in five minute I'm Frank Boucher
Microsoft Azure MVP based in Montreal Canada and today I want to talk about CI
CD continuous integration with Azure device
for today's demo I will take a SP net dotnet core web app and I will put it in
Azure DevOps I want it to be built automatically at
every push and deploy in Azure automatically also so I already create a
simple application called simple Frank demo and I open it in Visual Studio code
I just added the own controller and add cloud 5-minute message now I will need
to create a local repository now if I do a git status everything is up to date
now we need to go in the azure devups to setup our environment so every box is
the rebranding of the VSDs and we got with it a few nice new color and new
feature so there it is I should've ups very similar very clean efficient so
we'll create a new project we'll call it again simple Frank demo I will make it
public and I will still be able to use git so create that will take few second
and voila we have our environment so see the new color are there so we have an
overview here with the documentation dashboard wiki still available we have
the board where we'll have our backlog sprint task everything our repository
and that's where we start what we want is had a remote so I need
to copy this and I will add that so this way now my code will be push into Azure
DevOps perfect already done so now if i refresh I see now I have my code perfect
now the new thing pipelines so this is the new feature it's really powerful so
to get started we'll create a new pipeline for the build so let's create a
new one the build will can work on every person see there is remote or in Azure
so even get up is working so but you saw my code is in Azure repose so we'll use
that he already found it so simple Frank demo is there so we'll pick it and now
you will have multiple template because we are building an application so it
could be custom but you could also go with different templates but for now s
peanut core it's exactly what I need perfect so this new a sure pipeline that
Yama file that's new and maybe a few of you will be uncomfortable with it it's
not that complex a Yama file is a little bit like it JSON file but without the
curly brackets instead it's very important to keep the indentation that
will make a big difference between something that pass or fail trust me
I talk because I know to know more about this just go here in the documentation
you have a bunch of examples and a lot of information and it's also available
in multiple languages for now our Azure pipeline it's not
complete for a full CI CD process but it's enough for a build so we'll keep it
that way now by clicking that save and Run button
I will take that file and save it add it to the root of my repository so that's
why I've here commit and the file our bill just got trigger and now it's
running
great now I worked so see here I have a build and is successful perfect we are
halfway there now we need to create a release pipeline to deploy and I want it
automatic so before we create that we need an
empty shell a web app and we'll do that by using as your CLI so let's go in here
and we'll clear my screen and now wall as we know to have web app in Azure we
need three things first a resource group second a resource plan and the third is
a web app so now I will create a resource group called simple group voila
let's again I will create a service plan I will use the free SKU you don't need
to use free you should in fact use something more but since it said demo
it's good enough what uh so let's clear it and now I'll create the web app again
I'm I'm using the plan and the resource group created previously excellent so
now we have an an app let's go in the portal just see that everything is there
so simple group and now I have my application and my plan great everything
worked perfectly now remember I told you that the
pipeline Asscher pipeline that yama was not good enough for CI CD now we need to
edit it so you know what I think I will come here and I will pulled a new source
I could have just edited right away here but let's check here I have my new
pipeline and we will add new so I'm adding two new task to get packaged we
need to do a that net publish and then we want to move the files in or artifact
folder so I'm creating a task for that that's it
all the tasks those tasks are explained in the document
it's very simple and obviously will change depending on what kind of
solution in a building great so just update pipeline there and I'm
pushing so because I pushed now I should have a new build that got started so
let's have a look pipeline and then build and I see I have
a new building process excellent great so while that thing is building let's
create our release pipeline so we'll go here in pipeline and then release and
we'll click the new pipeline button great now we have a bunch of templates
for for me it will be the azure app service deployment and here you put
something could be proud dev whatever for this spurt demo I will just put to
measure now to deploy we need an artifact so let's grab our artifact from
the previous build so you could have a special repository where you drop from
another server you drop your bill there it could be from github it could be
other source for now we want to use the build so I'm using this one and there
now I will use the latest you could have multiple version with tags that you use
it's a demo so we'll keep it simple and I will name the output drop perfect
I want my release pipeline to get trigger every time I got new artifact
available so here that little lightning bolt we click on that and I will make it
enable and the default branch you could have different nightly build and etc a
bunch of different build for now we'll keep it simple
excellent last thing we need is to specify the destination so first we need
to go and select a subscription
excellent now we need to authorize it I'll just do that off-screen excellent
so we specify the type and then we go for the app service name so service plan
demo is there so now I just need to save it and I will keep it that way
perfect voila so now we need to specify create a release yes
- Roger drops create excellent and if I go see the release one I could even
deploy it
great looks like it's done so now let's go back in the portal or click here
great so now we click here and we should see our website excellent and if I go in
about iCloud five minutes in contact cloud five minutes it worked
now let's see if by adding some content we could trigger everything and redeploy
so let's add a new readme file first I will go change
let's put final here
voila and from the root I want also had the readme file new file
and one thing I want to show you is here now we have build and release and if we
go up here at Build you could go grab some badges so status badges so this is
those thing where you see the status so let's take this and go back here we'll
put that and then I will say blah blah blah save it or call it read me and I
wanted to add the route voila so now I should have to file so us
update commit and I push and now that thing should trigger my build and got
deployed so let's see if i refresh the page perfect our build got triggered
that's not new while it's building let's have a look to
my Rimi file we just had so now we go in the overview summary and we can add
project description so we could add a description from there or use a readme
file so if I click it from the repository we'll see here the simple as
your test bla bla bla and we see my badge so this is the status of the last
build so this is really useful you will have a lot of information though that
information is now dynamic so now let's see what happened with our pipeline so
still building excellent just got done so now if we look the release should be
triggered automatically it is now working excellent
so it really works now let's see if our change got update in our portal just
need to wait a little bit that's always the part that is feel like it's a never
ending gone succeed so if I go and refresh yay it worked
excellent ok so see it were very simple and those pipeline will work whatever
your code is in Azure repos or in github so it's very wonderful and you got a lot
of building for free so use it perfect so see it works so the goal of today was
to show you this guy's because soon I will start a new project while we'll be
building an application from scratch and it will be leveraging those azure devops
tools so I wanted to do a quick overview see what's possible I hope you liked
this video and I hope it was useful if it was your first call in 5 minutes
know that every second week I publish or do like this one to answer technical
question and as usual subscribe like and share it thank you for watching
you