Here is an examples on how to run the MAIA git scanning as a periodic standalone job, making sure that the MAIA web app is synchronized with the Git repositories.
Periodic scanning may run parallel with other MAIA git scanning activities, e.g., scanning in a build pipeline for the same repositories.
On a host where scanning is to be done:
Initialize the periodic scanning by removing an eventual existing clone before scanning the first time.
rm -rf <repository_name>
MAIA web app can be reached via HTTP + Kafka is setup and can be reached.
An API user exists in the MAIA web app, having the permissions:
The user has created an API token (referred to from the environment file).
MAIA Agent is installed.
The environment variable BUNDLE_GEMFILE points to the MAIA Agent Gemfile.
The environment variable BLT_ENV points to the environment.yml file.
:
:
bundle exec maia git_scan --repo-name <repository_name> --cyclic 300:14400
:
:
Note that calling this command creates the file: