CircleCI Integration


CircleCI is a hosted continuous integration (CI) server. Using the Rainforest CLI, it's very easy to configure CircleCI to run your Rainforest test suite after each deploy.

Please see our CI Sample repo on Github for a more thorough explanation of how you can incorporate Rainforest tests into your release process for Circle CI, Jenkins and Travis.

If you have CircleCI set up already, check out our CircleCI orb to easily integrate Rainforest tests with your CI flow.

The Flow

Our project is configured to provide a continuous delivery flow by default.

Every time code is pushed to the 'develop' branch, CircleCI will:

  1. Run the automated tests
  2. Deploy the 'develop' branch to a staging server
  3. Run the rainforest tests using the rainforest-cli against the staging server
  4. Once the rainforest tests are successful, push the 'develop' branch to the 'master' branch
  5. Step 4 triggers another CI build, which pushes the code to production

If any of the above steps fail, the build fails, preventing the deployment of broken code to your users.

Getting Started With Circle CI

For the full picture, we encourage you to consult the excellent CircleCI getting started documentation.

The config.yml file

The main way to configure the CircleCI tool is through a file that you store in your git repository. You can see the sample configuration for our project here.

You'll notice that instead of entering the Rainforest API key directly in the config.yml file, we're using an environment variable. We do this for security reasons. We don't want to expose that variable to any reader of that file. This especially true if the repository is publicly accessible.

To configure environment variables, you can do so in the project's settings. You can find your Rainforest API token by navigating to your Integrations settings.*

You can then create a RAINFOREST_TOKEN variable in CircleCI and you're done.

More details about environment variables and Circle CI here.

Testing your setup

You can test your setup by committing a change to your develop branch and pushing it your git repository. CircleCI should pick up on the change and deploy your code.

With a new continuous delivery flow and QA process to match, you can finally move fast and not break things while you're at it!

Note: If you don't see your API token as it's displayed above, we recommend that you click the "Rotate API Token" button to get a new token.

If you have any questions, please feel free to reach out to us at [email protected] or through Intercom!

Updated about a month ago

CircleCI Integration

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.