Projects in VSTS

We want to achieve CI/CD as depicted in the following diagram:

We will utilize Visual Studio Team Services (VSTS) for Continuous Integration and Continuous Delivery to deploy Azure Functions as and when code changes are committed in the Git repository hosted in VSTS:

  1. First, we will create a project in VSTS so that we can store code and configure Continuous Integration and Continuous Delivery using the build and release definitions:
  2. Visit visualstudio.com and sign in:
  1. On the VSTS dashboard, create a new account or select an existing account.
  2. We already have a few projects available in the dashboard.
  3. Click on New Project:
  1. Provide the details for the Project name, Version control, and Work item process. Click on Create:
  1. Click on Generate Git credentials:
  1. Provide the details as required and click on Save Git Credentials:
  1. Once we have Git set up in the VSTS dashboard, go to the directory where Azure Function code is available.
  2. If Git for Windows is not installed, then install it first.

 

  1. Right click in the directory window and click on Git Bash Here:
  1. Initialize the Git repository with the git init command.
  2. Verify the status of the git status command in the Git Bash.
  3. Execute the git add. command.
  4. Verify the git status command and now we can see that both files are tracked.

 

  1. Execute the git commit command to commit the code to the local repository.
  1. From VSTS, copy the git remote command and execute in Git Bash.
  2. Execute the git push command to execute the push operation on the code of Azure Functions:
  1. It will prompt for Azure sign in. Provide the username. Click on Next:
  1. Provide the password and click on Sign in:
  1. The code will be pushed to the Git repository configured in VSTS:
  1. Go to VSTS and click on the Code section to verify whether the code is available in the repository or not:

In the next section, we will configure Continuous Integration.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.31.163