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

18 January 2017

New action: Haskell

New action: Haskell

In response to your requests, the Haskell language is now offically supported by Buddy

Haskell is a purely functional language with no statements or instructions, widely used in academics and industry. Often used as a compiler, its implementations include anti-spam programs, cryptography algorithm verification, military AI, backend infrastructure analysis, and other fields where functional programming is recommended.

17 January 2017

Introducing: Status Labels

Introducing: Status Labels

From now on commits, branches and merge requests in your Buddy workspace are labeled with statuses generated on the basis of the last execution.

For example, if you have a wildcard-based pipeline configured to run on push to any branch, you will see: