Author: Harshad Patil
Whether your software project is large or small, using version control as soon as possible is a good idea. Version control systems are software that help you track changes you make in your code over time. As you edit your code, you tell the version control system to take a snapshot of your files. The version control system saves that snapshot permanently so you can recall it later if you need it.
Azure DevOps Server is a Microsoft product that provides version control, reporting, requirements management, project management, automated builds, testing and release management capabilities. It covers the entire application lifecycle, and enables DevOps capabilities.
Talking about version control specifically, while creating a new project in Azure DevOps it allows us to select either Git or Team Foundation Version Control. Team Foundation Version Control (TFVC) is a centralized version control system. Typically, team members have only one version of each file on their dev machines. Historical data is maintained only on the server. Branches are path-based and created on the server.
As part of this blog, we’re going to explore how we can integrate Team Foundation Version Control to Anypoint Studio and check in Mule Project on Azure DevOps and deploy it on Cloudhub.
- Go to Azure DevOps and create a new project. Make sure you select Team Foundation Version Control under Advanced options.
2. Create a folder in your local system say (MuleSoft-team-foundation-demo)
3. Create a sample Mule project in Anypoint Studio and go to Help >> Install New Software >> Insert below URL and select Team Explorer Everywhere plugin >> Finish.
URL- http://dl.microsoft.com/eclipse/tfs
4. Open Team Foundation Server Exploring perspective and click Connect to Team Services or Team Foundation Server >> Connect to Team Foundation Server or Team Services Account >> https://{your_organation_name}.visualstudio.com/ >> Next
5. Once you put the organization url, a unique code will be displayed on the screen. Now go to https://www.microsoft.com/devicelogin and enter the same code here.
6. Here you will be able to see the Project we created in Step 1, please select the respective project name and click Finish.
7. Under Team Foundation perspective, click on the TFVC Source Control Explorer
8. Right click on the Project name, select Set Working Folder, and browse the local folder created in step 2.
Once the working folder is selected, Right click and select the Compare option.
9. Now go to TFVC Pending changes and select Detect Local Changes under Actions. All the local changes will be shown under Detected Changes. Click on the same and then select Promote. Now in order to commit your changes put a comment and click on Check In.
10. Go to your Azure DevOps instance and you should see the changes under your respective Repo
Now with the deployed code, we can implement the Azure DevOps CICD features and take advantage of the same. Please refer to Azure DevOps Release and Azure DevOps with Mulesoft to implement CICD pipelines for Mule Projects.