Docs Navigation

Getting started with Semaphore

# Adding a project

To get started, you need to add your first GitHub or Bitbucket project to Semaphore.

Need help? Read our step-by-step tutorial.

# Debugging failed builds

A red build can be discouraging. To debug a failed build on Semaphore, you can launch an SSH session by clicking on the “Launch SSH” button within build results. To learn more, check out our detailed how-to guide.

# Managing branches and pull requests

Working with branches on Semaphore is easy. Semaphore automatically recognizes every newly pushed branch, adds it to your project, and runs a build for the latest commit. Every time you push to that branch, Semaphore will trigger a new build. If you delete the branch, it will be removed from Semaphore too.

Each pull request on GitHub/Bitbucket will display the build status of the given branch, which shows if tests are passing, and if the branch can be safely merged.

Semaphore also lets you set up more fine-grained control over how CI works with branches. You can:

  • Tell Semaphore to automatically cancel queued builds (if you push many times in a row to the same branch, you may not want to wait for build results from each one of them),
  • Specify a whitelist of branches to build automatically and ignore the rest, or
  • Completely turn off automatic building for new branches.

You can configure all of this in Project Settings > Branches.

If you'd like to learn more about organizing your branching workflow, read our tutorial Elements of a Continuous Deployment Workflow, which is based on how we work on Semaphore.

Here are a few more quick tips:

  • To rebuild the latest build on any branch, click on the branch name on your project, and then on “Rebuild last revision”.
  • You can open a pull request on your repository list directly from a passed build page, via the "Create pull request" button in the top right corner.
  • You can manually add a branch to your project by clicking on the “plus” sign at the top of your project’s branch list.

# Customizing your CI

Semaphore's platform is very flexible:

  • It includes all major runtimes for most programming languages, databases, web browsers,and more.You have access to the full software stack, regardless of your project's configuration. For example Ruby projects can set a custom Node.js versions with nvm.
  • You can run arbitrary programs within your builds and deploys.
  • You have sudo access, so you can install pretty much anything that runs on Linux.
  • Semaphore exports a number of environment variables you can use in your configure, build, test and deploy scripts.
  • The platform is based on Ubuntu 14.04 LTS and is updated monthly. Each update consists of a release candidate period lasting for one week, after which the updated is active for all users. This is communicated through the Semaphore changelog, and in-app notifications.

The build command editor lets you customize the setup of your build pipeline, enable parallel threads, and set up post-thread commands that run on both success and failure.

# Using Semaphore with Docker

Semaphore provides native support for building, testing and deploying apps made with Docker.

If you're new to Docker, you can learn from our growing collection of in-depth tutorials in the Semaphore Community.

To start running your Docker project, all you need to do is add it on Semaphore. After a brief analysis of your Git repository, Semaphore will pre-select the Docker-enabled platform, and you’ll be ready to use the Docker CLI tools in your builds and deploys. The Docker-enabled platform can also be selected in Project Settings > Platform.

Semaphore will also cache your Docker images to ensure that your builds are only doing what they're meant to, and that the time needed for dependency resolving is minimal.

For most up-to-date information about our Docker platform, you can refer to our documentation page. The following guides can help you get started:

Semaphore also provides in-app integrations with most popular Docker registries, which will take care of the authentication process for you. — Amazon EC2 Container registry, Docker Hub, Google Container registry, Heroku Container Registry, Quay.io, and custom or self-hosted container registries.

# Running tests in parallel to speed up your CI

Speeding up your builds on Semaphore is easy:

# Setting up Continuous deployment

In addition to continuous integration, Semaphore can also continuously deploy your application when all tests pass on the branch associated with an automatic deployment.

Even if you would rather deploy manually, you can quickly set up a target server and let anyone in the team deploy with one click. This will let you track releases over time.

To get started, click on the "Set Up Deployment" button on your project page to add your first server.

You can use custom deployment commands and scripts with the "Generic" method, and you'll also find wizards for AWS, Heroku and more.

# Tutorials on TDD, BDD and DevOps

Semaphore Community is a collection of tutorials and interviews on continuous delivery practices and tools for various programming languages, written by Semaphore engineers and contributors from the community. You can take a look at all categories and read tutorials about the technologies of your choice.

We recommend you to read a few general practice tutorials:

# Rails Testing Handbook

After publishing many Ruby tutorials focused on TDD/BDD, as well as tutorials for many other languages, we’ve decided to write a handbook encompassing everything a developer needs to build sustainable Rails apps.

In Rails Testing Handbook, you’ll learn about:

  • How to get in the BDD mindset and apply it in practice;
  • Setting up RSpec, Cucumber, database cleaner and others;
  • Developing features from scratch in red-green-refactor cycles;
  • Writing integration tests as Cucumber scenarios;
  • Writing controller tests using RSpec with mocking approach;
  • Writing model specs with RSpec;
  • How to collaborate via pull requests and continuous integration.

The book is free, and you can download it here.

This should be all you need to get started with building and deploying your application with Semaphore. If you have any questions or need some more hands-on assistance, our support engineers are here to answer your questions.

Happy building!

Semaphore Docs are open source — Edit on GitHub

Newsletter

Occasional lightweight product and blog updates. Unsubscribe at any time.

2009-2018 © Rendered Text. All rights reserved. Terms of Service, Privacy policy, Security.