Sometimes it happens that for the organization and maintenance purpose, you would like to keep all code related to one component of a product in one place only. Now that component may be complex component having multiple sub parts like API, UI, Database etc. Again, for the purpose of easy maintenance, you would like it all under one repository, which is not an bad idea. Now, imagine if you have different builds configured for different sub-components which are using this source code as their base and are configured to trigger on some event, say commit. Then for each small and big commit, it will trigger build in each of the configured builds. Ideally, if the change was related to only one sub-component say API, then you would need to trigger only API specific build and not the ones for the UI and/or Database. Continue reading “Using Path filters in Build definition in Azure DevOps / VSTS”
In git workflow, the ideal strategy to work is to fork a new branch, make changes and finally merge in the main development branches. Over the time, this results in creation of large number of branches which are not required and becomes stale. Although a branch is just a pointer to an commit and does not require more than 40 bytes of disk space, it can be painful to search a long list of branches and deciding what you want to work on. Also since we humans are not good with creating unique names for branches, they can also result in confusion.
Below are some steps to clean branches from git repository to remove the clutter. Continue reading “Delete Branches in Git using commands”
In git, branch is just a pointer to the one of the commits. So you can create and remove branches very easily. Most of the time, you can select commit of your choice and create a new branch from their and delete the one you do not need. However, sometime you create one branch out of master, intending to merge it to master but later everyone starts using the same and it becomes kind of master. We ran into this situation with one of the source code repository. So to get back on track, we needed to swap the contents of the both branches. Continue reading “Swap master branch with another branch in Git”
In one of the previous blog post, we have discovered how to build GitHub project using Jenkins. In that post, since it was a public repository, we did not tried to authenticate to GitHub. Here, we’ll cover how to use SSH keys to authenticate to GitHub repos. This applies to both public and private source code repositories.
For this post’s purposes, we’ll use a sample source code repository at https://github.com/goyalmohit/DemoRepo01. You can use any repository on which you have required access. …Continue Reading
Build jobs are at the heart of Jenkins. These days GitHub has become an excellent choice for keeping source code repositories due to its features. In this blog post, we’ll cover steps required to build a GitHub project using Jenkins.
To start with, login into Jenkins admin console and go to Manage Jenkins -> Manage Plugins -> Available and then search for GitHub Plugin:
This may install other dependent plugins required for it to work …Continue Reading