by kureikain · 7y ago · 0 comments
I'm using Jenkins. So right now I don't have a way to force build specific directory :(. It build entire thing :(. Anyone knows how to solve these problem? I have a Rails app, Go services, iOS, Android all in same repo..
It's interesting that we're moving into a microservice architecture but we try to consolidate the code base into one.
An example to illustrate this: You have a library X that depends on Library Y and application A that depends on X. Then when you make a change in Lib Y you want to make sure that the change doesn't break X or A. If A, X and Y live all in separate repositories with separate CI pipelines, then this is hard/cumbersome to solve. In a Mono-repo, if you use a build system like Bazel, it's very easy.
I believe when you say that your Jenkins setup is a mess, we experience a similar situation with GitLab CI. But I think it's important to realize that CI stands for "Continuous Integration". And running pipelines for every individual repository is not really testing integration, it's just testing an individual component. The solution is to use Bazel or similar. Then you will have proper CI.
def databaseChanges = sh returnStdout: true, script:"git diff --name-only HEAD^ HEAD database"
def etlChanges = sh returnStdout: true, script:"git diff --name-only HEAD^ HEAD etl"
def apiChanges = sh returnStdout: true, script:"git diff --name-only HEAD^ HEAD api"
And conditional deploying ( eg. Update external libraries only.
I'm production, it's not continuous, but in beta and alpha it is.