1

We are starting a brand new project using .Net Core Web Api and React to build a marketing tool.

In the past in different projects I was assigned to and the repo was already set up, we had one git repo for the back-end and another git repo for the front-end and each one of them having its own CI pipeline.

Now, for the new one, the requirement is to have both back-end and front-end in the same repo but different folder. So, just wondering if we can still have two CI pipelines with this structure. If so, could you share any documentation/ link how to achieve that?

Daniel Mann
  • 57,011
  • 13
  • 100
  • 120
MikePR
  • 2,786
  • 5
  • 31
  • 64
  • 2
    Did you start by reading the documentation and experimenting? – Daniel Mann Apr 09 '20 at 03:18
  • Hi @DanielMann, yes I did. I already marked the given response as done. However, I am facing a different problem now only for the Front-end pipeline. More details in the response section. – MikePR Apr 10 '20 at 16:35

1 Answers1

2

Yes you can. You just need to limit trigger access to specific folders. You need to have two build definitions and define there proper for your project include and exclude paths.

An example from doc

# specific path build
trigger:
  branches:
    include:
    - master
    - releases/*
  paths:
    include:
    - docs/*
    exclude:
    - docs/README.md
Krzysztof Madej
  • 32,704
  • 10
  • 78
  • 107
  • @Krzystof, thanks for sharing it. I followed it up as well as the documentation. I created two separated pipelines and are working properly. The only thing is that the Front-end one is failing because at the moment to execute the npm install and build steps, it cannot find the project where the package.json file is located. I guess because the new folder structure. I will troubleshooting it. – MikePR Apr 10 '20 at 16:33
  • 1
    You need probably set working directory for this step. Please check this https://stackoverflow.com/questions/53857085/change-current-working-directory-in-azure-pipelines – Krzysztof Madej Apr 10 '20 at 19:34
  • 1
    Thanks for the link. I figured it out following some steps on the documentation. Now both front-end and back-end CI pipelines are working properly. – MikePR Apr 11 '20 at 05:44