We can drive the whole process of customization from consulting and planning to development and support. Don't be satisfied with what you have. Always find a way to extend your possibilities. Write us

Category Archives: Atlassian Stash

Top 5 New Add-ons for Atlassian Dev Tools – Second Quarter 2016

While the best of the best are fighting to be named top Olympic athletes, 5 new products for Atlassian Bitbucket and Bamboo already made it into the top list – our top 5 new add-ons for Atlassian Dev Tools for the 2nd quarter of 2016. If you missed out on earlier articles in this series, check out posts for 1Q 20152Q 20153Q 20154Q 2015 and 1Q 2016.

In April-June the Marketplace got 31 new add-ons for Bitbucket and 17 new plugins for Bamboo. From this variety of new products we selected 5 that, as we believe, will be the most useful and interesting solutions for our readers:

Continue reading

Top 5 New Add-ons for Atlassian Dev Tools – First Quarter 2016

As usual, our team keeps track of what’s new on the Marketplace for Atlassian Dev Tools and every quarter shares the selection of top 5 new add-ons. If you haven’t read earlier posts in this series, you can take a look at:

Top 5 New Add-ons for Atlassian Stash – First Quarter 2015

Top 5 New Add-ons for Atlassian Stash – Second Quarter 2015

Top 5 New Add-ons for Atlassian Dev Tools – Third Quarter 2015

Top 5 New Add-ons for Atlassian Bitbucket – Fourth Quarter 2015

So let’s see what new plugins Bitbucket and Bamboo users can try to add even more value and functionality to their code management and continuous integration platforms. From 9 new add-ons for Bitbucket and 17 new add-ons for Bamboo that appeared on the Marketplace in January-March 2016 we thought the following 5 would be the most useful for our readers:

Continue reading

Case Study: How Planificando uses Awesome Graphs for Bitbucket Server

I am in charge of several people in a development project and Awesome Graphs helps me to see the best tasks assignation, the team performance and the critical points along the year. On this way, I can take best decisions to reduce costs and shorten the turnaround time for the solutions. Moreover, it is a way to help boost the competitiveness of my team and not be intrusive in their personal work.

Javier López Ruiz (Planificando)

 

Planificando, our customer, is a consolidated group of interdisciplinary researchers from the University of Alcalá, specialists from other universities and partner companies. It specializes in research and development of software solutions for the optimization of logistics planning and transportation using advanced Artificial Intelligence techniques. 

Chronos is one of Planificando’s teams. It uses Bitbucket Server to collaborate and manage their Git repositories. While Bitbucket Server meets Planificando’s major needs when it comes to code management, there are no inbuilt features that they could use to analyze the contribution statistics and efficiently monitor the activity in repositories. That is why Planificando decided to extend the Bitbucket Server functionality by installing the Awesome Graphs for Bitbucket Server add-on, which brings in multiples graphs and charts and allows the team to achieve their goals.
Continue reading

Top 5 New Add-ons for Atlassian Bitbucket – Fourth Quarter 2015

Earlier this month we have posted articles featuring some of the best new add-ons for Atlassian Confluence and JIRA. Today’s post covers top 5 new add-ons for Bitbucket that appeared on the Marketplace during the fourth quarter of 2015.

Previous posts about new add-ons for DevTools:

Top 5 New Add-ons for Atlassian Bitbucket Server (Stash) – First Quarter 2015

Top 5 New Add-ons for Atlassian Bitbucket Server (Stash) – Second Quarter 2015

Top 5 New Add-ons for Atlassian Dev Tools – Third Quarter 2015

Top 5 new add-ons for Bitbucket (Server and Cloud) that had their first release in October – December 2015:

Continue reading

How to mirror Bitbucket Cloud and GitHub repositories to Bitbucket Server (Stash)

