Hi Team , i have one requirement i have one repo ...
# github-actions
g
Hi Team , i have one requirement i have one repo in github job triggered by webhook in that repo multiple directories are present what my requirement is i want multi-branch pipeline when ever the changes are made in root need to trigger one job and particular dir change need to trigger another job how can i achive this through the plugin Thanks
s
Yes, I can help you with that.
g
Hi Shiv , How can we do that can you please help me
my req is i dont want make chnages in the jenkinsfile
s
Use GitHub Actions + Jenkins Job Triggering
g
we haven't used the github actions @shiv
s
You need Jenkins or GitHub action?
g
need Jenkins found solution for my req using git submodules we can achieve Thanks @shiv
s
Maybe "path ignore " also work
g
Thank you very much @shiv
e
@Gowtham E are you using this pattern with Terraform? or some other tooling
g
no we haven't used any extra tools here we have large code base more than 5G so recently we migrate into P4 to GitHub so in perforce the structure is diff Github is diff so now by using the git submodules we can achive the same whatever the P4 do so in my case , we have two repos A and B inside A repo any dev change anything it will go into A pr check and then commit inot A repo only same as B so if any other dev want both repos they need to clone A repo enough by default B will automatically clone
e
The reason I ask is that there’s tools specifically to solve this depending on your language and framework
For example, in the nodeJS ecosystem there is turbo repo
Bazel for go, c++
We built something similar for terraform.
So what do you wanna do is entirely possible without using any of these tools I just mentioned
but the reason why I ask is depending on what you wanna accomplish it’s better to use a purpose built tool than a generic solution like only using GitHub actions without supporting tooling
not saying don’t use GitHub actions, use GitHub actions with the right tooling
TL;DR To get to answering your question directly, the most popular GitHub action that's used to accomplish what you want to do is the following. https://github.com/tj-actions/changed-files
We use it extensively at Cloud Posse, and you can see it has over 2,400 stars.