APIGEE: CI/CD Pipeline for API Proxies

Apigee

                                       In this article, we will see how to create a CI/CD pipeline for APIGEE API proxies. I have referred a couple of articles on APIGEE community on the same topic. Those gave some idea on how to setup CI/CD pipeline for API proxies. Here are the tools which I have used to setup CI/CD.

  1. Jenkins
  2. NodeJs
  3. apigeelint
  4. newman
  5. APIGEE Management APIs

Make sure that you have created APIGEE edge account and a sample proxy to start with.  Below is the architecture diagram which shows the CI/CD pipeline and the stages involved. You can use this as a baseline CI/CD for your projects and can enhance it based on your requirements.

APIGEE_CI_CD

Here are the steps I have implemented in CI/CD pipeline.

  1. Developer pushes the API proxy code to GIT.
  2. Jenkins polls GIT and starts CI/CD Stage 1 based on GIT changes.
  3. As part of Stage 1, the code will be pulled into the workspace.
  4. In “Static Code Analysis” stage, the code will be analyzed for any violations of best code practices and anti-patterns usage. If this stage is the success it proceeds with the build stage. After each stage completion either success or failure, the notification will be sent to Slack channel.
  5. As part of the build stage, we will create APIGEE API proxy bundle.
  6. In the Deploy stage, I used APIGEE management APIS to deploy the API proxy bundle.
  7. Once the deployment is successful, then the integration tests will be triggered. I used Newman to do integration tests. Newman requires integration tests collection file as input. The test cases can be created easily with Postman
  8. In all the stages the notifications will be triggered to Slack channel.

There are some enhancements which I will do in the coming days. Below are some of the changes which I will target as enhancements.

  • Adding email, Hipchat notifications
  • Revert the API proxy to a previous revision if the integration tests fail.
  • If integration tests success, promote build to load test environment and run load test scripts.

The setup and project used as part of this article are available on GitHub. Till then, Spread love for APIs!!!

Apigee Message Logging Policy Demo

 

Advertisement

Siva Janapati is an Architect with experience in building Cloud Native Microservices architectures, Reactive Systems, Large scale distributed systems, and Serverless Systems. Siva has hands-on in architecture, design, and implementation of scalable systems using Cloud, Java, Go lang, Apache Kafka, Apache Solr, Spring, Spring Boot, Lightbend reactive tech stack, APIGEE edge & on-premise and other open-source, proprietary technologies. Expertise working with and building RESTful, GraphQL APIs. He has successfully delivered multiple applications in retail, telco, and financial services domains. He manages the GitHub(https://github.com/2013techsmarts) where he put the source code of his work related to his blog posts.

Tagged with:
Posted in APIGEE
10 comments on “APIGEE: CI/CD Pipeline for API Proxies
  1. John Aluka says:

    Hi Siva, I feel this is very informative post! Hope to read more. Also I might need help, Would you connect sometime?

  2. Sourav Saha says:

    Hi Siva can you please suggest how we can integrate APIGEE with GITLAB CI/CD Pipeline

  3. uma says:

    Hi Siva Prasad,

    Need your support to implement.Can you please give me contact number.

    Thanks,
    uma

    • You can post your questions here. I can answer

      • uma says:

        In our organization we use apigee.We just build and deploy our Apis. To implement Devops with CI\CD in our ogranization what are the tools required and how to make Devops enabled

      • I hope you might be created proxies with APIGEE edge and the zipped proxy bundles might be deployed to other environments. Below are the tools I used to build CI/CD for APIGEE proxies.
        Jenkins
        NodeJs
        apigeelint
        newman
        APIGEE Management APIs

      • ukmakineni says:

        Hi Siva, In our organization, we use apigee tool. We just build and deploys apis. To make my organization devops and CI\CD enabled which tools are required.

  4. Anonymous says:

    Thanks for the information. What plugin is used in Jenkins to build APigee? How the unittest cases are executed in Jenkins for Apigee?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Dzone.com
DZone

DZone MVB

Java Code Geeks
Java Code Geeks
OpenSourceForYou
%d bloggers like this: