IBM / dbb-zappbuild

zAppBuild is a generic build solution for building z/OS applications using Apache Groovy build scripts and IBM Dependency Based Build (DBB) APIs.
Apache License 2.0
41 stars 140 forks source link

GitUtilities.groovy - function to discover Git Repositories #283

Open FALLAI-Denis opened 1 year ago

FALLAI-Denis commented 1 year ago

Hi,

In our context of use, we use several Git repositories during a build:

For IBM DBB to work, root folder of Repositories (or even subfolders) must be declared at the level of the applicationSrcDirs variable.

If the main Git repository is well known, that of the secondary repositories is less so, and can evolve over time, which causes us problems, (see #277).

To avoid getting into day-to-day management, we would like our Jenkins pipeline to discover secondary Git repositories on its own and update the applicationSrcDirs variable by discovering these secondary Git repositories.

To do this, you would need a search function for Git repositories:

The function could also accept a list of folders (glob format) to exclude from the search.

We can develop such a function for our own purposes, but I think it could be of more general interest and could be integrated into the script GitUtilities.groovy.

I can post a request for this on the IBM Ideas site, (but I need the function immediately, even for yesterday :-) ).