How to build when a change is pushed to Bitbucket

bitbucket-tutorials

 

Bitbucket plugin is designed to offer integration between Bitbucket and Jenkins.

 

It exposes a single URI endpoint that you can add as a WebHook within each Bitbucket project you wish to integrate with. This single endpoint receives a full data payload from Bitbucket upon push (see their documentation), triggering compatible jobs to build based on changed repository/branch.

 

Step 1 – Install “Bitbucket Plugin” at your Jenkins

 

Step 2 – Add a normal Post as Hook to your Bitbucket repository (Settings -> Hooks) and use following url:

 

https://YOUR.JENKINS.SERVER:PORT/bitbucket-hook/
and if you have setup authentication on jenkins then URL must be like

 

https://USERNAME:PASSWORD@YOUR.JENKINS.SERVER:PORT/bitbucket-hook/

 

Step 3 – Configure your Jenkins project as follows:

 

Step 4 – Under build trigger enable Build when a change is pushed to BitBucket

 

Step 5 – under Source Code Management select GIT; enter your credentials and define Branches to build (like **feature/*)

 

Note 1 – Make sure to include the slash (‘/’) on the end of the URL or the hook won’t work.

 

Note 2 – Please read the BitBucket Plugin info page as well https://wiki.jenkins.io/display/JENKINS/BitBucket+Plugin

 

Reference 1  
Reference 2 – Login issues with Jenkins url
Tagged : / / / / / /

Top 5 Open Source Code Management tools

top-5-open-source-code-management-tools
The old way of software development where the release engineers ran from one mates to another mates to keep track on Developers to know which module they are working and when they changed something in the code or which bugs has been tracked or fixed. No doubt, that process was pathetic, stressful, filled with issues and errors.
But, now things have changed. This is the era of DevOps where everyone works as a Team and collaborate with each other and use various tools in the Software Development Lifecycle. So, today we are going to discuss on one of the most important tool called by name Code Management Tools. In this article we will see top 5 open source code management tools which are mostly used by DevOps professionals these days.
But before going further lets see what is source code management?
Code management is actually a process of handling or managing changes to source code over time with the help of softwares or tools. These softwares keeps track of every changes and modifications in the code which is made by developers frequently. If there is some kind of mistakes made by developers they can simply go back compare it with previously written code and fix the mistakes easily. With the help of code management tools Developers team can work on different features and on bug fixing simultaneously by changing code with out disrupting team members. In other words you can say It give developers the ability to work concurrently on files (in branches that may or may not converge) without conflicting each other and also give developers the ability to merge changes with other developers’ changes, to track and audit changes that were requested and made, to track bug-fix status and to perform releases.
So now the question is which code management tools to use. When you search for the options you will get hundred of tools in your search results. To make this job easy for you we have done some research and make this list of Top 5 Open Source Code Management tools.

1. Subversion

Subversion

Key Features
  • Open Source
  • Merge tracking
  • Renamed/copied/moved/removed files retain full revision history.
  • Google Code even uses SVN
  • Path-based authorization
  • Language bindings for C#, PHP, Python, Perl, Ruby, and Java
  • Changelists to organize commits into commit groups

2. GIT

GIT

Key Features
  • open source
  • cheap local branching
  • fast performance
  • multiple workflows
  • convenient staging areas
3. Mercurial

Mercurial
Key Features
  • open source
  • fast and powerful
  • easy to learn
  • functions are less complicated
  • integrated web-interface

4. Github

Github

Key Features
  • Open Source
  • Code review
  • Issue tracking with labels, milestones
  • largest host of source code in the world
  • Commits history
  • Graphs: pulse, contributors, commits, code frequency, punch card, network, members
  • Unified and split diffs

5. CVS

CVS

Key Features
  • Open Source
  • Easy to learn
  • Google still hosts the original Usenet post that announced CVS
  • Maintains a central repository of the most recent repository
  • CVS allows to rollback any commit in the repository, even if this may require some time
  • CVS uses a client–server architecture
  • CVS can also maintain different “branches” of a project
  • Several developers may work on the same project concurrently
Code Management these days plays an important role in development process and especially when team (large / small) works on single application. So, choose it wisely. Now , its your turn if you think this list should contain some other tools instead of this than write below in the comment box.
Tagged : / / / / / / / / / / / / /

How to Install and Configure Gerrit2 in CentOs and Ubantu ?

gerrit2-installation-configuration
Step 1:  Update System
> yum update
> apt-get update
Step 2: Install git
Step 3: Install screen
Step 4: Install screen
Step 5: Install Java
Step 6: MySQL
Step 7: Install Gerrit
1. Create a Database
2. Initialize the site
3. Download Gerrit
wget https://gerrit-releases.storage.googleapis.com/gerrit-2.9.1.war
4. Start Gerrit Setup
5. Restart / Stop / Start gerrit
5. Access Gerrit
Step 8: Install Apache
Step 9: Configure Apache Proxy to Gerrit
Step 10: Verify
Some important Tools
Screen
Reference
https://gerrit.googlecode.com/svn/documentation/2.0/install.html
http://dachary.org/?p=1716
https://www.rosehosting.com/blog/how-to-install-gerrit2-on-a-centos-7-linux-vps/
https://www.digitalocean.com/community/tutorials/how-to-install-gerrit-on-an-ubuntu-cloud-server
Tagged : / / / / / / / / / / / / / / /

Gerrit useful website reference | Gerrit Performance CheatSheet

gerrit-performance-cheatsheet

Gerrit Performance CheatSheet

Tagged : / / / / / / / / /

Basics of Git and Gerrit | Git & Gerrit Overview | Git and Gerrit Concept

basics-of-git-and-gerrit

Git & Gerrit

  • As per British English, Git means “unpleasant person”. The inspiration of designing Git is taken from “BitKeeper” and “Monotone”. 
  • Both are distributed revision control system. Git was originally designed as a low level version control system engine and on top of this Cogito and StGIT(Stacked Git) is developed. StGIT is a Python application that provides functionality similar to quilt
  • Git is a highly performant free and open source distributed version control system as compare and contrast to other centralized version control systems such as CVS, SVN, ClearCase, and Perforce. 
  • It was initially designed and developed by Linus Torvalds for Linux kernel development in 2005.
  • As per the analysis corresponding to Eclipse IDE users, Git has reported 30% adoption as of 2013 in software industry for VCS(Version Control System)/RCS(Revision Control System)/SCM(Source code management).
  • The Stable release of Git is released on August 23, 2013 which is of version 1.8.4. Its Initial release was introduced in the 7th april 2005 . Originally Git is developed in “C”.

Gerrit

  • Gerrit is a free, web-based review tool developed by Google for Android. 
  • It is developed with a git based workflow in mind. It acts as a firewall in front of a Git repository. 
  • Software developers working in a team can review each other’s changes/modifications on their source code using a web browser and approve or reject those changes. 
  • Gerrit works on “Change”s. A change is a set of modifications to various files in your repository to accomplish a task. It is essentially one large git commit with all the necessary changes which can be both built and tested. 
  • It integrates closely with Git, a distributed version control system. 
  • It was developed at Google by Shawn Pearce (founder of JGit) for the development of the Android project. Gerrit uses Google Web Toolkit to generate front-end JavaScript code from Java source. 
  • It is a SSH server. 
  • Gerrit centralizes the distributed nature of Git, while maintaining the advantages of a DVCS, by imposing a centralized workflow. 
  • Large corporations such as SAP, Sony Mobile, Qualcomm and many other enterprises, organisations and non affiliated individuals/volunteers contributed to the review and development of the code-base.
  • The Stable release of Gerrit is released on September 18, 2013 which is of version 2.7.   
  • Originally this tool was written in Python and now this tool is written in Java, Servlet and GWT. 
  • This is a code review tool and now Apache is having its license.
Tagged : / / / / / / / / / / / / / / /