3

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

Haithem KAROUI
  • 1,533
  • 4
  • 18
  • 39

1 Answers1

0

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.
  2. Also Visual studio provides you to connect to the cloud using cloud explorer where you can mimic resubmit , run history etc..
  3. 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.
  4. You can utilise Speck flow for automate logic app testing Automated tesing logic app with speckflow this link explained it in detail.
Just Shadow
  • 10,860
  • 6
  • 57
  • 75
  • 1
    Thank you for your answer, but there is still a big part of the question not answered, can you please edit your answer to add wich type of build template i can use and if you can point some examples to me? thanks – Haithem KAROUI May 13 '19 at 08:18
  • Hi @HaithemKAROUI I am also designing the similar workflow and is in the same confusion you were. If you have achieved and done it could you please guide me on this: https://stackoverflow.com/questions/66746354/how-to-create-a-logic-app-to-include-azure-function-and-deploy-using-ci-cd-pipel – Avishekh Bharati Mar 22 '21 at 12:49
  • @AvishekhBharati as mentioned in the the answer that i checked up there, the best way to go is via Visual studio. Keep your code inside visual studio as well as ARM scripts for creating and managing your logic app For CD, you will need a resource creation task step to create a logic app on each deployment. – Haithem KAROUI Mar 22 '21 at 13:58
  • @HaithemKAROUI Cool. So how did you arrange your project? Was it two independent solutions for function and logic app or two projects within the same solution or the same project having both function app and arm template for the logic app? – Avishekh Bharati Mar 22 '21 at 20:39
  • @AvishekhBharati : you can use all the three options as you mentioned depending on the way you want to structure. – Suraj Revankar Mar 22 '21 at 20:44
  • @SurajRevankar Hi Suraj just want to know your thoughts on this: https://stackoverflow.com/questions/66746354/how-to-create-a-logic-app-to-include-azure-function-and-deploy-using-ci-cd-pipel – Avishekh Bharati Mar 22 '21 at 20:46
  • Hi @AvishekhBharati : I have answered my bits on your question. Do let me know if you need any more information. – Suraj Revankar Mar 22 '21 at 21:03