All Posts in Senza categoria

September 7, 2017 - Comments Off on How to integrate AWS CodeCommit with BuddyBuild: a solution for our Continuous Delivery

How to integrate AWS CodeCommit with BuddyBuild: a solution for our Continuous Delivery

AWS CodeCommit - BuddyBuild integrationUsing a Continuous Delivery solution in a software development project is really useful because it brings a great saving of time and costs while providing fast feedbacks on the build.

In our opinion, a Mobile project needs a Continuous Delivery because it enables automation of all time-consuming operations such as tests, builds and releases.

These advantages are even more obvious if applied to a team similar to ours, that follows an iterative-incremental approach to the development cycle with frequent releases.

While developing a mobile app for a customer working on payment services we found ourselves using BuddyBuild as Continuous Delivery service and AWS CodeCommit as Git repository.

Currently BuddyBuild offers a full integration with GitHub, BitBucket and GitLab. It is also possible to use other Git services through SSH protocol, but this approach does not support the trigger of an automatic build after a Git push.

Therefore we had to find an alternative solution in order to have a complete and automated Continuous Delivery cycle.

First Approach

Initially we had to configure a local script shared throughout team members to automatically trigger the build at every push towards CodeCommit. In this way we use a "git post-push" hook to call the BuddyBuild API.

This approach gave us some trouble over time.

In particular we faced problems with new team members which had to configure the script on their own machine. Furthermore every change to the script had to be propagated on every already configured environment.

New Approach with AWS Lambda

AWS LambdaRecently, AWS introduced the opportunity to trigger an AWS Lambda from a CodeCommit event such as a push, branch creation, etc.

Therefore we decided to develop a small project to integrate CodeCommit and BuddyBuild. We created a Lambda which is triggered by CodeCommit at every push and uses the BuddyBuild API to run a new build.

DockerWe create a new project using Docker as Development Environment. This permits to have an environment as similar as possible to the container inside which AWS Lambda runs the code. Other reasons we like working with Docker are that we can replicate through different team members the same Environment and we can keep our host machines clean.

We use Serverless Framework to develop and deploy the Lambda project but at time of writing there is no support to the CodeCommit event, so we have to manually configure the trigger from the AWS Console.

The function itself is very simple. It's an HTTP request to BuddyBuild API that needs only APP_ID and USER_TOKEN to be configured.

Here a piece of the Lambda source code:

 headers: {'Authorization': `Bearer ${process.env.ACCESS_TOKEN}`},
 uri: `${process.env.APP_ID}/build`,
 method: 'POST'
} /*, [...] */ )

For security reason we get BuddyBuild tokens and AWS credentials from environment variables, in this way everyone can configure these variables with an .env file without pushing them to the repository.

We chose to open source the code which is now publicly available on GitHub: CodeCommit - BuddyBuild Integration: all feedbacks are welcome ūüôā

August 22, 2017 - Comments Off on What we are listening to at XPeppers

What we are listening to at XPeppers

Podcasts are a great way to stay up to date on the technologies and methodologies we use every day. Our playlists are always full of episodes from various podcasts:

Software Engineer Radio - a useful resource for all software developers. The topics discussed are very varied and deal with many aspects of our work. From the point of view of interviews quality is undoubtedly the number one.

Scrum Master Toolbox Podcast - Vasco Duarte is able to craft the best podcast about agile methodologies, must have especially if you want to improve as a scrum master or agile coach. Our colleagues Pietro di Bello and Paolo D'incau have been guest of the podcast.

Other podcasts on the agile theme that we feel to recommend: Agile Coffee, The Happy Melly Podcast, Lean Change Management, Agile in 3 Minutes, The McCarthy Show, The Agile Revolution, ITkanban's podcast

On DevOps theme The Ship Show and CenturyLink Labs Podcast are our favourites.

Among the others, in our Overcast you can find:

  • vJug¬†-¬†audio recordings from¬†
  • The Ruby Rogues¬†- a panel discussion about topics relating to programming, careers, community, and Ruby. They¬†release a conversation with notable programmers and Rubyists each week to help programmers advance in their careers and skills.
  • The¬†Changelog¬†- a weekly conversation that gets to the heart of open source technologies and the people who create¬†them.
  • Being The Worst¬†- audio apprenticeships for the aspiring software craftsman. Currently exploring DDD, Event Sourcing, CQRS, distributed systems, cross-platform, cross-cloud, & cross-language software delivery.
  • Under the Radar¬†- from development and design to marketing and support, Under the Radar is all about independent app development.
  • SharedInstance¬†- a¬†podcast about iOS Development from three iOS Developers based in Cincinnati
  • Software Process and Measurement Cast¬†- Interviews, essays, facts and tips about process improvement and measurement in the Information Technology arena
  • AWS Podcast¬†-¬†Simon Elisha & Jeff Barr discuss various aspects of the Amazon Web Services (AWS) offering. Each podcast include AWS news, tech tips, and interviews with startups, AWS partners, and AWS employees.
  • 21st Century Work Life¬†- remote working, virtual teams and flexible working.
  • High Resolution¬†-¬†video podcast¬†series with 25 masters of the design industry
  • Freakonomics Radio¬†- each week, hear surprising conversations that explore the riddles of everyday life and the weird wrinkles of human nature‚ÄĒfrom cheating and crime to parenting and sports.