This add-on is operated by wercker
continuous delivery made easy
The wercker add-on is currently in beta.
Table of Contents
Wercker is a collaborative continuous delivery platform, that helps developers reduce risk and eliminate waste when developing web applications by enabling them to test and deploy their code often.
How it works
Visually, the flow for wercker is as follows:
Wercker connects with your GitHub or Bitbucket repository. Each time you do a
git push wercker receive a signal that new code has been created and wil subsequently start running your tests in a sand-boxed environment. If your build is green, you are ready to deploy your application to Heroku. Through the Heroku add-on you get a concise dashboard with an overview of your builds and deploys.
Having a separate repository on a version control platform such as GitHub is a requirement of using wercker.
- A Heroku account and application.
- A remote git repository for your application. Wercker supports GitHub and Bitbucket.
- Python and pip to install the wercker command-line interface
Provisioning the add-on
Wercker can be added to your application using the Heroku CLI:
$ heroku addons:add wercker Adding wercker on sharp-mountain-4005... done, v7 (free) Use `heroku addons:open wercker` to get started. Use `heroku addons:docs wercker` to view documentation.
Next, open the wercker wizard by running the following command:
$ heroku addons:open wercker
This wizard will guide you through the steps needed to run your first build on wercker.
Wercker comes with a command line interface that you can install by running:
$ pip install wercker
Wercker assumes that you already have a repository on GitHub or Bitbucket with pushed code and have created a Heroku application.
The CLI helps you interact with the wercker platform. Run the following command to link your application with wercker:
$ wercker create
You will receive the following response
----------------------- welcome to wercker-cli ----------------------- Searching for git remote information... Found 1 repository location(s)... Please choose one of the following options: (1) firstname.lastname@example.org:mies/ruby-sample.git Make your choice (1=default):
As mentioned above, if you now run
heroku addons:open wercker or go to the Heroku dashboard and click on the wercker resource, you will see the wercker wizard that will guide you through your build and deploy.
Your first build and deploy
If all went well your first build is triggered after you’ve succesfully run
wercker create. Upon any subsequent
git push commands wercker gets triggered and will run your a build.
You are now ready to deploy your build to Heroku, if it passed of course. You can deploy your build in two ways:
- Through the command line interface via the
wercker deploycommand. The CLI will ask which build you want to deploy to which target (you could after all, have multiple Heroku applications)
- Through the wercker wizard. As said, running
heroku addons:openwill open the dashboard and you are now ready initiate your first deploy. See below:
Supported languages and services
Wercker currently supports Node.js, Python and Ruby. In terms of services like databases and queues, wercker has support for Postgres, MySQL, MongoDB, RabbitMQ, and Redis. See the wercker devcenter on how to specify any of these.
Removing the add-on
Wercker can be removed via the CLI.
This will delete the Heroku deploy target data on wercker and cannot be undone!
$ heroku addons:remove wercker -----> Removing wercker from sharp-mountain-4005... done, v1 (free)
This removes both the wercker addon from your Heroku application and the Heroku deploy target on wercker.