9 CI/CD for API artifacts 2: Build-stage and API-configuration deployment
This chapter covers
- Transforming API definitions in the pipeline
- Publishing generated API artifacts to an artifact store
- Creating SDKs and mock APIs
- Deploying API Gateway configuration
In chapter 8, I discussed source-stage governance controls to help teams apply automated governance checks to API definitions at the API-design stage. After the definitions have been reviewed and approved, the API team may need to do the following:
- Generate artifacts from the API definition. These artifacts can include software development kits (SDKs), alternative API definition formats, and human-readable API reference documentation for the developer portal.
- Deploy the API service to higher environments
- Deploy the API gateway configuration
- Test the implemented API for conformance
This chapter details how to perform these tasks in the deployment pipeline, which lie in the ’Build’ and ‘Deploy & Test’ stages (figure 9.1).
Figure 9.1 The APIOps practices discussed in this chapter
This hands-on chapter is aimed primarily at developers who need to set up a deployment pipeline to deploy and publish APIs. You’ll walk through an example of setting up a pipeline to generate and publish API artifacts to internal API artifact stores using GitHub Actions. You’ll implement deploying API configuration in two open-source API gateways using an APIOps (that is, GitOps-based) workflow.