Online Marketing

Building and Deploying your Code with Azure Pipelines

Today, I’m going to show you the ultimate DevOps tool for creating your own CI CD pipelines for any language targeting any platform, I’m going to be showing you a sure pipelines with Azure pipelines. We’ve made it ridiculously simple: to go from nothing at all to a new. As your pipelines project see, people have been telling us it’s too complicated to get started with your DevOps tools and guess what we listen.

So, let’s go check this out. Let’s say your code is sitting somewhere like on github and you don’t have an azure DevOps account, and now you want to create a CI CD pipeline. Well, just go to this landing. Page click on start free with pipelines, and it’s going to create for you, your own organization, where now all you have to do is jump in here type in your project, name, click create and bam. That is all you need to do now when it’s done creating the project.

You’ll have an empty Asscher pipeline project like this, so let’s go ahead and create our first pipeline, so we’ll jump into our pipelines and we’ll go ahead and create a brand new one, and the very first thing it asks you is: where is your code? Is it up and github? Is it in and Azure repos? We also support tfv c and bitbucket cloud, but for those you have to use the visual designer now my code is sitting out in github.

So let me go ahead and authorize with github and once it’s done authorizing with github I’ll, be able to see all of my private repos and public repos out in my github account. So let me choose my repo and now it’s going to go and analyze the code and the technology used inside my repo and based on what it sees it’s going to offer me a couple templates. It just so happens. My application is an asp.

Net app, but if my repo held, let’s say no js’ app running in a docker container, guess what it will create for me a bill pipeline that makes sense for the technologies that we picked all right. So now it’s going to create. For me, my pipeline, using a yamo file, now I’m going to go ahead and add a couple more tasks and basically the tasks that I’m going to add. I’r just going to go ahead and copy my zip file, that’s created and deploy and take my build, artifacts and publish them back up to Azure pipelines.

Now, once that’s done, let’s go ahead and save and run this build and voila. That is literally all we have to do, and now it’s kicked off our build. So now it’s going to go ahead and spin up a build agent and it’s going to go ahead and build our application for us now. It’s going to download my code from github is going to restore my packages from you. Get is going to compile everything using Visual Studio.

It will go ahead and run my unit test right is this right. Here is just what we used to have in V. Sts. Now, if you remember, we defined this build using a yamo file. If you guys, like yamo files, that’s freaking awesome. I love yamo files because pipeline s code. What we’re doing here this really speaks to the DevOps in me right, however, if you still want to define our builds or describe our builds using the visual editor, you absolutely still can and hooray for that looks like our build has finished.

Let’s go ahead and jump into the summary where now you can see a timeline of everything. That’s happened during this build, including all the tests that were run now notice. The one thing that’s missing is going to be where’s my deployments. Well, there are no deployments because we haven’t created a release yet so, let’s go ahead and create a release for this build I’ll, go ahead and click on the release link, and it will take me to the visual editor for the release pipeline now, because I’m deploying Into Azure it makes things insanely simple: let’s choose the azure app service deployment, template click apply and hurray.

For that, that’s all we need to do now when you go and create a pipeline for your releases. The first thing you have to do is you have to define your stages, so we’ll call this our staging, and next you have to define what are the tasks that are going to run for this particular stage. Now everything is filled out for us because we’re using a template, but I do need to connect my accounts with my subscription.

So what I’m doing right now is I’m connecting my Asscher pipelines account to my Azure subscription. Once this is done, we can go ahead and jump in here and select the app service that we’re going to be deploying to. In my case, I am deploying to Azure DevOps launch now, there’s one other change that I want to make, because this is my staging environment. So I’m going to go ahead and deploy this into my slate staging slot.

So first I have to choose my resource group. Then I have to come in here and choose my staging slot now, what if you wanted to do more than just deploy an app to Azure app service well to customize these release pipelines? What you would do is add and remove tasks now out of the box, as your pipeline gives you about a hundred tasks that you can just download and start using now, if what you want to do doesn’t exist out of the box, it’s not a big deal Because go to the marketplace in the marketplace: our partners have created over 700, build and release tasks that you can just download and start using now.

If what you want to do doesn’t exist in the marketplace and doesn’t exist, out-of-the-box guess what you can create your own custom tests as well custom tasks. Those are nothing more than PowerShell or no js’. So what that means is anything you can do from the command line. You can easily get Azure pipelines to do as well all right, so we’ve created a really small pipeline right, we’re just deploying into one staging environment.

Let’s go ahead and look at this a little bit deeper because after you’ve created your stage and you’ve created the tasks that should run in your stage, you have the ability to add approvers before and after each stage. So let’s go ahead and add a post deployment. Approver and I’m just going to add myself select that and you know what let’s go ahead and clone this, because I want to add a new stage.

I want to add a new stage where I can deploy to my production. So we’ll call this production and from here jump into the production tasks, and I do need to make a couple of changes. One of them that I’d need to make is instead of deploying to a slot. This is production, so I’m just going to deploy it to my app service itself. So I’ll go ahead and save this now and now let’s go and release this I’ll click on release, click create and just like that I’ve created a release and now the release will start flowing through our staging environment and after I approve it, it can flow all The way out into production, easy peasy, so there you go Azure pipelines for your code.

We’ve made it so simple to go from nothing to a full, CI CD pipeline for any language targeting any platform. And yes, this is your code sitting in your repository of choice, deploying to wherever you need it to be deployed. It can be in Azure, of course, but it can also just as easily be behind your firewall in front of your firewall anywhere. Remember any language targeting any platform, and not only that if you have an open source project, guess what? If you get all of this for free, you get 10 parallel pipelines, out-of-the-box and if you need more, just ping us and we’ll give you more so go and check out as your pipelines today by going to dev, calm,


By Jimmy Dagger

Find out my interests on my awesome blog!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.