I have a logic app that connects to an sftp server (virtual machine that I created on azure) and does actions when a file is added to that sftp:

  • When a file is added I create a new blob on the blob storage.

  • Delete the file from the SFTP server

I have also created a blob trigger-based azure function that, every time a blob is created, processes some actions (like blob content decryption and parsing). Next steps will be chaining some other azure functions executions in my logic app (like sending e-mail after executing and azure function etc... )…

Now, I have two main questions: In order to have the best CI/CD pipeline suited for this workflow, do I create the logic app from the portal or from visual studio and why please?

Do I put azure function and logic app in the same solution/Repo? Same project?

Then, how can I create the CI/CD pipeline (type template and steps please)?

Ps: I want to add unit tests to test if my logic app and azure function are working correctly so I want to integrate test step in my build definition.

For more details about the logic app please see this Stack overflow question in which i detailed the process

and here is the logic app

Logic app image

1 Answers

0
Suraj Revankar On Best Solutions

Please find the below points:

  1. I would recommend using Visual Studio. The main advantage is it gives you the same designer experience, and you can make use of ARM Template and parameters to deploy your logic app robustly to multiple environments to dev, Staging , proc etc., making a robust CI/CD pipeline. It also gives you an advantage of using Azure key vaults using ARM template and the parameter syntax to store any sensitive data.
    1. Also Visual studio provides you to connect to the cloud using cloud explorer where you can mimic resubmit , run history etc..
    2. If you are using Azure function only for one process then you can put it under the same solutions, but keeping Azure functions as a separate Repo gives you more flexibility of re-usability, so that other applications can also make use of it.
    3. You can utilise Speck flow for automate logic app testing Automated tesing logic app with speckflow this link explained it in detail.