How to CI/CD with VSTS?

Not applicable

We're using Microsoft VSTS for our CI/CD and I'm trying to integrate create, update and deployment of Apigee proxies as part of the release.

I know about the existence of openapi2apigee (https://www.npmjs.com/package/openapi2apigee), apigeetool (https://www.npmjs.com/package/apigeetool) and the Edge Powershell Admin (https://github.com/DinoChiesa/Edge-Powershell-Admin).

However openapi2apigee requires parameters to be provided as part of the running process, which is impossible when running unattended.

The other ones, Apigeetool and Powershell, doesn't seem to support creating proxies, just deploying and undeploying.

The thing I'm trying to achieve is to have a 'create proxy' step after deployment of my webapi to Azure. After deployment the OpenApi is available and I like to create a proxy when it's not there or update it to a new revision when there is.

I cannot find any decent information about this, illustrated by the fact that this appears to be the first question with 'VSTS' in the title......

Anyone ideas on how getting this done?

1 3 1,166
3 REPLIES 3

Have you looked at apigee-deploy-maven-plugin and apigee-config-maven-plugin, by using them in combination as phase tasks you can leverage CI/CD in VSTS, at least that is how we have managed to implement it in VSTS.

There's no full support for maven in VSTS therefore every single time you run a maven task it will need to download its dependencies which sometimes takes a considerable amount of time.

Interesting!

Can you explain what exactly you did and how you managed to get it working?

I'm need to dive into Maven as I'm typically focused on Microsoft technology.

I think your description will help a lot of VSTS users looking for a solution!

Thanks in advance!

I've done this a couple of times, using VSTS for source code management and maven based builds.

Here's a summary of the tools involved:

6089-screen-shot-2017-12-07-at-53129-pm.png

and the list of plugins and dev dependencies:

6088-screen-shot-2017-12-07-at-53253-pm.png

The key to getting the node based tools to work on VSTS (windows) is to run them via node, rather than a command line tool (e.g. cucumber.js). See attached pom.xml (pom-distxml.txt) for a simple proxy with config for KVMs and Target Servers. Look for the "windows" comment.

The steps to setup in VSTS are:

1. Create a repository (e.g. pinstatus-v1 proxy)

6095-screen-shot-2017-12-08-at-80429-am.png

2. Create a Build project

This a simple project with just one phase and a single Maven step.

Note the use of options for Maven "-Pdev -Ddeployment.suffix= -Dapigee.config.options=update". These identify the environment to deploy to, the basepath and proxy suffix to use (set to blank to not have a feature suffix), and the config options.

6097-screen-shot-2017-12-08-at-81218-am.png

That's it, pretty straight forward. For more details see these links:

https://github.com/apigee/apigee-deploy-maven-plugin

https://github.com/apigee/apigee-config-maven-plugin