CI/CD integration overview
One of the powerful features of liblab is the ability to automate your SDK generation using your CI/CD pipeline. This means once set up, every time your API spec changes, your SDK can be regenerated automatically and made available to your users.
At the moment out of the box liblab supports GitHub for pull request creation, and provides GitHub example repos and Actions. You can integrate with other CI/CD systems by running the liblab CLI in your CI/CD pipeline.
Typical CI/CD automation setup
A typical CI/CD setup in GitHub would have the following:
- A control repo in GitHub that contains your API spec, the liblab config file, any hooks code, and GitHub Actions to generate and raise a pull request (PR) for the SDK whenever your spec changes.
- A set of SDK repos, one per SDK language, with GitHub Actions to publish to the relevant package manager.
A typical automated SDK update flow would be:
- The spec is updated in the control repo, and a GitHub Action detects this.
- The GitHub Action runs the liblab CLI to generate the SDK and raise PRs in the SDK repos.
- A reviewer manually checks the raised PRs and merges them.
- A GitHub Action in the SDK repos publishes the SDK to the relevant package managers once a GitHub release is published.
Set up end-to-end automation
Set up a complete end-to-end automation using GitHub in only a few minutes with the following tutorial:
Automatically generate your SDK every time your API changes using GitHub Actions.