When working on our add-ons, we at StiltSoft are using Bitbucket Server (Stash) for distributed version control management and code collaboration. Some of you have also picked Bitbucket Server, others went with another solution, e.g. Bitbucket Cloud, GitHub, or are using several platforms at once. Whatever tool you work in, mirroring repositories can come in useful in certain cases. That is why last month we posted the article that covered the benefits and how-tos about mirroring remote repositories from Bitbucket Server (Stash). Meanwhile, creating mirrors in Bitbucket Server rather than mirroring from it might be more relevant for some of our blog readers, so today’s post is about that.

Benefits

There’s a number of goals which can be attained by mirroring repositories from Bitbucket Cloud or GitHub to Bitbucket Server (Stash). Among them:

  • protecting yourself from down time when Bitbucket Cloud or GitHub are unavailable
  • consolidating repositories in one place
  • facilitating the process of migration from Bitbucket Cloud or GitHub to Bitbucker Server

How to mirror Bitbucket Cloud repositories

To arrange automatic update of mirrored repositories you can:

  • Use an add-on for Bitbucket Server
  • Use a Continuous Integration tool
  • Use an OS job scheduler

In our examples, we’ll be mirroring a Bitbucket Cloud repository to Bitbucket Server.

Use an add-on for Bitbucket Server

ScriptRunner for Bitbucket Server/Stash can come in handy when you are looking to mirror some or all of your Bitbucket Cloud repositories to Bitbucket Server.

It’s very simple.

  • Once the add-on is installed, navigate to Bitbucket Server Administration and select Built-in Scripts in the Script Runner Section.
  • There, choose Mirror Bitbucket Team. You can mirror repositories both from team and user Bitbucket Cloud accounts.

ScriptRunner-Built-in-Scripts

  • Enter your Bitbucket Cloud Team or User, select the target project in Bitbucket Server, provide your Bitbucket Cloud user credentials.

ScriptRunner-Mirror Bitbucket Team

  • Select one of the synchronization options (none, install hook or poll). If you choose:
    • ‘install hook’, Bitbucket Cloud will call your Bitbucket Server instance when there are changes in repositories which will trigger synchronization
    • ‘poll’, each remote repository will be polled every 5 minutes
    • ‘none’, there will be no synchronization performed
  • In the Regex field, there is the ‘.*’ regular expression by default. If you leave it as it is, all repositories will be mirrored from your Bitbucket Cloud. To filter the set of repositories, insert a corresponding regular expression. The regular expression is done against the repository name, e.g. for the repository ‘StiltSoft Test’ you could use:
.*(?=.*\bStiltSoft\b.*)(?=.*\bTest\b.*).*
  • Another useful feature. If you’d like new Bitbucket Server repositories to be created and synchronized when there are newly-added remote repositories in Bitbucket Cloud, mark the ‘Sync new’ checkbox.
  • When all set, click Run. You’ll see the table with the repositories that are being mirrored. Initially there’s the ‘Create’ label. When the process is completed, it will say ‘Exists’ instead. You may tail the application log file to track the progress.

ScriptRunner-Mirror Bitbucket Team-2

  • Once local repositories are created, you can refer to the Configure Mirrored Repositories in Built-in Scripts to view and check the status of your mirrored repositories and change the synchronization type.

ScriptRunner-Configure mirrored repos

Use a Continuous Integration tool

If you have some Continuous Integration solution, e.g. TeamCity, in your arsenal, you can use it. Here is one of the options how to set up automatic update of mirrors in Bitbucket Server using TeamCity.

  • To use SSH-authentication, copy a SSH key from the TeamCity server with a build agent you’ll be using. Then add this SSH key in your Bitbucket Cloud and Bitbucket Server account settings.
  • Then you need to create a repository in Bitbucket Server
  • After that, create a local copy of source repository on build agent (don’t forget to add Bitbucket Server repository as remote):
cd /home
mkdir mirror
cd mirror
git clone git@bitbucket.org:kkolina/demonstration-repository.git
cd demonstration-repository
git remote add bitbucket ssh://git@stash2.stiltsoft.com:7999/adp/demonstration-repository.git

Now you should make some changes in build configuration in TeamCity:

  • Add a Command Line Runner build step with a script for updating mirrored repositories that will run every time this build step is invoked.

