Results

Scan a subversion repository (updating)

Updated:2023-07-03

Prepare

Prepare, if not already done, the environment file and the configuration file to scan a svn repo.

​ The environment file must have following variables defined:

  • MAIA_CORE_HOST

  • MAIA_CORE_HTTP_PORT

  • MAIA_CORE_APP_CONTEXT

  • MAIA_CORE_USE_SSL

  • MAIA_CORE_API_TOKEN_FILE

  • COMPONENT_CONF_FILE

  • REPOSITORIES

  • KAFKA_BROKERS

  • KAFKA_TOPIC

    The parameter REPOSITORIES must be a hash with the key repo_name and a value that is the URL to the repository that will be scanned. For example, repository1: http://mycm.com/svn/repository1

Add the components and tracks that will be scanned to MAIA application.

Initialize a Subversion scanner

The components and tracks that will be scanned must exist in MAIA WebApp.

  1. ​ a. Initalize the scanning of a Subversion repository from its first commit, with a local clone.

    maia init_svn_scan --repo-name repository_name --path sandbox --clone –from-first

    or

    ​ b. Initalize the scanning of a Subversion repository from its first commit, without a local clone.

    maia init_svn_scan --repo-name repository_name --remote –from-first

    or

    ​ c. Initalize the scanning of a Subversion repository from a given date, with a local clone.

    maia init_svn_scan --repo-name repository_name --path sandbox --clone –-start-date start_date

    or

    ​ d. Initalize the scanning of a Subversion repository from a given date, without a local clone.

    maia init_svn_scan --repo-name repository_name --remote –-start-date start_date

  2. If you want to use credentials for the Subversion repository, add the following options:

    –username user_name --password password --no-auth-cache

Run the Subversion scanner

  1. Start scanning a repository with the MAIA Agent command maia svn_scan.

    Example: starting a MAIA Agent scanner that runs a scan every 5 minutes, for 4 hours.

    bundle exec maia svn_scan --repo-name repository_name -c 300:14400

  2. Go to the MAIA WebApp and login.

  3. On the Main menu, select Commits.

  4. Verify that the commits scanned from the repository are visible in the MAIA WebApp.