VOOZH about

URL: https://www.javacodegeeks.com/2019/02/apigee-ci-cd-pipeline-api-proxies.html

⇱ APIGEE: CI/CD Pipeline for API Proxies - Java Code Geeks


In this article we will see how to create CI/CD pipeline for APIGEE API proxies. I have referred 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 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.

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 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 success it proceeds with build stage. After the each stage completion either success or failure the notification will be sent to Slack channel.
  5. As part of build stage we will create APIGEE API proxy bundle.
  6. In Deploy stage I used APIGEE management APIS to deploy API proxy bundle.
  7. Once the deployment is successful, then the integration tests will be triggered. I used Newman to do integration testes. 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 coming days. Below are some of the changes which I will target as enhancements.

  • Adding email, Hipchat notifications
  • Revert the API proxy to 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 is available on github. Till then, Spread love for APIs!!!

Published on Java Code Geeks with permission by Siva Janapati, partner at our JCG program. See the original article here: APIGEE: CI/CD Pipeline for API Proxies

Opinions expressed by Java Code Geeks contributors are their own.

Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
6. Spring Interview Questions
7. Android UI Design
and many more ....
I agree to the Terms and Privacy Policy

Thank you!

We will contact you soon.

Tags
APIGEE CD CI
πŸ‘ Photo of Siva Janapati
Siva Janapati
February 6th, 2019Last Updated: February 7th, 2019
3 1,199 1 minute read

Siva Janapati

Siva Prasad Rao Janapati is an Architect. He has hands on experience on Java, JEE, Spring, Oracle Commerce, MOZU Commerce, Apache Solr, Apache Kafka, Node.js, JBoss, Hibernate, Memcached, MySql, Oracle, MongoDB, APIGEE, Cloud Native, BlockChain and other open source/enterprise technologies. He loves to explore new technologies and trends.
Subscribe

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

3 Comments
Oldest
Newest Most Voted
Roman
7 years ago

The github link is incorrect. This is the correct link : https://github.com/2013techsmarts/APIGEE_CD_CD

0
Reply
Chandresh.Patel
7 years ago

FlexDeploy also provides Apigee plugin for quick implementation of CI/CD for Apigee. See https://flexagon.atlassian.net/wiki/spaces/FD50/pages/1074069613/FlexDeploy+-+Apigee+Plugin+Guide.

0
Reply
Patrick
6 years ago

Oooh nice! I’ve been looking for such a solution. I have tested your take on it and it’s cool. Altho it requires some devops work. Can you tell me how long does the entire process take on your end?   Apart from Jenkins we are also testing out buddy.works and Bitbucket Pipelines. We want to compare and choose the best solution that will be scalable and cheap to maintain. Jenkins however, requires one full-time person that knows the platform pretty well. Currently we are testing Buddy and it’s very simple and fast in comparison (every dev in our team can create his… Read more Β»

0
Reply
Back to top button
Close
wpDiscuz