CodeSightMigration.sh

The CodeSightMigration.sh script is used to create Black Duck Code Sight projects for existing TeamForge repositories. After migration, the code search functionality is enabled for migrated repositories.

Location

runtime/scripts/codesearch/CodeSightMigration.sh

Usage

Before running this script, do the following:
Note: Log on with site administrator credentials and run this script on the TeamForge application server.

Example

The following command enables Code Search for the given repositories.

Targets

The following targets are available for this script:
--target=create
This is the default target and is used for creating Black Duck Code Sight projects for existing TeamForge repositories.
[--filename=<repositories-input-filename>]
Default: /tmp/repository-ids; specify any other filename with the --filename parameter.
--username=<admin-username>
Site admin username
--password=<admin-password>
Site admin password
[--totalthreads=<number of threads to spawn>]
Default: 25; the total number of threads needed to run Black Duck Code Sight migration.
--target=delete
Delete Black Duck Code Sight projects for the corresponding TeamForge repositories.
[--filename=<repositories-input-filename>]
Default: /tmp/repository-ids; specify any other filename with the --filename parameter.
--username=<admin-username>
Site admin username
--password=<admin-password>
Site admin password
[--repoids=<repo-id1,repo-id2,repo-id3>]
Default: delete all repositories as specified in the input filename or delete the repositories specified in the command line
--target=status
Status of Black Duck Code Sight projects created for TeamForge repositories.
[--filename=<repositories-input-filename>]
Default: /tmp/repository-ids; specify any other filename with the --filename parameter.
--username=<admin-username>
Site admin username
--password=<admin-password>
Site admin password
[--repoids=<repo-id1,repo-id2,repo-id3>]
Default: status of all repositories as specified in the input filename or the status of the repositories specified in the command line

Logs

Three types of logs are available. They are located at site/log/codesearch.

Comments

There is a another script that generates the final SQL to fetch repository IDs for a given list of repository paths. See repository-sql.sh for more information.