<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Usama Ansari</title>
    <description>The latest articles on DEV Community by Usama Ansari (@usmslm102).</description>
    <link>https://dev.to/usmslm102</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F48231%2F0e8eba9c-0eb3-4224-91f6-a09c9f26fe51.jpg</url>
      <title>DEV Community: Usama Ansari</title>
      <link>https://dev.to/usmslm102</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/usmslm102"/>
    <language>en</language>
    <item>
      <title>Containerizing Angular application for production using Docker</title>
      <dc:creator>Usama Ansari</dc:creator>
      <pubDate>Mon, 30 Mar 2020 22:39:37 +0000</pubDate>
      <link>https://dev.to/usmslm102/containerizing-angular-application-for-production-using-docker-3mhi</link>
      <guid>https://dev.to/usmslm102/containerizing-angular-application-for-production-using-docker-3mhi</guid>
      <description>&lt;p&gt;In this post, we will containerize angular application using Docker.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table Of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Pre-requisites&lt;/li&gt;
&lt;li&gt;Creating Sample Application&lt;/li&gt;
&lt;li&gt;Creating Docker file&lt;/li&gt;
&lt;li&gt;Creating docker ignore file&lt;/li&gt;
&lt;li&gt;Building a docker image&lt;/li&gt;
&lt;li&gt;Running a container&lt;/li&gt;
&lt;li&gt;Publish image to docker hub&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Pre-requisites: &lt;a&gt;&lt;/a&gt;
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://www.docker.com/products/docker-desktop" rel="noopener noreferrer"&gt;Install Docker for Desktop&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Install &lt;a href="https://nodejs.org/en/download/" rel="noopener noreferrer"&gt;Node js&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://angular.io/cli" rel="noopener noreferrer"&gt;Install Angular CLI&lt;/a&gt; Make sure you have the latest version of Angular CLI installed.&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Creating Sample Application &lt;a&gt;&lt;/a&gt;
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;If you already have Angular application you can skip this step&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ol&gt;
&lt;li&gt;Open Terminal / Command Prompt&lt;/li&gt;
&lt;li&gt;Create new folder &lt;code&gt;mkdir AngularDocker&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;cd AngularDocker&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Initialize Angular application &lt;code&gt;ng new SampleApp&lt;/code&gt;
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fqoyr0blvufkc8rgug0ij.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;Navigate to created project &lt;code&gt;cd SampleApp&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Make sure app is running &lt;code&gt;ng serve -o&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Navigate to &lt;a href="https://locahost:4200" rel="noopener noreferrer"&gt;https://locahost:4200&lt;/a&gt; in your browser.&lt;/li&gt;
&lt;li&gt;Feel free to make any changes.&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Creating Docker file &lt;a&gt;&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;To create a docker image we must create the docker file and specify the required steps to build the image.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the Project in Code Editor I'm using &lt;a href="https://code.visualstudio.com/" rel="noopener noreferrer"&gt;VS Code&lt;/a&gt; feel free to use your favorite code editor.&lt;/li&gt;
&lt;li&gt;Create the Dockerfile without any extension in the root of your project.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fehr53ziqk4yy117y6p3f.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;We will use docker multistage build to create an optimized image. In this process, we will start with the node image to build our angular application and then copy the required file in the nginx server image. You can learn more about Docker multistage build &lt;a href="https://docs.docker.com/develop/develop-images/multistage-build/" rel="noopener noreferrer"&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Let's create our docker file&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;FROM node:12.16.1-alpine As builder&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This line will tell the docker to pull the node image with tag 12.6.1-alpine if the images don't exist. We are also giving a friendly name &lt;strong&gt;builder&lt;/strong&gt; to this image so we can refer it later.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;WORKDIR /usr/src/app&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This WORKDIR command will create the working directory in our docker image. going forward any command will be run in the context of this directory.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;COPY package.json package-lock.json ./&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This COPY command will copy package.json and package-lock.json from our current directory to the root of our working directory inside a container which is /usr/src/app.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;RUN npm install&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This RUN command will restore node_modules define in our package.json&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;COPY . .&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This COPY command copies all the files from our current directory to the container working directory. this will copy all our source files.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;RUN npm run build --prod&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This command will build our angular project in production mode and create production ready files in dist/SampleApp folder.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;FROM nginx:1.15.8-alpine&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This line will create a second stage nginx container where we will copy the compiled output from our build stage.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;COPY --from=builder /usr/src/app/dist/SampleApp/ /usr/share/nginx/html&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This is the final command of our docker file. This will copy the compiled angular app from builder stage path &lt;em&gt;/usr/src/app/dist/SampleApp/&lt;/em&gt; to nginx container.&lt;/p&gt;

