In our context of use, we use several Git repositories during a build:
a main Git repository, containing the programs
several secondary Git repositories, containing the copybooks / includes
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:
from a specific folder given as argument to the function, search for subfolders named ".git"
consider the parent folder of the ".git" folder found
check that the parent folder of the ".git" folder corresponds to a Git repository, function isGitDir(folder)
return the list of parent folders of ".git" folders recognized as the root folder of a Git Repository
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 :-) ).
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:
isGitDir(folder)
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 :-) ).