Migrating a Factory Configuration File to Multiple Files

This procedure applies to Workbench 7.1(13) or later.

Before starting, review Multiple Configuration Files.

For a one-time migration of your cfg.factory file to multiple files:

  1. Confirm that you are the only developer working on the cfg.factory file in your Measure Factory project.

  2. Examine the cfg.factory script, to determine the data-set to be extracted.
  3. In the project config directory, create a new factory-data-set file.

    TIP: DI recommends that you use the naming convention: /config/data-sets/NAME.factory-data-set

  4. In the cfg.factory file, locate the data-set, and use a copy and paste operation to add the code block into your new factory-data-set file. Be sure to remove the name from the data-set block in the new file, and then save the file.
  5. In cfg.factory, replace the contents of the data-set block that you copied with a reference to the new file. For example: data-set "NAME" file="data-sets/NAME.factory-data-set"
  6. Do one of the following:

    Run the factory build to make sure it still works, or

    Run spectre measures from the command line using the --dry-run option to look for errors.

  7. Repeat steps 2–6 for more data-sets until all data sets are extracted.

Continue this process for scopes.

  1. Examine the cfg.factory script, and determine the scope to be extracted.
  2. In the project's config directory, create a new factory-scope file.

    TIP: DI recommends that you use the naming convention: /config/scopes/NAME.factory-scope

  3. In the cfg.factory file, locate the scope that you want to extract, and use a copy and paste operation to add the code block into your new factory-scope file. Be sure to remove the name from the scope block in the new file, and then save the file.
  4. In cfg.factory, replace the contents of the scope block that you copied with a reference to the new file. For example: scope "NAME" file="scopes/NAME.factory-scope"
  5. For each measure in that scope, use a copy and paste operation to add the measure tag into the new factory-scope file, and remove the scope tag from inside the measure.

  6. In cfg.factory, remove the contents of those measures, leaving behind only: measure "NAME"

  7. Do one of the following:

    Run the factory build to make sure it still works, or

    Run spectre measures from the command line using the --dry-run option to look for errors.

  8. Repeat steps 1–7 for other scopes and scoped measures until you have extracted all that you want.