Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

condition for Monorepo changes

Kaushik Das May 16, 2023

I have a nx monorepo with multiple apps. Want deploy based on if the dist/app/app1 is generated or changeset of files. 
So, far I have tried condition changeset but its using and condition.

Want to deploy if any one of the directory has any changes.


         - "apps/app1/**"
         - "lib/app1/**"
         - "lib/dependency/**"
Currently to trigger deployment it needs to change change in both the directory. Is there any way to make it any of the file changes triggers deployment?

2 answers

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 17, 2023

Hi @Kaushik Das and welcome to the community!

If you have multiple paths in includePaths, then a change in any of these paths should trigger a pipeline (it shouldn't be required to have a change in all of them).

Please keep in mind the following:

In a pull-requests pipeline, all commits are taken into account, and if you provide an includePath list of patterns, the step or stage will be executed when at least one commit change matches one of the conditions.

For other types of pipelines, only the last commit is considered.

What type of pipeline are you using for the step or stage that has this condition?

If it is not a pull-request pipeline, can you check the build log of a step that didn't run and see if there was a change in any of these paths in the commit that triggered the build?

Kind regards,

0 votes
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 16, 2023

Lame idea: as you can use wildcards, why don't you just:

         - "**/app1/**" <- this pattern matches both the "apps/" and "lib/" sub-dirs!
Kaushik Das May 16, 2023

This will work. But I also have some dependency modules that I can not add like this.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events