Set Up CI/CD
Prepare your pipelines for supergraph development
This guide walks you through creating a code repository for your first subgraph or connector. It also covers setting up your CI/CD pipelines and automating schema checks to prevent breaking changes.
Prerequisites
By the end of the milestone, you'll have:
Deployed your subgraph/connector service to source control
Implemented CI/CD pipelines
Integrated the Rover CLI into your CI/CD pipelines
Steps to complete
1. Publish your first schema to source control
Create a code repository in your source control system and publish your subgraph or connector schema and code to it.
2. Set up continuous integration and deployment
Set up pipelines for the following actions:
Run automated code quality check
Run automated unit tests
Run automated security audit
Store your code as an artifact
Deploy your subgraph service to the cloud
Follow your organization's established patterns for creating CI/CD pipelines for new web services.
Refer to your CI/CD vendor documentation for instructions on setting up pipelines for your chosen platform.
3. Integrate Rover into your pipelines
Add the
rover subgraph checkcommand in your CI pipeline to run on every commit.Add the
rover subgraph publishcommand in your CD pipeline to push changes after they are deployed.(Optional) Add
rover subgraph checkas a pre-merge hook in your pull request. This provides additional validations in a distributed environment where other teams may have made changes that impact your checks, even after your checks have passed.