As part of the Continuous Integration process, new builds are generated which contains certain enhancements or modification or bugfixes. For a containerized application deployment, docker images are created as part of builds which then needs to be uploaded to one of the container registries. Over the time, the registry will get filled up. Also as one use more and more space on the container registry, one needs to pay more and more.
There are no inbuilt commands or utilities provided by Docker for this. You have to write complex scripts for doing it. Fortunately, in latest round of the Azure CLI update, Microsoft has added some commands to do this. However, it can be cumbersome to select and remove docker images one at a time. Continue reading “Remove old docker images from Azure Container Registry”
In old days (not so old, albeit like a one or two year(s) ago), we used to insert a docker environment variable like IS_DOCKER_CONTAINER using dockerfile in docker images. This was used to determine if an application is running inside a docker container or not. This helped to set certain attributes of the application like logging level and methods, modify certain environmental settings etc and helped controlling behavior of the application. It can also be useful in other situations like to determine whether you want to run selenium tests or not (as selenium web drivers would not be available inside docker container) to run as part of the integration testing. Continue reading “Detecting if dotnet core app is running inside docker container”
Visual Studio Team Services (VSTS), Microsoft’s application lifecycle management system, is to undergo a major shake-up and rebranding. Instead of a single Visual Studio-branded service, it’s being split into five separate Azure-branded services, under the banner Azure DevOps.
The five components:
- Azure Pipelines, a continuous integration, testing, and deployment system that can connect to any Git repository
- Azure Boards, a work tracking system with Kanban boards, dashboards, reporting
Continue reading “Updated: Microsoft VSTS converted to Azure DevOps”
After making some changes to the build definition of one of the dotnet core repositories, we started observing this error with the SonarQube tasks inside the build definition in VSTS:
When we checked the complete logs, we observed below issue:
Continue reading “SonarQube fails to analyze dotnet core code with error Duplicate ProjectGuid: “00000000-0000-0000-0000-000000000000””
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.
Delete a Local branch
Continue reading “Delete Branches in Git using commands”
Git Cherry-pick is used by many Organizations as an alternative to the rebase and merge. Cherry-pick is used to copy selective commits from one branch to another branch. Unlike a merge or rebase, cherry-pick only brings the changes from the commits you select, instead of all the changes in a branch. You can also choose whether to apply only one commit from another branch or a number of commits from another branch.
Why Git Cherry-pick
Cherry-pick is a great way to tackle below common problems:
- Accidentally committing on the wrong branch. In this case, one can use git Cherry-pick to apply the change(s) over to the correct branch and then reset the original branch to the previous commit. Continue reading “Understanding Git Cherry-pick and how it is useful”
Garbage collection is a well known software practice. The garbage collector, or just collector, attempts to reclaim garbage, or memory occupied by objects that are no longer in use by the program. When we talk about the Git Garbage Collection, we mean almost the same thing. Git garbage collector runs a number of housekeeping tasks within the current repository, such as compressing file revisions (to reduce disk space and increase performance), removing unreachable objects which may have been created from prior invocations of git add, packing refs, pruning reflog or stale working trees.
Continue reading “Understanding Git Garbage Collection”