1
votes

I am building an Azure Devops project. the project has both UI and Backend application codes. Both the codes are placed as a single project in GitLab. But different teams are working for UI and Backend. I need to configure two build pipelines one for UI changes and one for backend changes.

What I need is to trigger a specific pipeline based on the commit messages. ie; if a UI change is made, then the commit message will contain a keyword "UI_CHANGES" in it. The Azure DevOps should recognize this and trigger the UI build pipeline.

when I googled, I came to know that Azure DevOps doesnot support the commit messaged based filtering for trigger a new build pipeline.

Can I make use of Git tags here? If yes, please guide me on how to use it. Any other possible ideas are also welcome!

Thanks in advance.

2
Not get your response for several days, would you please share your latest information about this issue? If you have any concern, feel free to share it hereHugh Lin

2 Answers

1
votes

You don't need to run the pipeline according to the commit message, you can create two pipelines and in the trigger determine which will run when with the Path filters:

enter image description here

0
votes

In my opinion some kind of "path filter" is what you need. Azure DevOps has an integrated "path filter" but this works only for repos hosted on Azure Devops.

My proposals what you could do in your current situation.

  • Move your repository to Azure DevOps This is the best solution in my eyes but not applicable if you have to stick with GitLab for any reason

    • Pro: You have repo and pipelines at the same location
    • Con: You have to move the repo and set up new memberships etc.
  • Build/Publish with GitLab I am not experienced with pipelines in GitLab so I cannot say if this is a viable solution

    • Pro: You have repo and pipelines at the same location and don't need to move
    • I am not sure how building / publishing works with GitLab (neither pro nor con)
  • Mirror your GitLab repo to Azure DevOps You could use this extension to constantly mirror your repo from GitLab to Azure DevOps and build / publish with the pipeline's integrated path filter

    • Pro: You don't need to move but can use the pipelines of Azure DevOps
    • Con: You are dependent on the extension which only "connects" two independent repos.
  • Connect your GitLab repo with Azure DevOps and do the logical part within the pipeline I think this is the least favorable solution because you have to do all the logical stuff by hand within your pipeline. Nevertheless if you are interested in this solution I recommend a further look at this extension. But it is not as comfortable as the default path filter.

UPDATE I just had a deeper look to this extension and I don't think that this fits your needs. Sorry for that. Nevertheless you can just connect to your GitLab repo without the extension. Just create a PAT for reading your repos and add a Service Connection for "Other git" in Azure DevOps.
As mentioned before you could do the logic of what to build within your pipeline (not favorable).

Cheers and Good Luck!