Adsense

February 09, 2020

Benefits of Git tagging in DevOps Release

In this article, we will be trying to understand the uses and benefits of tagging with your repository. How it helps you with your release management cycle and hot fixes in real time projects.There are few benefits as highlighted below:
  • A tag is immutable.
  • Tags are branches without branches anyway, just adding a way to reference a specific version of the project to reduce complexity.
  • Use of tags for release versioning is better than using branches commits.
  • You can easily compare the changes between the releases.With Tags you can keep track release versions with every project release cycle.
  • Tags are mainly used for future reference to the specific version of the project, by tagging a commit.
  • With every project releases we should provide an additional piece of documentation that can be extremely helpful in certain cases. With Tags you can add these documentation easily that can be useful for your team-members and clients.
  • Tags are easy to refer while discussion of any release bugs/ defects with your team members.
  • Tags also helps to easy rollback changes to last stable release in case of something breaks with the new release deployments.
  • With tags it is easy to investigate/replicate in local when defects are hard to identify.
  • In some of retail companies which sells their product online might release/deploy with high frequency.

Now Let's understand the different types of branches which we normally use in our project developments. Each of these branches is having a specific purpose. Based on the situation these branches behaves as an originating or merge targets branch.
Git-branches


In my next article, I will show you how these branches can be useful for your git release in DevOps environments. 

Read More »

February 08, 2020

Optimize Json data using DataWeave

In this Article, we will see how we can optimize and allow Json data to accept and transform duplicate elements. In real-time projects optimizing data really matters when we talk about tuning performance. Either you say in terms of  logging data or in terms of processing data every byte matters.


In DataWeave, we have two properties which will hep us to optimize our application data.

  • duplicateKeyAsArray: JSON data does not allow duplicate keys within same parent, so we may get exception in real-time project development scenario. With this attribute, if your dataweave finds any duplicate keys, it will create an array with all those values.

Sample XML Input:

<users>
 <user>
  <personal_information>
   <first_name version="V1">Manish</first_name>
   <first_name version="V1">Mak</first_name>
   <middle_name>Kumar</middle_name>
   <last_name>Sah</last_name>
  </personal_information>
 </user>
</users>


Dataweave Script:


%dw 2.0
output application/json duplicateKeyAsArray=true
---
payload


Sample Output:


{
  "users": {
    "user": {
      "personal_information": {
        "first_name": [
        "Manish",
        "MaK"
        ],
        "middle_name": "Kumar",
        "last_name": "Sah"
      }
    }
  }
}

  • indent: It indicates whether you want to compress your JSON data into a single line or you need JSON data for better readability.
Sample Input:
<users>
 <user>
  <personal_information>
   <first_name version="V1">Manish</first_name>
   <first_name version="V1">Mak</first_name>
   <middle_name>Kumar</middle_name>
   <last_name>Sah</last_name>
  </personal_information>
 </user>
</users>


Dataweave Script:


%dw 2.0
output application/json duplicateKeyAsArray=true, indent=false
---
payload


Sample Output:


{"users": {"user": {"personal_information": {"first_name": ["Manish","MaK"],"middle_name": "Kumar","last_name": "Sah"}}}}


Happy Learning :)

Read More »

February 06, 2020

How to write Attributes from XML to Json - DW2

In project development sometimes we needed to convert the payload from xml to json. We also need to write the xml attributes after transformation. 

For this purpose we can use writeAttributes=true in header section of data-weave. This attribute is available from Dataweave2.


Please find the snippets below:



Sample XML Input:

<users>
<user>
<personal_information>
<first_name version="V1">Manish</first_name>
<middle_name>Kumar</middle_name>
<last_name>Sah</last_name>
</personal_information>
</user>
</users>


Dataweave Script

%dw 2.0
output application/json writeAttributes=true
---
payload

Output:

{
  "users": {
    "user": {
      "personal_information": {
        "first_name": {
          "@version": "V1",
          "__text": "Manish"
        },
        "middle_name": "Kumar",
        "last_name": "Sah"
      }
    }
  }
}

Happy Learning :)
Read More »

February 04, 2020

Five pillars of Azure DevOps

In this article I will discuss about the five pillars(components) of Azure DevOps. These pillars actually helps to build and manage development life-cycle. 
Development life-cycle consists of : 


      • Requirement gathering, 
      • Work plan, 
      • Code management, 
      • CI/CD.
      • Test plans
These components helps key stakeholders proper real time insights of the projects.
5-pillars-of-Azure-DevOps

Azure Boards

Plan, track, and discuss work across teams, deliver value to your users faster. Boards is used for agile project planning. It is a management tool that provides you the ability to link repos, work items, tasks and sub-tasks. With Azure Boards you can track backlogs and customize dashboards and create custom reporting. It easily helps to monitor progress throughout the lifecycle of your project. Moreover you can integrate boards with tools like Microsoft Teams and Slack to sync up with members.
azure-boards

Azure Repos

Unlimited cloud-hosted private Git repos. Collaborative pull requests, advanced file management, and more.
Azure Repos functionality differs between choosing your Git or Team Foundation Source Control. The most common choice is Git. Git is there with the added benefit of linking commits and pull requests to Work Items and CI. you can customise your branch policies to maintain your team’s high standards. It provides you to protect your code quality with branch policies. you can add code reviewer signoff to keep code quality high.
azure-repos



Azure Pipelines

CI/CD that works with any language, platform, and cloud. Connect to GitHub or any Git provider and deploy continuously to any cloud. It allows the building, testing and deployment of code using DevOps practices.
azure-pipeline

Azure Test Plans

The test management and exploratory testing toolkit that lets you ship with confidence. 
azure-test-plans

Azure Artifacts

Create, host, and share packages. Easily add artifacts to CI/CD pipeline. You can share code effortlessly by storing Maven, npm, NuGet and Python packages together and add artifacts to your CI/CD pipelines with a single click.

Azure Overview  gives you real time insights of the project.
Azure-Devops-overview



Happy Learning :)
Read More »