&lt;p&gt;Complete Dockerfile&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Creating docker ignore file &lt;a&gt;&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;When &lt;code&gt;COPY . .&lt;/code&gt; command execute it will copy all the files in the host directory to the container working directory. if we want to ignore some folder like .git or node_modules we can define these folders in .dockerignore file.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create .dockerignore file in the root folder of your project.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy below content in it.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Building a docker image &lt;a&gt;&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;Navigate the project folder in command prompt and run the below command to build the image.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;docker build . -t usmslm102/sampleapp&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This command will look for a docker file in the current directory and create the image with tag usmslm102/sampleapp. with -t command you can specify the tag for the image the default convention is &lt;code&gt;&amp;lt;DockerHubUsername&amp;gt;/&amp;lt;ImageName&amp;gt;&lt;/code&gt; e.g. &lt;code&gt;usmslm102/sampleapp&lt;/code&gt;. usmslm102 is my docker hub username and sampleapp is the image name&lt;/p&gt;

&lt;p&gt;run &lt;code&gt;docker images&lt;/code&gt; command to list all the docker images in your machine&lt;/p&gt;

&lt;h1&gt;
  
  
  Running a container &lt;a&gt;&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;You can run the docker image using the below command.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;docker run -p 3000:80 usmslm102/sampleapp&lt;/p&gt;

&lt;p&gt;-p flag publishes all exposed ports to the host interfaces. we are publishing container port 80 to host 3000 port.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Navigate to your browser with &lt;a href="http://localhost:3000" rel="noopener noreferrer"&gt;http://localhost:3000&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Publish image to docker hub &lt;a&gt;&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;Docker hub is a container registry maintained by docker. Make sure you have a &lt;a href="https://hub.docker.com/" rel="noopener noreferrer"&gt;docker hub&lt;/a&gt; account. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;docker login&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Provide valid username and password. once the login is succeed run below command to publish.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;docker push &amp;lt;UserName&amp;gt;/&amp;lt;ImageName&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Replace UserName and ImageName with your username and image name. e.g. &lt;code&gt;docker push usmslm102/sampleapp&lt;/code&gt;&lt;br&gt;
My image url: &lt;a href="https://hub.docker.com/r/usmslm102/sampleapp" rel="noopener noreferrer"&gt;https://hub.docker.com/r/usmslm102/sampleapp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fg9kcbaxw2mgww4wnwaxk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fg9kcbaxw2mgww4wnwaxk.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note: By default, the image will be public. Navigate to docker hub image setting to make it private.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7kj56isxysbuiyg1g4n6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7kj56isxysbuiyg1g4n6.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>angular</category>
      <category>docker</category>
      <category>container</category>
    </item>
    <item>
      <title>Git - Cheat Sheet</title>
      <dc:creator>Usama Ansari</dc:creator>
      <pubDate>Tue, 10 Dec 2019 06:54:45 +0000</pubDate>
      <link>https://dev.to/usmslm102/git-cheat-sheet-4f5a</link>
      <guid>https://dev.to/usmslm102/git-cheat-sheet-4f5a</guid>
      <description>&lt;h2&gt;
  
  
  What is git?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Basic Commands:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Initialize local git repository&lt;br&gt;
   &lt;code&gt;&amp;gt; git init&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;check files to commits and branch name&lt;br&gt;
