Detect supported projects
What does this MR do?
Detect supported projects and package managers based on directory contents, and scan projects instead of files:
- Finder is now based on project detection, and returns projects w/ corresponding package managers
- Finder is configured with presets that correspond to gemnasium, gemnasium-maven, and gemnasium-python
- Scanner scans projects, and not files
File
combines a file name with a type. Types are requirements file, lock file, and dependency graph export. A file has no path.
The File
struct is used to describe:
- files of a detected project
- files supported by package managers
PackageManager
combines a name, a package type, and the files the package manager handles. In this context, the files are pattern really.
Project
combines a set of files with a directory where they've been found (relative to the search directory), and the package manager handling these files. Project
provides functions to retrieve specific files (used by builder and scanner), and to add a dependency graph export (used by builder).
This is a reverse dependency of:
TODO
-
Add unit tests for detect functions
What are the relevant issue numbers?
gitlab-org/gitlab#263441 (closed)
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer