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.
Our project is configured to provide a continuous delivery flow by default.
Every time code is pushed to the “develop” branch, CircleCI:
- Runs the automated tests.
- Deploys the “develop” branch to a staging server.
- Runs the Rainforest tests using the Rainforest CLI on the staging server.
- Once the Rainforest tests are successful, pushes the “develop” branch to the “master” branch.
- The previous step triggers another CI build, which pushes the code to production.
Note: If any of the above steps fail, the entire build fails, preventing the deployment of broken code to your users.
For a complete picture, we encourage you to consult CircleCI’s Getting Started documentation.
The primary way to configure the CircleCI tool is through a file in your Git repository. You can see the sample configuration for our project here.
Notice that instead of entering the Rainforest API key in the config.yml file, we use a test datatest data - Placeholders that allow you to inject other values into your tests. Rainforest supports three types: dynamic, static, and built-in. placeholder. For security reasons, we don’t expose the key to any reader of that file, especially when the repository is public.
Configure the test data in your project’s settings. You can find your Rainforest API token by navigating to your Integration settings.
RAINFOREST_TOKEN variable in CircleCI, and you’re done.
You can find more details on environment variables and Circle CI here.
Test your setup by committing a change to your develop branch and pushing it to your Git repository. CircleCI detects the change and deploys your code. With a new continuous delivery flow and QA process to match, you can move faster while not breaking things.
Note: If you don’t see your API token, we recommend clicking the Rotate API Token button to receive a new token.
If you have any questions, reach out to us at [email protected] or via the chat bubble below.
Updated 23 days ago