TC Build Step

Example of the script, e.g.:

cd /home/mirror/demonstration-repository
git pull
git push --all bitbucket
git push --tags bitbucket

You may also add a VCS Trigger that will add a build to the queue when a VCS check-in is detected in the repository you are mirroring.

  • Before adding a trigger, you should attach a VSC root in the Version Control Settings:

TC VCS Root

With the URL of the original repository and Bitbucket Cloud authentication settings:

TC VCS Root-details

  • Now you can add a VCS Trigger:

TC VCS Trigger

Use an OS job scheduler

You can also use OS job schedulers (Cron, Windows Task Scheduler) and configure an external job and schedule the launch of scripts that will be pulling changes and pushing them to a mirrored repository.

  • First we clone a repository:
cd /home/mirror
git clone git@bitbucket.org:kkolina/demonstration-repository.git
cd demonstration-repository
git remote add bitbucket ssh://git@stash2.stiltsoft.com:7999/adp/demonstration-repository.git
  • If you use Cron, you’ll need to add a command in your crontab file that will run periodically on a given schedule and will be updating mirrored repositories, e.g.:
0  0    * * *   root    /home/mirror/update_repos.sh

This command will run from the user ‘root’ every day at midnight and trigger a script that has a number of commands to perform update of mirrored repositories.

For the case when you have one mirrored repository that should be updated, the content of ‘update_repos.sh’ will look like this:

#!/bin/bash
 
cd /home/mirror/demonstration-repository
git pull
git push --all bitbucket
git push --tags bitbucket

If you need to mirror more than one repository, include 4 commands you can see above for each repository in ‘update_repos.sh’.

How to mirror to remote repositories from Bitbucket Server (Stash)

Our StiltSoft team has an extensive expertise in Bitbucket Server (Stash). We are using this application and are developing for it. There’s been a number of posts in our blog about the add-on we’ve created for Bitbucket Server users, Awesome Graphs for Bitbucket Server (Stash). In case you haven’t heard about it yet, the plugin allows you to visualize the statistics of contributions made in Git repositories and provides various graphs and charts.

In today’s post we’ll briefly go through some benefits from mirroring Bitbucket Server (Stash) repositories and several ways how to do it.

Benefits

Mirroring Bitbucket Server (Stash) repositories can come in very handy when you need to:

  • reduce the load on your system, e.g. when developers and Continuous Integration servers are sharing one Bitbucket Server (Stash) instance and are constantly pushing and pulling to/from Bitbucket Server. It can cause resource issues on the Bitbucket Server (Stash) server
  • reduce response time for Bitbucket Server users from different geographical locations
  • have a backup to restore data from if something goes wrong on your Bitbucket Server (Stash) instance

How to mirror Bitbucket Server (Stash) repositories

You can use one of the following options to set up automatic update of remote mirrored repositories:

  • Use an add-on for Bitbucket Server (Stash)
  • Use a Continuous Integration tool
  • Use an OS job scheduler

In our example, we’ll be mirroring a Bitbucket Server (Stash) repository to Bitbucket Cloud.

Use an add-on for Bitbucket Server (Stash)

You can use Repository Mirror Plugin for Stash to automatically mirror to remote repositories.

To get started, you need to enable the add-on in the ‘Hooks’ section of the repository settings in Bitbucket Server (Stash):

  • click the Mirror Hook text (or the pencil icon) in the Hooks section of the repository settings

1.Mirror Hook

  • enter mirror repository URL – the GIT URL (ssh, git, http(s), file) to the remote mirrored repository
  • enter your Bitbucket Cloud user name and the password (if pushing is via HTTP(S))

Mirror Hook dialogue

  • click ‘Enable’

If using ssh, ensure your private key is installed for the user Bitbucket Server (Stash) runs under.

With mirror hooks, all configured remote mirrors will be receiving changes when a commit or pull request merge is performed.

Use a Continuous Integration tool

You can also use some Continuous Integration solution, e.g. TeamCity, to pull changes from your Bitbucket Server (Stash) server and push them to a remote repository. Below is the description of one of the ways how to do that.

