How to have apigee emulator docker container running in pipeline with new changes?

Currently, there is a Vscode Cloud Code plugin that helps develop Apigee locally. This spawn up a Apigee emulator docker containers and we can deploy Apigee code into it for local testing via click button in the plugin UI interface.

I want to set up a testing pipeline based on this. Everytime dev commit changes to Apigee code. The pipeline is trigger and spawn up Apigee emulator container with new Apigee code changes and start running integration tests with mocked target back end.

My problem is how can i deploy Apigee code to Apigee emulator container in CI/CD. What CLI or command do i need to run to deploy it?

3 2 902
2 REPLIES 2

I have the same question. Is there a solution out there?

not sure if this still helps... but i was struggling with this particular topic and found... that with the 1.6.1 docker image (at least) you can doit with curl command :
curl -v http://localhost:8080/v1/emulator/deploy?environment=local -H 'Content-Type: zip' \
--data-binary "@src.zip"

been the src a zip containing the full project ... and will get an response like:

{ "revision" : "2"}

 

after that you can call:

curl http://localhost:8080/v1/emulator/tree 

and the response will look like:
[{"application":"test-poc","name":"default","basePath":"/test/api/v1","proxyUID":"2"}]