16 February 2017

Introducing: Expanded GitHub Integration

Introducing: Expanded GitHub Integration

Since GitHub is the #1 Git provider among our users, we have decided to deepen the integration with the service by enabling the status of Buddy operations in the GitHub GUI.

The status will be visible in the following sections:

  • Code/Commits
  • Code/Branches
  • Pull requests
Pull request details
Pull request details

Use case: Pipeline as a build server

You can configure Buddy to automatically test your application on every push to any branch in your GitHub repository:

  1. Create a new project, choose GitHub as your provider, and select the repository that you want to use
  2. Create a new pipeline, set the trigger mode to On every push + set the Wildcard pattern to *
  3. Add a build action that will run the tests

This way every new commit pushed to the GitHub repository will be immediately tested with the results posted in GitHub.

Branch list on GitHub
Branch list on GitHub

Use case: Pipeline as a delivery tool

Another use case is configuring Buddy as a deployment tool for your Production server:

  1. Create a new project, choose GitHub as your provider, and select the repository that you want to use
  2. Create a new pipeline, set the trigger mode to Manual + assign the pipeline to your Master branch
  3. Add a file transfer action for your type of server (FTP/SFTP/cloud service, etc.)

Such pipeline will also send information to GitHub: you’ll be able to see which revision is currently deployed on the server on the commit history list. If for some reason the deployment hasn’t finished successfully, a proper label will be applied.

Commit history with labels
Commit history with labels
8 February 2017

Introducing: Configuration as Code (YAML)

Introducing: Configuration as Code (YAML)

Pipelines – the visual representation of a developer’s workflow – are one of the core features that make Buddy easy to use and configure. However, some of the developers prefer the classic way of managing configuration using YAML files.

This is especially true for users who:

  • have used another CI/CD software before and find it hard to switch to the GUI
  • need to store the history of configuration changes in the repository
  • want share their config files with other users
  • eat, code and sleep in their terminal :)

This is why we’ve decided to add support for YAML files as an alternative way of configuring pipelines. The option is available in the right column of the Pipelines tab.

IMPORTANT: Upon switching to the YAML mode any existing pipeline in the project will be removed. You can reproduce the pipelines by copying the configuration from YAML box and pushing it to the repository as buddy.yml. Please mind that the feature is still in beta and requires some polish, so any feedback is highly appreciated.

The complete documentation on how to use YAML in Buddy is available here.

Buddy YAML
Buddy YAML
1 February 2017

Introducing: Heroku CLI

Introducing: Heroku CLI

Heroku is a PaaS that enables developers to operate applications directly in the cloud. The Apps are run in fully managed runtime environments, with the infrastructure — configuration, orchestration, load balancing, security, etc. — handled entirely by the platform.

31 January 2017

New action: Webpack

New action: Webpack

Tidy up your code with the Webpack module bundler! Webpack is a JavaScript bundler which helps manage modules with dependencies and transform them into static assets

Webpack is a JavaScript bundler which helps manage modules with dependencies and transform them into static assets. Easy-to-use and incredibly configurable, it creates a graph of the app’s dependencies so that you know what can be bundled and in what order.

25 January 2017

Introducing: Atomic deployments

Introducing: Atomic deployments

We’re thrilled to announce that atomic deployments are now available in Buddy!

What are atomic deployments

The aim of atomic deployments is to eliminate the maintenance window so that your app is always available to the user. Derived from the database lingo, the concept of atomicity means a deployment that has either been executed completely or not executed at all, leaving no trace to the working code on the server. This means that your live website will only be updated once the deploy has finished successfully.

Using atomic deployments is especially recommended when:

  • you need to deploy lots of files to the server, which is time-consuming
  • the website involves additional services and dependencies that require migration
  • there are special prerequisities regarding updating servers in your company
  • the nature of the service you run doesn’t allow for a downtime
Atomic deployment template
Atomic deployment template

How it works

The whole process is handled entirely by two actions — SFTP and SSH — and involves creating a couple of directories on the server:

  • /current - the directory to which your web server points. It containing a symbolic link to the current website version in the /releases directory.
  • /releases - contains the history of uploaded releases. For each version a directory with the name of the release tag is created. This allows for a quick rollback of changes.
  • /deploy-cache - used for storing new files during the deployment. Once the upload has finished, its contents are copied to a new directory in the /releases directory.

In short, when the deployment is triggered, Buddy will first deploy the files to the cache directory on the server, copy the files to a newly created release directory, and switch the symlink of the web server to the new version.

Expanding your pipeline

Contrary to other deployment services, Buddy makes it very easy to customize and expand the workflow by adding additional actions. For example, you can update your assets on Amazon S3 and send a message to your Slack channel when the deployment is complete:

Customized pipeline
Customized pipeline

Restoring changes

To roll-back changes to a previous version, just select the release in the Run window and Buddy will switch the symlink on the server:

Rolling back changes
Rolling back changes

You can clear release and cache directories on the server at any time. In case you need to roll-back to a previous revision, Buddy will simply upload the files again.

Final word

Atomic deployments are the first in the upcoming template series. We’re looking forward what kind of templates you’d like to see next — just leave a comment here or drop a line to support@buddy.works.

Happy coding!
Alex and the team @ Buddy