To use SSH-authentication, copy a SSH key from the TeamCity server with a build agent you’ll be using. Then add this SSH key in your Bitbucket Cloud and Bitbucket Server (Stash) account settings.

After that, you need to create a remote repository:

git clone ssh://git@stash2.stiltsoft.com:7999/adp/demonstration-repository.git
cd demonstration-repository
git remote add bitbucket git@bitbucket.org:kkolina/demonstration-repository.git

If you are working with TeamCity and would like to configure automatic update of mirrored repositories, all you have to do is change build configuration in TeamCity. You need to add a Command Line Runner build step with a script for updating mirrored repositories that will run every time this build step is invoked.

TeamCity build step

Example of a script, e.g.:

cd /home/mirror/demonstration-repository
git pull
git push --all bitbucket
git push --tags bitbucket

You may also add a VCS Trigger that will add a build to the queue when a VCS check-in is detected in the repository you are mirroring.

Before adding a trigger, you should attach a VSC root in the Version Control Settings:

TeamCity VCS root

With the URL of the original repository and Bitbucket Server (Stash) authentication settings:

TeamCity VCS root settings

Then you can add a VCS Trigger:

TeamCity VCS Trigger

Use an OS job scheduler

As another option, it’s possible to use OS job schedulers (Cron, Windows Task Scheduler) to set up an external job and schedule the launch of scripts that will be pulling changes and pushing them to a mirrored repository.

Again, first we clone a repository:

git clone ssh://git@stash2.stiltsoft.com:7999/adp/demonstration-repository.git
cd demonstration-repository
git remote add bitbucket git@bitbucket.org:kkolina/demonstration-repository.git

If you use Cron, you’ll need to add a command in your crontab file that will run periodically on a given schedule and will be updating mirrored repositories, e.g.:

0  0    * * *   root    /mirror/update_repos.sh

This command will run from the user ‘root’ every day at midnight and trigger a script that has a number of commands to perform update of mirrored repositories.

For the case when you have one mirrored repository that should be updated, the content of ‘update_repos.sh’ will look like this :

#!/bin/bash

cd /home/mirror/demonstration-repository
git pull
git push --all bitbucket
git push --tags bitbucket

If you need to mirror several repositories, include 4 commands you can see above for each repository in ‘update_repos.sh’.

It was a brief overview on this topic to give you a general idea and encourage you to drill into one of these options if you believe you can benefit from it.

Feel free to comment below.

Top 5 New Add-ons for Atlassian Stash – Second Quarter 2015

Following the posts about new add-ons for Confluence and JIRA of the second quarter of 2015, today’s article will highlight top 5 new add-ons for Atlassian Stash, which our team considered to be the best products for Stash from those appeared on the Marketplace in April-July 2015. By the way, you can also check out our April post about new add-ons for Stash of the first quarter.

Top 5 new add-ons for Stash:

You’ll learn about the problems the add-ons are meant to solve, potential benefits for you and pricing.

1. Editor for Stash

With Editor for Stash you can edit your files right in Stash and avoid going through the whole Git workflow.

Editor for Stash1

It allows previewing markdown before committing, works in your browser and doesn’t require cloning or editor.

Editor for Stash2

Code folding and syntax highlighting are supported. When done editing, you can choose whether to commit directly into the branch or to create a pull request.

Other benefits:

  • Completely server-side
  • Support for Github Flavored Markdown
  • Configurable: direct commit privileges can be turned on or off on a per repository basis.
  • Support for personal repositories.

Pricing: A commercial license for Editor for Stash costs 160$ for 50 users (80$ for 25 users; 300$ for 100 users).

Try it

2. Pull Request Notifier for Stash

Pull Request Notifier can invoke one or several custom URLs when a pull request event is triggered. There can be different URLs for different repositories with filters. URLs are highly configurable with various variables and 2 fields to construct a filter (filter string and filter regexp). You create a string with variables and add a regexp. When the regexp matches the text, the notification is triggered. It can, optionally, add HTTP Basic Authentication headers when triggering URL.