&lt;code&gt;&amp;gt; git status&lt;/code&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;add files to staging area.&lt;br&gt;
&lt;code&gt;&amp;gt; git add FileName.txt&lt;/code&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;add all modified and new files to staging area&lt;br&gt;
&lt;code&gt;&amp;gt; git add --all&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;add all files of directory to staging area&lt;br&gt;
&lt;code&gt;&amp;gt; git add folder/&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Commit changes to local repository&lt;br&gt;
&lt;code&gt;&amp;gt; git commit -m "Message to commit"&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;history of commits&lt;br&gt;
&lt;code&gt;&amp;gt; git log&lt;/code&gt; -- &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Get help for any command&lt;br&gt;
&lt;code&gt;&amp;gt; git help &amp;lt;Command&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;set global user name&lt;br&gt;
&lt;code&gt;&amp;gt; git config --global user.name "Name"&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Show un-staged differences since last commit&lt;br&gt;
&lt;code&gt;&amp;gt; git diff&lt;/code&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;View staged differences&lt;br&gt;
&lt;code&gt;&amp;gt; git diff --staged&lt;/code&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Un-stage files and HEAD Refers to last commit&lt;br&gt;
&lt;code&gt;&amp;gt; git reset HEAD FileName&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Blow away all changes since last commit&lt;br&gt;
&lt;code&gt;&amp;gt; git checkout -- FileName&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;SKIP STAGING AND COMMIT and Add changes from all tracked files. this Doesn’t add new (untracked) files&lt;br&gt;
&lt;code&gt;&amp;gt; git commit -a -m "Modify readme"&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reset into staging and Move to commit before ‘HEAD’&lt;br&gt;
&lt;code&gt;&amp;gt; git reset --soft HEAD^&lt;/code&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add to the last commit with new commit message &lt;br&gt;
&lt;code&gt;&amp;gt; git commit --amend -m "New Message"&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Undo last commit and all changes&lt;br&gt;
&lt;code&gt;&amp;gt; git reset --hard HEAD^&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Undo last 2 commits and all changes&lt;br&gt;
&lt;code&gt;&amp;gt; git reset --hard HEAD^^&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ADDING A REMOTE&lt;br&gt;
&lt;code&gt;&amp;gt; git remote add &amp;lt;name&amp;gt;origin &amp;lt;address&amp;gt;https://giturl&lt;/code&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;show remote repositories&lt;br&gt;
&lt;code&gt;&amp;gt; git remote -v&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To push to remotes&lt;br&gt;
&lt;code&gt;&amp;gt; git push -u &amp;lt;name&amp;gt;origin &amp;lt;branch&amp;gt;master&lt;/code&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Remove remote&lt;br&gt;
&lt;code&gt;&amp;gt; git remote rm &amp;lt;name&amp;gt;&lt;/code&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Clone remote repository&lt;br&gt;
&lt;code&gt;&amp;gt; git clone &amp;lt;address&amp;gt;https://giturl&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create branch&lt;br&gt;
&lt;code&gt;&amp;gt; git branch &amp;lt;BrancName&amp;gt;&lt;/code&gt;  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;create and checkout branch&lt;br&gt;
&lt;code&gt;&amp;gt; git checkout -b &amp;lt;BrancName&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;list available branches&lt;br&gt;
&lt;code&gt;&amp;gt; git branch&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;list remote available branches&lt;br&gt;
&lt;code&gt;&amp;gt; git branch -r&lt;/code&gt; &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Switching between branches&lt;br&gt;
&lt;code&gt;&amp;gt; git checkout &amp;lt;branch name&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;merge 2 branches&lt;br&gt;
&lt;code&gt;&amp;gt; git merge &amp;lt;branch name&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Delete branch&lt;br&gt;
&lt;code&gt;&amp;gt; git branch -d &amp;lt;branch name&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Force delete branch&lt;br&gt;
&lt;code&gt;&amp;gt; git branch -D &amp;lt;branch name&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;get remote changes&lt;br&gt;
&lt;code&gt;&amp;gt; git pull&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;get the remote changes to local remote branch&lt;br&gt;
  &lt;code&gt;&amp;gt; git fetch&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;merge local remote branch changes to local master branch &lt;code&gt;&amp;gt; git merge &amp;lt;local branch&amp;gt;&lt;/code&gt; &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;shows branches alignments&lt;br&gt;
&lt;code&gt;&amp;gt; git remote show origin&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;remove remote branch&lt;br&gt;
&lt;code&gt;&amp;gt; git push origin :&amp;lt;branch name&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To clean up deleted remote branches&lt;br&gt;
&lt;code&gt;&amp;gt; git remote prune origin&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;List all tags&lt;br&gt;
&lt;code&gt;&amp;gt; git tag&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create tag&lt;br&gt;
&lt;code&gt;&amp;gt; git tag -a &amp;lt;Tag Name&amp;gt; -m "Tag message"&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Push new tags to remote&lt;br&gt;
&lt;code&gt;&amp;gt; git push --tags&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Revert to existing tag.&lt;br&gt;
&lt;code&gt;&amp;gt; git checkout &amp;lt;tag name&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This article was originally published at my blog &lt;a href="https://usamaansari.com/git-cheat-sheet-2/"&gt;git-cheat-sheet&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please feel free to mention your favorite git commands in comments ❤ 👇&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>devops</category>
    </item>
    <item>
      <title>My Favorite Visual Studio Code Extensions</title>
      <dc:creator>Usama Ansari</dc:creator>
      <pubDate>Mon, 09 Dec 2019 08:26:42 +0000</pubDate>
      <link>https://dev.to/usmslm102/my-favorite-visual-studio-code-extensions-3e4f</link>
      <guid>https://dev.to/usmslm102/my-favorite-visual-studio-code-extensions-3e4f</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Visual Studio Code is an &lt;strong&gt;open source&lt;/strong&gt; cross-platform code editor developed by Microsoft which runs on Windows, Mac, and Linux.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h6&gt;
  
  
  Top Features:
&lt;/h6&gt;

