The CI/CD and DevOps Blog

Shippable IRC Notifications

Warning-Icon.png

DEPRECATED BLOG:

We have significantly updated the Shippable platform with several new features. Hence most of the content in this blog is deprecated. For the latest information, refer to our documentation and/or open a support issue, if you have questions.


 

shippableIRC

We've talked about integrating with messaging services before, such as slack, but there are many more messaging services you can integrate Shippable with. Starting today, your minions can print out build status messages to IRC!

IRC support is implemented as a subtag of notifications. The IRC subtag itself has a number of subtags, but the two most useful one is the "channels" subtag. The channels tag is used to specify which IRC channels you would like your build to message.

The channels tag is quite easy to use, but let's show a quick example anyway! If you want your build to message the "shippable" channel on freenode, you would add the following snippet to your shippable.yml file:

notifications:
  irc:
    channels:
      - "chat.freenode.net#shippable"

Parallelizing Tests across Your Builds

Warning-Icon.png

DEPRECATED BLOG:

We have significantly updated the Shippable platform with several new features. Hence most of the content in this blog is deprecated. For the latest information, refer to our documentation and/or open a support issue, if you have questions.


 

 

With your startup account subscription - you do have a startup subscription, right? - you can run up to five builds in parallel. You can exploit this to run your tests faster than ever! This can be done by partitioning your tests into 5 groups, and having each one of your minions run one of the groups. For those of you on custom plans with more minions, or those using dedicated hosts, you can create even more test partitions for greater parallelization! Today's example will be in the context of a rails app with rspec, but the same concept can be applied to whatever stack.

The first step is to add this to your app's shippable.yml file:

env:
matrix:
- TEST_GROUP=1of3
- TEST_GROUP=2of3
- TEST_GROUP=3of3

How To Interact with Your Minions From Slack with Webhooks

Warning-Icon.png

DEPRECATED BLOG:

We have significantly updated the Shippable platform with several new features. Hence most of the content in this blog is deprecated. Go to the updated blog on this topic. For the latest information, refer to our documentation and/or open a support issue, if you have questions.


 

In our last post we discussed using the Shippable API to manually interact with your project through the terminal. That's cool and all... but poking APIs with curl is a little old-fashioned. Let's take it up a level. Today, we are going to show you how to plug Slack's external webhooks into our API. After doing this you can monitor your build status, trigger builds - whatever you desire - all from the comfort of your team's Slack channel!

Some of you might recall that we have talked about slack integration before in DevOps Notifications: A Simple Way to Use Slack with Shippable. You might be wondering, "Wait... If I could already integrate with Slack, how is this different from before?! How is this a new feature?" Great question! So, before we were using Slack's incoming webhooks feature; our app could talk to Slack, but there was no way for Slack to communicate back to our app. With our new API, you can now have one-way or two-way communication between Slack and your minions.

Cascading Builds with our New Public API

Ever wish your build minions could boss around your other minions for you? Well, with the help of the new API, now they can! Today, I'm going to show you how you can have a successful build of one project, kick off a build of a different project. In honor of the new API, we are gonna do it all without leaving the terminal! Warning: You must have a startup or custom plan to use the API.


For illustrative purposes, I've created two repos that contain only shippable.yml files. I'm going to call one project "kicker" and the other project "kicke". The kicker project will kick the kicke project into building, after kicker finishes building successfully. Here is the code for the kicke project's shippable.yml file

install:
  - true
script:
  - true

Basically, a build that will always run successfully under normal conditions.

Before you do ANYTHING with the api, you're gonna need to get your api token; don't worry though... It's easy! All you have to do is go to your account permissions page and generate a token. We will use this token in the header of our http requests.

Configure a Continuous Deployment to Digital Ocean for a Node.js App

Looking to configure a continuous deployment to Digital Ocean for a Node.js app? Tired of manually trying to configure git hooks to work with you? Is SCP just a little too old fashioned and clunky. Great news! Your search is finally over as today we'll show you how to combine Shippable and Dokku to fit your deployment needs!

Dokku describes itself as a 'docker powered mini-heroku' and it lives up to the claim! With Dokku installed on your droplet, you can interact with it very similarly as to how you would a heroku app. By orchestrating Docker, Buildstep, and Gitreceive  together, Dokku forms a simple, not to mention well functioning, roll your own PaaS. More information on Dokku can be found here.