Pricing: Pull Request Notifier for Stash is free.

Try it

3. Search for Stash

Search for Stash is a powerful full-text code, commit and file search tool for repositories powered by a built-in Elasticsearch node that uses Query String Syntax.

Search for stash1

It includes support for wildcards, regular expressions, fuzziness, and more.

You can filter search results to:

  • only code, commits or file names
  • specific projects
  • certain slugs
  • certain refs
  • certain file extensions
  • a specific author
  • a certain date range

It’s possible to search globally through the Codesearch toolbar, or search in a specific project or repository by using the Stash toolbar on the left sidebar.

Search for stash2

The add-on doesn’t require external servers or services, provides analytic search with search statistics.

Pricing: A commercial license for Search for Stash costs 400$ for 50 users (150$ for 25 users; 800$ for 100 users).

Try it

4. ScriptRunner for Stash

ScriptRunner for Stash helps ensure a good quality of merges, encourage following best development practices. It allows global administrators to apply hooks, merge checks, and event handlers for workflow automation and customization.

ScriptRunner for Stash1

Most of them can be used with conditions for you to have more flexibility and control. Conditions can be added to all or selected repositories.

ScriptRunner for Stash2

With this add-on you can set default and mandatory approvers for pull requests, prevent undesired events by providing abilities to:

  • stop developers pushing changes on behalf of someone else
  • stop change sets being pushed directly to your release or master branches
  • stop deletion of your release tags by mistake
  • ensure feature changes are associated with a JIRA issue through both scripted conditions and extended JQL queries
  • block pushes to your release branches after it has been frozen

It also includes administrative scripts that allow to:

  • mirror all commits and tags from GitHub and BitBucket to Stash (for you not to be dependent on GitHub and BitBucket being available at all times, or to migrate repositories from GitHub or BitBucket to Stash)

ScriptRunner for Stash3

  • switch to a different user (e.g. to reproduce a problem a user is telling you about, merge a pull request on behalf of another user)

Pricing: A commercial license for ScriptRunner for Stash costs 330$ for 50 users (180$ for 25 users; 600$ for 100 users).

Try it

5. All Pull Requests

All Pull Requests allows displaying all pull requests for all available projects or only for a specific project. It can be useful when you need to see pull requests on a project or cross-project level.

All pull requests1

All pull requests2

It includes the Mergeability column that displays as an icon the information about what is blocking the merge operation:

  • insufficient branch permissions
  • not all required builds are successful yet
  • requires approvers
  • resolve all merge conflicts first
  • requires all tasks to be resolved

Pricing: All Pull Requests is free.

Try it

 

If you get any questions, feel free to ask them in comments below or email me at kkolina@stiltsoft.com.

New in Awesome Graphs for Stash: activity stream, commit graph, search for pull requests, and more

Today we’re reaching out to the readers of our blog who are a part of Atlassian Stash community to give a brief overview of what’s new in Awesome Graphs. Our team has been working hard for you to have more tools when it comes to monitoring and analyzing Git repositories development, evaluating your team’s performance, visualizing the development flow and creating reports. As a result, over last half a year a lot of new graphs and improvements were added. Here are the highlights of the major ones:

  • Keeping track of the recent activity in your repositories.
  • Visualizing the development flow of repositories with Commit Graph.
  • Viewing and filtering graphs of all contributors across all repositories on one page.
  • Generating pull requests reports for analysis or finding all pull requests with a certain author, reviewer, state or destination branch.
  • Aggregating statistics of all branches of a repository.
  • Joining contributions made by the same person under multiple e-mails to get correct statistics.

Keeping track of the recent activity in your repositories

Activity, a new tab on the Graphs page, provides you with Commits Chart and Pull Requests Chart showing the number of commits and pull requests made by top contributors during the selected time span. Each bar represents one contributor.

Activity tab Charts

Above Commits Chart you can see:

  • number of days included into the selected time span
  • total number of commits made during the selected time span
  • total number of contributors who contributed to the repository during the selected time span

Above Pull Requests Chart you can see the total number of pull requests created, merged and declined during the selected time span. In the Activity section below the charts, all commits and pull requests of the selected time span are shown as the activity stream with links to associated JIRA issues, hashes and change type lozenges.

Activity - Activity Stream

Learn more

Visualizing the development flow of repositories with Commit Graph

We added one more awesome graph into our package, Commit Graph. Now you can:

  • visualize development flows (branches, merges, commits) of your Git repositories;
  • see the merge history and the relationships between commits;
  • make sense of your branches history.

Commit Graph

Learn more

Viewing and filtering graphs of all contributors across all repositories on one page

Awesome Graphs adds the People dropdown menu in the Stash header, which includes:

  • list of Stash users whose Contributions graphs were recently viewed. It allows you to navigate to Stash user profiles in a single click. As you select one of the names on that list, the Contributions tab of the user profile is opened. And you can see that user’s personal activity in Contributor Calendar and Activity Stream;
  • ‘All users’ link, which leads to the People page with the list of contributors across all repositories.

People drop down

When you click All users in the People dropdown menu, the People page is opened. It displays Contributor graphs of all contributors across all Stash repositories sorted by the number of contributions made within a selected time span.

People

On the left sidebar there are two sections with options for filtering the list of contributors: time span and activity type. When you select one of time span and activity type options, all contributions are filtered and Contributor graphs are rendered based only on the number of contributions of the chosen activity type made during the selected time span sorted by the number of contributions.

Learn more

Finding all pull requests with a certain author, reviewer, state or destination branch

Now Awesome Graphs provides two pull requests reports options: Pie Chart Report and Created vs Merged Pull Requests Report.

Pie Chart Report shows a pie chart of pull requests grouped by a specified statistic type. It helps you:

  • see the breakdown of a set of pull requests, at a glance
  • easily find all pull requests with a certain author, reviewer, state or destination branch

Available types of statistic to group pull requests by: author, reviewer, state, destination.

Pie chart report analyze

To the right of the pie chart, there is a table showing the number of pull requests that correspond to each author (reviewer, pull request state or destination branch).Below the pie chart, you can see the table with the details of pull requests. Initially, it includes all pull requests. To see only the details of pull requests with a certain author (reviewer, pull request state or destination branch), click the corresponding chart section or row in the table located to the right of the chart.

Created vs Merged Pull Requests Report shows the number of pull requests created versus the number of pull requests merged over a given period of time. This can help you keep track of the dynamics of your repository development.

Pull requests can be grouped by days, weeks, months, years.

Created vs merged analyze

Graphs’ areas in red show periods where more pull requests were created than merged. Areas in green show periods where more pull requests were merged than created.

To the right of the graph, there is a table showing the number of created and merged pull requests that correspond to each period.

Below the graph, you can see the table with the details of pull requests. Initially, it includes all pull requests. To see only the details of pull requests until a certain period, click the corresponding point on the graph or row in the table located to the right of the graph.

Learn more

Aggregating statistics of all branches of a repository

Before, the Contributors, Commits, Code Frequency graphs and charts and Punch Cards were being created based on the statistics about additions, deletions, commits, pull requests, code lines with regard to time stamps within one branch. Now it’s possible to have all that based on the joint statistics of all branches in a repository.

Selecting all branches

Learn more

Joining contributions made by the same person under multiple e-mails to get correct statistics

It happens sometimes that people use different emails when committing to repositories. For example, one person could commit using three different emails during different periods of time. Previously, this would result in showing three incarnations of this person on the Contributors tab. Evidently, in the Contributions graph, the statistics shown by Awesome Graphs were incomplete for each of these incarnations.

Now, you can specify all emails a committer used in their profile settings. This aggregates all commits made with these emails and provides you with the complete statistics for the committer.

Managing emails

Learn more

 

You can purchase a commercial license or generate a new evaluation license for Awesome Graphs on the Marketplace.

If you’d like to share your feedback, request a feature or have any questions, feel free to contact us.