&lt;ol&gt;
&lt;li&gt;Cross-platform runs everywhere&lt;/li&gt;
&lt;li&gt;Free and Open Source&lt;/li&gt;
&lt;li&gt;Very Lightweight (Believe me it's fast ⚡)&lt;/li&gt;
&lt;li&gt;Supports many languages (JavaScript, TypeScript, C#, Go ....)&lt;/li&gt;
&lt;li&gt;Built-in intellisense and code debugging&lt;/li&gt;
&lt;li&gt;Built-in Git Support ❤&lt;/li&gt;
&lt;li&gt;Highly customization (thousands of great extensions)&lt;/li&gt;
&lt;/ol&gt;

&lt;h6&gt;
  
  
  Where to get?
&lt;/h6&gt;

&lt;p&gt;You can download VS code from &lt;strong&gt;&lt;a href="https://code.visualstudio.com/"&gt;https://code.visualstudio.com/&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
The source code is hosted on &lt;strong&gt;&lt;a href="https://github.com/Microsoft/vscode"&gt;GitHub&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;VS code has thousands of great extensions built by communities and individual developers. You can explore all extensions at &lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/vscode"&gt;Visual Studio Marketplace&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Below are my favorite extensions:
&lt;/h5&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync"&gt;Settings Sync&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2XVEh1tz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/jeuti8s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2XVEh1tz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/jeuti8s.png" alt="Settings Sync"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This extension will come to your rescue if you use multiple computers or just switching from one machine to another. It syncs your settings, extensions, key bindings and snippets across VS code installations by using &lt;a href="https://gist.github.com/"&gt;gist&lt;/a&gt;.&lt;br&gt;
 &lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync"&gt;Settings Sync&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory"&gt;Git History&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jQQF8416--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://imgur.com/lY1ZMJR.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jQQF8416--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://imgur.com/lY1ZMJR.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xZqvwviA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/DonJayamanne/gitHistoryVSCode/master/images/fileHistoryCommand.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xZqvwviA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://raw.githubusercontent.com/DonJayamanne/gitHistoryVSCode/master/images/fileHistoryCommand.gif" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you use git this should be your go to extension. Although VS code has built-in Git support but this extension just take it to the next level.&lt;br&gt;
&lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory"&gt;Git History&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Similar extension:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens"&gt;GitLens — Git supercharged &lt;/a&gt;&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag"&gt;Auto Rename Tag&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Dx2sC-a3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/TSYnNlN.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Dx2sC-a3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/TSYnNlN.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uXR3qoQI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://github.com/formulahendry/vscode-auto-rename-tag/raw/master/images/usage.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uXR3qoQI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://github.com/formulahendry/vscode-auto-rename-tag/raw/master/images/usage.gif" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is a very simple extension but comes very handy if you write lot of HTML it just auto close your tags and makes your life easy.&lt;br&gt;
&lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=formulahendry.auto-rename-tag"&gt;Auto Rename Tag&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer"&gt;Live Server&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Kpo-zcFd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/olISArk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Kpo-zcFd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/olISArk.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gdAtWI7G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://github.com/ritwickdey/vscode-live-server/raw/master/./images/Screenshot/vscode-live-server-animated-demo.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gdAtWI7G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://github.com/ritwickdey/vscode-live-server/raw/master/./images/Screenshot/vscode-live-server-animated-demo.gif" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It creates a local live server with auto refresh. comes very handy if you are developing/designing static sites or just doing some quick prototype.&lt;br&gt;
&lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer"&gt;Live Server&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=PeterJausovec.vscode-docker"&gt;Docker&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--s7z4U3_Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Y7EtkFr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--s7z4U3_Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Y7EtkFr.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--KpGzBEO1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://github.com/microsoft/vscode-docker/raw/master/images/generateFiles.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KpGzBEO1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://github.com/microsoft/vscode-docker/raw/master/images/generateFiles.gif" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are doing containerized application development with docker then this extension is extremely useful. This will help you to automate Dockerfile, docker-compose.yml, and .dockerignore file generation and deployments.&lt;br&gt;
&lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=PeterJausovec.vscode-docker"&gt;Docker&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp"&gt;C#&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--h3AzdxQI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/CiAWrgJ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h3AzdxQI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/CiAWrgJ.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are .NET developer and working on .NET Core (cross-platform .NET implementation for websites, servers, and console apps on Windows, Linux, and macOS) then you can develop a .NET application on your choice of OS without installing Visual Studio.&lt;/p&gt;

&lt;p&gt;C# extension will ease your .Net Core development on VS Code and comes with editing support, including Syntax Highlighting, Debugging, IntelliSense, Go to Definition, Find All References, etc.&lt;br&gt;
&lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp"&gt;C#&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare"&gt;VS Live Share&lt;/a&gt;&lt;/strong&gt; 🔥&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zffs85VD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Vw7zHSN.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zffs85VD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/Vw7zHSN.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: Visual Studio Live Share is currently in preview. Features and user experience is not final.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you ever co-authored any document either in google docs or Microsoft word then this extension will help you to co-edit and co-debug your application.&lt;br&gt;
This is really cool I would encourage you to give it a shot you will ❤ it. It even works with Visual Studio.&lt;br&gt;
&lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare"&gt;VS Live Share&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Themes
&lt;/h3&gt;

&lt;p&gt;I told you VS code is highly customizable code editor and we have tons of Themes in VS code marketplace &lt;a href="https://marketplace.visualstudio.com/search?target=VSCode&amp;amp;category=Themes&amp;amp;sortBy=Downloads"&gt;Themes&lt;/a&gt; section. Below are my two favorite themes.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=zhuangtongfa.Material-theme"&gt;One Dark Pro&lt;/a&gt;&lt;/strong&gt; &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Iri7ZeBu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/tfgkm6elyedakmkj8ajn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Iri7ZeBu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/tfgkm6elyedakmkj8ajn.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://camo.githubusercontent.com/48f39d862900e54913410490e566a9e761bc5ad5/68747470733a2f2f7773332e73696e61696d672e636e2f6c617267652f303036744e6252776779316676776b7236693139396a33316b7731366f7461742e6a7067" class="article-body-image-wrapper"&gt;&lt;img src="https://camo.githubusercontent.com/48f39d862900e54913410490e566a9e761bc5ad5/68747470733a2f2f7773332e73696e61696d672e636e2f6c617267652f303036744e6252776779316676776b7236693139396a33316b7731366f7461742e6a7067" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=zhuangtongfa.Material-theme"&gt;One Dark Pro Theme Official&lt;/a&gt;&lt;/strong&gt; &lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=dracula-theme.theme-dracula"&gt;Dracula Official&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--V13WRku---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/VOU7ke1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--V13WRku---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/VOU7ke1.png" alt=""&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nZCjnNZm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/zvFcjpq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nZCjnNZm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/zvFcjpq.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=dracula-theme.theme-dracula"&gt;Dracula Official&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;Please feel free to mention your favorite extension or theme in comments ❤ 👇&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>visualstudiocode</category>
      <category>extensions</category>
    </item>
    <item>
      <title>Create &amp; Deploy Azure Function ⚡ using VS code and Azure DevOps (CI/CD)</title>
      <dc:creator>Usama Ansari</dc:creator>
      <pubDate>Sat, 30 Mar 2019 14:33:19 +0000</pubDate>
      <link>https://dev.to/usmslm102/create-deploy-azure-function-using-vs-code-and-azure-devops-ci-cd-3kmb</link>
      <guid>https://dev.to/usmslm102/create-deploy-azure-function-using-vs-code-and-azure-devops-ci-cd-3kmb</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Azure Function 🚀 is Microsoft faas (function as a service) offering. Where you can build apps without worrying about server and infrastructure that scale to meet demands. You can use your choice of programming language.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Let's get started... &lt;/p&gt;

&lt;h5&gt;
  
  
  Pre-requisites
&lt;/h5&gt;

&lt;ol&gt;
&lt;li&gt;Azure Devops Account (&lt;a href="https://azure.microsoft.com/en-us/services/devops" rel="noopener noreferrer"&gt;Get for Free&lt;/a&gt;) &lt;/li&gt;
&lt;li&gt;Azure Account (&lt;a href="https://azure.com/free" rel="noopener noreferrer"&gt;Sign up for Free&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Visual Studio Code (&lt;a href="https://code.visualstudio.com/download" rel="noopener noreferrer"&gt;Download&lt;/a&gt;)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;em&gt;This article is quite long. please feel free to jump to the desired section&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;ol&gt;
&lt;li&gt;Create an Azure DevOps Project&lt;/li&gt;
&lt;li&gt;Create Azure function locally&lt;/li&gt;
&lt;li&gt;Add Azure Resource Manager (ARM) Template &lt;/li&gt;
&lt;li&gt;Push code to git Repository&lt;/li&gt;
&lt;li&gt;Create Build / CI (Continuous Integration) Pipeline&lt;/li&gt;
&lt;li&gt;Create Release / CD (Continuous Delivery) Pipeline&lt;/li&gt;
&lt;/ol&gt;
&lt;/blockquote&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;h6 id="CreateDevopsProject"&gt;Create an Azure DevOps Project&lt;/h6&gt;

&lt;p&gt;Follow the below steps to Create a new Azure DevOps Project:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Login to Your Azure DevOps tenant &lt;a href="http://dev.azure.com/%5Busername%5D" rel="noopener noreferrer"&gt;http://dev.azure.com/[username]&lt;/a&gt;
replace [Username with your tenant name] e.g &lt;a href="http://dev.azure.com/usmslm102" rel="noopener noreferrer"&gt;http://dev.azure.com/usmslm102&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Create Project&lt;/strong&gt; and Provide the required details
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7oi1xctja3qehx8s30cm.png" alt="Create Account"&gt; &lt;/li&gt;
&lt;li&gt;Once the project is created you will be redirected to welcome page.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjqel5a7rihntz9ffba9q.png"&gt; 

&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;h6 id="CreateFunction"&gt;Create Azure function locally&lt;/h6&gt;

&lt;p&gt;Follow the below steps to create and run azure function locally&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open Visual Studio Code and install &lt;code&gt;Azure Functions&lt;/code&gt; and &lt;code&gt;C#&lt;/code&gt; extensions if you already have it installed then skip.&lt;/li&gt;
&lt;li&gt;click on extensions from the sidebar and search for &lt;code&gt;Azure Functions&lt;/code&gt; and click on the install button
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F74d7wbdrd11w952g7vlb.png"&gt;
&lt;/li&gt;
&lt;li&gt;Search for &lt;code&gt;C#&lt;/code&gt; extension and click install&lt;/li&gt;
&lt;li&gt;Create a new folder named AzureFunctions and open in vs code&lt;/li&gt;
&lt;li&gt;Press &lt;code&gt;ctrl/cmd (on MAC) + shift + p&lt;/code&gt; and type &lt;code&gt;Create Function&lt;/code&gt;
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7h268ho7v9wvt16lecwh.png"&gt;
&lt;/li&gt;
&lt;li&gt;Select &lt;em&gt;Create Function&lt;/em&gt; and select current folder&lt;/li&gt;
&lt;li&gt;You will get a prompt saying "The selected folder is not a function app project. Initialize Project?" click Yes&lt;/li&gt;
&lt;li&gt;Select C# as a language
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4awsalmvpsxhnof3vga3.png"&gt;
&lt;/li&gt;
&lt;li&gt;VS code will initialize function app and will ask to select the function template&lt;/li&gt;
&lt;li&gt;Select HttpTrigger and press enter with default "HttpTriggerCSharp" function name and "Company.Function" for namespace&lt;/li&gt;
&lt;li&gt;Select Access Rights as Function and press enter&lt;/li&gt;
&lt;li&gt;Press F5 to test our function locally and copy the function URL
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgr0prtctvsqmnm60do6f.png"&gt;
&lt;/li&gt;
&lt;li&gt;Navigate to copied URL and provide the parameter called name e.g. &lt;code&gt;?name=World&lt;/code&gt;
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgcfuzo0ru1lmjvg9aom7.png"&gt;
&lt;/li&gt;
&lt;li&gt;Voila, our function is up and running 😱

&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;li&gt;&lt;h6 id="AddARM"&gt;Add Azure Resource Manager (ARM) Template&lt;/h6&gt;&lt;/li&gt;

&lt;/ol&gt;

&lt;p&gt;We need to create Azure Resources before deploying our function. we will use ARM template to create below Azure resources.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Azure Function App&lt;/li&gt;
&lt;li&gt;Azure Storage Account&lt;/li&gt;
&lt;li&gt;Consumption app service plan

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Below ARM template will create all 3 resources:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a functionapp.json file inside folder Templates and paste below content&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;functionapp.json&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a functionapp.parameters.json file inside folder Templates and paste below content&lt;/p&gt;


&lt;p id="functionappparameter"&gt;&lt;b&gt;functionapp.parameters.json&lt;/b&gt;&lt;/p&gt;

&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;

Note: Change the appName value to unique name in &lt;strong&gt;functionapp.parameters.json&lt;/strong&gt;

&lt;p&gt;Final folder structure looks like below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs971fon83pd6eid5ec1n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs971fon83pd6eid5ec1n.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;ol&gt;
&lt;li&gt;&lt;h6 id="git"&gt;Push code to git Repository&lt;/h6&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We are all set to push the code to our git repository. When we created Azure DevOps project we get the default git repository same as the project name. &lt;br&gt;
Navigate to Azure DevOps project and click on Repos on the left navigation. You will see we have an empty repository named "AzureFunction" same as our project name.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffuevxa735vwiafj7zkpa.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffuevxa735vwiafj7zkpa.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are several ways to push our code changes to a remote repository:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Clone remote repository to your computer and start adding files&lt;/li&gt;
&lt;li&gt;Push existing local repository to remote repository&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;As we have already created our project lets use 2nd option and push our project to a remote repository. &lt;br&gt;
Open your favorite command prompt and navigate to our project folder or as we are using VS code we can use it's integrated terminal press &lt;code&gt;ctrl + `&lt;/code&gt; to open it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Copy the git remote push command from Azure DevOps Repos page. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;code&gt;&amp;gt; git init&lt;/code&gt;&lt;br&gt;
  &lt;code&gt;&amp;gt; git add .&lt;/code&gt;&lt;br&gt;
  &lt;code&gt;&amp;gt; git commit -am "Add function app"&lt;/code&gt;&lt;br&gt;
  &lt;code&gt;&amp;gt; git remote add origin &amp;lt;git Repo Url&amp;gt;&lt;/code&gt;&lt;br&gt;
  &lt;code&gt;&amp;gt; git push -u origin --all&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqyrxj9xd4rs9xufvqdg6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqyrxj9xd4rs9xufvqdg6.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Refresh your Azure DevOps Repos page and you should see the function app files. 😎&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fala3jmuho2foj55cyfj4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fala3jmuho2foj55cyfj4.png"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;


&lt;ol&gt;
&lt;li&gt;&lt;h6 id="CI"&gt;Create Build / CI (Continuous Integration) Pipeline&lt;/h6&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Our Repository contains the source code for function app which needs to be compiled before publishing to Azure. As our function app is .net core project let's create the CI pipeline to build function app project and publish the required artifices.  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Navigate to Azure DevOps project and click on build under pipelines. currently, we don't have any CI Pipeline. Let's create one. click on &lt;strong&gt;New Pipeline&lt;/strong&gt; button. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Azure DevOps will ask us where our source code resides. Azure DevOps supports multiple SCM providers such as Azure Repos, GitHub, BitBucket, Subversion etc. As our source code is hosted on Azure Repos select "Azure Repos Git" and provide the required details and click on continue button.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjez6lryz4i1jsx9s4tbf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjez6lryz4i1jsx9s4tbf.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;click on "Empty Job" as we will define our tasks&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;As our function based on .net core let's add restore, build and publish task to generate our build artifacts&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on "+" button and search for &lt;code&gt;.net core&lt;/code&gt; task and click on add button. Select .NET core task and change values as follows dotnet restore:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9e52bumcv9mhs3v2ys69.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9e52bumcv9mhs3v2ys69.png"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;dotnet restore:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Display name: &lt;code&gt;dotnet restore&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Command: &lt;code&gt;restore&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Path to project(s): &lt;code&gt;**/*.csproj&lt;/code&gt;
&lt;em&gt;This step will restore the nuget packages for our project&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Repeat above step for Build and publish task&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;dotnet build:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Display name: &lt;code&gt;dotnet build&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Command: &lt;code&gt;build&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Path to project(s): &lt;code&gt;**/*.csproj&lt;/code&gt;
&lt;em&gt;This step will build our project&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;dotnet publish:&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Display name: &lt;code&gt;dotnet publish&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Command: &lt;code&gt;publish&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Un-Checked: Publish Web Projects&lt;/li&gt;
&lt;li&gt;Path to project(s): &lt;code&gt;**/*.csproj&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Arguments: &lt;code&gt;--no-restore --configuration Release --output $(Build.ArtifactStagingDirectory)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Checked: Zip Published Projects&lt;/li&gt;
&lt;li&gt;Checked: Add project name to publish path
&lt;em&gt;This step will take our build files and zip it and put in ArtifactStagingDirectory&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now we need to published the compiled code and ARM templates as build artifacts so we can use these packages in our Release pipeline. Click on '+' and search for task &lt;code&gt;publish build Artifacts&lt;/code&gt;. select the task and click add&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Display name: &lt;code&gt;Publish Artifact: drop&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Path to publish: &lt;code&gt;$(Build.ArtifactStagingDirectory)&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Artifact name: &lt;code&gt;drop&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Artifact publish location: &lt;code&gt;Azure Pipelines/TFS&lt;/code&gt;
&lt;em&gt;This step will take our zip files from ArtifactStagingDirectory and publish it to Azure Pipelines build artifacts in the drop folder&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Let's publish our ARM templates to drop folder as well. Click on '+' and search for task &lt;code&gt;publish build Artifacts&lt;/code&gt;. select the task and click add&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Display name: &lt;code&gt;Publish ARM: drop&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Path to publish: &lt;code&gt;Templates&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Artifact name: &lt;code&gt;drop&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Artifact publish location: &lt;code&gt;Azure Pipelines/TFS&lt;/code&gt;
&lt;em&gt;This step will take our ARM files from SourceDirectory and publish it to Azure Pipelines build artifacts in the drop folder&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Our final pipeline looks like:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftov3nus1nj5rvrkc60g8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftov3nus1nj5rvrkc60g8.png"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Let's Save and queue our pipeline. click on "Save &amp;amp; Queue" drop down from the top and select Agent pool: "Hosted VS2017" and Branch: "master" then click on the button "Save &amp;amp; Queue". Azure DevOps will find the available agent and run our tasks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Navigate to builds pipeline page from left navigation and select our build pipeline. we can see all our build on this page. click on latest build. It will show us the logs of the specified tasks in our build pipeline. on top right click on &lt;strong&gt;Artifacts&lt;/strong&gt; drop down and select &lt;code&gt;drop&lt;/code&gt;. It will open artifacts explorer. expand drop folder and we can see our ARM template and compiled function app in the zip package. We will use these artifacts in our Release pipeline.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjihfcbvkdhn7o3ubvviz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjihfcbvkdhn7o3ubvviz.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We don't want every-time to open Azure DevOps and click on queue button to build our code changes. we want if our code changes then the build should automatically trigger. Let's enable Continuous integration to achieve this.&lt;br&gt;&lt;br&gt;
  Edit our build pipeline and navigate to &lt;strong&gt;Triggers&lt;/strong&gt; tab and check &lt;em&gt;"Enable continuous integration"&lt;/em&gt; and select master as branch filter and click on the &lt;em&gt;Save &amp;amp; queue&lt;/em&gt; drop down and select &lt;strong&gt;Save&lt;/strong&gt;.&lt;br&gt;
 &lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flypr3n9aejseg1n6blvt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flypr3n9aejseg1n6blvt.png"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We are done with our CI pipeline and we are getting build artifacts as well. let's use these artifacts and deploy to Azure using Release/CD pipeline &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;ol&gt;
&lt;li&gt;&lt;h6 id="CD"&gt;Create Release / CD (Continuous Delivery) Pipeline&lt;/h6&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Our Repository contains the source code for function app which needs to be compiled before publishing to Azure. As our function app is .net core project let's create the CI pipeline to build function app project and publish the required artifices.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Navigate to Azure DevOps project and click on &lt;strong&gt;Releases&lt;/strong&gt; under pipelines. currently, we don't have any CD Pipeline. Let's create one. click on New Pipeline button.&lt;/li&gt;
&lt;li&gt;Azure DevOps will ask us to select a pre-defined template. As we will define our own tasks let start with an Empty Job.&lt;/li&gt;
&lt;li&gt;Click on Empty Job.&lt;/li&gt;
&lt;li&gt;We have to define the deployment stage. type stage name as &lt;code&gt;Production&lt;/code&gt; and close the pop-up by clicking on x.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F54p2dtfn5eu9ao8fmova.png"&gt;
&lt;/li&gt;
&lt;li&gt;We need to tell our release pipeline from where to get the deployment artifacts. click on big "Add an artifact" button.&lt;/li&gt;
&lt;li&gt;Select source type as Build and select our build pipeline in &lt;strong&gt;"Source (build pipeline)"&lt;/strong&gt; section.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo12yi0bahesrhyxt1mo8.png"&gt;
&lt;/li&gt;
&lt;li&gt;select &lt;strong&gt;Default version&lt;/strong&gt; as Latest. so that every release will take the latest artifacts by default.&lt;/li&gt;
&lt;li&gt;click on the &lt;strong&gt;Add&lt;/strong&gt; button.&lt;/li&gt;
&lt;li&gt;Before we define our deployment tasks lets enable the Continuous deployment trigger to automatically deploy our changes as soon as new build artifacts are available. click on the ⚡ icon and enable &lt;strong&gt;Continuous deployment trigger&lt;/strong&gt; and close the pop-up by clicking on x.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbkg00vsnpffx4xk0uqdq.png"&gt;
&lt;/li&gt;
&lt;li&gt;Let's define our tasks by clicking on "1 job, 0 task" link under our production stage. This will open the task window same as build pipeline.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5kyqt6kamsozzpepmfgg.png"&gt;
&lt;/li&gt;
&lt;li&gt;We need to create two tasks first we have to create Azure function app and its dependencies using our ARM template then we will deploy Azure function package on it.&lt;/li&gt;
&lt;li&gt;click on "+" and search for &lt;code&gt;Azure Resource Group Deployment&lt;/code&gt; and click add. This step needs our Azure account details and ARM template files

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Azure subscription:&lt;/strong&gt; select Azure subscription from drop down.  if required click on the Authorize button to configure an Azure service connection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Action:&lt;/strong&gt; &lt;code&gt;Create or update resource group&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource group:&lt;/strong&gt; type &lt;code&gt;AzureFunction&lt;/code&gt; as &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Location:&lt;/strong&gt; &lt;code&gt;East US&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Template location:&lt;/strong&gt; Linked artifact&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Template:&lt;/strong&gt; click on &lt;code&gt;...&lt;/code&gt; and select functionapp.json from drop folder. final URL will like this &lt;em&gt;$(System.DefaultWorkingDirectory)/_AzureFunction-CI/drop/functionapp.json&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment mode:&lt;/strong&gt; &lt;code&gt;Incremental&lt;/code&gt;
&lt;em&gt;This step will deploy our ARM template to create function app and its dependencies in the defined Resource group under defined subscription&lt;/em&gt;
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx1aghp8mrp0gm60uqr9f.png"&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;click on "+" and search for &lt;code&gt;Azure App Service Deploy&lt;/code&gt; and click add. This step needs our Azure account details and zip package file.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Azure subscription:&lt;/strong&gt; select Azure subscription from drop down. if required click on the Authorize button to configure an Azure service connection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;App Service type:&lt;/strong&gt; &lt;code&gt;Function App on Windows&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;App Service name:&lt;/strong&gt; type app Name which you specified in the functionapp.parameters.json file under &lt;em&gt;Add Azure Resource Manager (ARM) Template&lt;/em&gt; section.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Package or folder:&lt;/strong&gt; &lt;code&gt;$(System.DefaultWorkingDirectory)/**/*.zip&lt;/code&gt;
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4pg5culqx3waphmxknvr.png"&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Before we save our pipeline lets rename it to &lt;code&gt;AzureFunction-CD&lt;/code&gt; and click on &lt;strong&gt;Save&lt;/strong&gt; button.&lt;/li&gt;
&lt;li&gt;Let's create a release and deploy our resources to Azure.😎&lt;/li&gt;
&lt;li&gt;Click on Release &amp;gt; Create a Release. Finally, click on the &lt;strong&gt;Create&lt;/strong&gt; button
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Flpjas88v9mit5ron8uju.png"&gt;
&lt;/li&gt;
&lt;li&gt;Navigate to Releases pipeline page from left navigation and select our Release pipeline. we can see all our Release on this page. click on latest Release and see the progress.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcg2du1go5yhtsh7hdyqy.png"&gt;
&lt;/li&gt;
&lt;li&gt;Once the release is finished. navigate to the Azure portal and open the &lt;code&gt;AzureFunction&lt;/code&gt; Resource Group. Voila, function app and its dependencies are created now.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0t36k90y0zasmz33okc4.png"&gt;
&lt;/li&gt;
&lt;li&gt;open function app and get the function URL to test it.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fng1ywhrqdeom3rbo8hy4.png"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Cheers 🥂&lt;/p&gt;

</description>
      <category>azure</category>
      <category>devops</category>
      <category>azurefunctions</category>
    </item>
  </channel>
</rss>
