Creating or previewing a baseline

You can create or preview the creation of a baseline. Build managers or users in the ccm_admin role can create baselines from one or more projects, baselines, or project groupings.

About this task

ccm baseline -c|-create [(-p|-project project_spec)...]
             [(-bl|-baseline baseline_spec)...]
             [(-pg|-project_grouping project_grouping_spec)...]
             [-rehearse] [-r|-release release_spec] [-purpose purpose]
             [-d|-desc|-description description] 
             [-vt|-version_template version_template] [-b|-build build]
             [-s|-state state] ([-subprojects] | [-all_subprojects] |
             [-no_subprojects]) 
             ([-cpu|-check_project_update] | [-nocpu|-nocheck_project_update])
             [baseline_name]
-all_subprojects
Specifies to include all subprojects that are members of the project being added. This option applies to projects added with the -project, -project_grouping, and
-baseline options.
-b|-baseline baseline_spec
If you use this option with -create and specify a Baseline specification, the projects in the specified existing baselines are added to the new baseline.

The use of –subprojects, -no_subprojects, and –all_subprojects affect which subprojects are also added.

By default, if you use –baseline but not –project, subprojects are not included. However, if you use both –project and –baseline, then the –subprojects default implied by –project overrides the –no_subprojects default implied by –baseline.

baseline_name
Specifies the name that is assigned to the baseline. When you create a baseline, you can assign any legal baseline name to it.

If you do not specify a baseline_name, a unique name is automatically assigned to the baseline. This default name is in the form yyyymmdd. If needed, the default name is followed by an underscore and an incremental number to make it unique. For example, the first baseline created on April 1 2002 has a default name of 20020401. The second such baseline created on the same day has a default name of 20020401_1.

-b|-build build
Specifies a build number or identification for the new baseline. The build number or ID can be any single-line text value. Typically, the build value includes some form of build number.
-cpu|-check_project_update
Specifies to check if any projects require an update before creating the baseline. The check represents projects that were not updated since the project grouping's baseline and tasks were last refreshed.
The default is determined by the ccm.cli.baseline.create.checkprojectupdate setting.
-d|-desc|-description description
Specifies the description to be used for the new baseline. The description is a single line of text and cannot contain any newline characters.
-nocpu|-nocheck_project_update
Specifies not to check if any projects require an update before creating the baseline.
The default is determined by the ccm.cli.baseline.create.checkprojectupdate setting.
-no_subprojects
Specifies that when a project is added, not to add its subprojects. This option impacts projects added using -project, -project_grouping and -baseline. A subproject is included if it is explicitly specified as a project or is a member of a specified project grouping or baseline.

If -project_grouping or -baseline is not specified, the default is
-subprojects. If -project_grouping or -baseline is specified, the default is -no_sub_projects.

-p|-project project_spec
Specifies to add one or more projects to the new baseline. By default, when a project is added, its entire hierarchy is also added. You can override the default by using the -no_subprojects option.
-pg|-project_grouping project_grouping_spec
Specifies to add projects in the specified project groupings to the new baseline. By default, when a project grouping is added, only those projects in the project grouping are added. Subprojects that are not part of the project grouping are not added. To override this behavior, use the –all_subprojects option.

The –subprojects, -no_subprojects, and –all_subprojects options affect which subprojects are added along with the project groupings.

-purpose purpose
Specifies the purpose to be used for the new baseline. If not specified, the default purpose is set using this precedence:
  • If a baseline is specified, the first specified baseline purpose is used.
  • If no baseline is specified, but a project grouping is specified, the first project grouping purpose is specified.
  • If neither a baseline or project grouping is specified, the purpose of the first specified project is used.

A purpose is a setting that specifies the use of a project (for example, Insulated Development, Integration Testing, System Testing).

If you specify -purpose, you must also specify -release.

-rehearse
Lists the projects and products that make up the baseline and the name of the baseline to be created. Does not create the baseline.

If any version conflicts are found, a warning lists all the product and project versions that are in conflict. The conflicts exist because the resulting version exists in a new baseline or because the resulting version would not be a legal version string.

-release release_spec
Specifies the release to be used for the new baseline. When creating a baseline, you can specify one active release. If not specified, the default release is set using this precedence:
  • If a baseline is specified, the first specified baseline release is used.
  • If no baseline is specified, but a project grouping is specified, the first specified project grouping release is used.
  • If neither a baseline or project grouping is specified, Synergy uses the release of the first specified project.

If you specify -release, you must also specify -purpose.

-state state
Specifies the state of the baseline when it is created. When creating a baseline, valid states are test_baseline, published_baseline, and released. The default state for a baseline is test_baseline. Developers can see the baseline in this state and can use it manually; however, they do not get it automatically as the latest baseline. SQE can use it for testing. After it passes testing, the build manager must move the test baseline to published_baseline to make it available for developers to use.

Creating a baseline in the released state is equivalent to creating one in the published_baseline state, and then releasing it.

-subprojects
Specifies to include subprojects whose release match the component name of the project being added. The component name must match exactly. A release without a component name can match only another release without a component name.

This option applies to projects added with the -project, -project_grouping and
-baseline options. This is the default behavior if -project_grouping or
-baseline is not specified. If -project_grouping or -baseline is specified, the default is -no_subprojects.

-vt|-version_template version_template
Specifies the version template to be used for any project or product in the new baseline. New project and product versions created during the command use the version_template for their versions.

A version_template is any string, with optional keywords, with the form %keyword or %{keyword}. The keyword can be any Rational Synergy attribute or built-in keyword.

When an attribute is expanded, the corresponding attribute value from the build management project or product being examined is used. If an attribute or built-in keyword is not found for a specified keyword name, the empty string replaces the keyword.

If the instantiated version_template for any project or product in the baseline contains characters that are not allowed in a version string, those characters are replaced with the default version string replacement character. This setting is specified in the server ccm.ini file, with the baseline_template_repl_char option. This default character is an underscore (_). For example, if %platform is part of a version template, and the build management project has a platform of SPARC-solaris, then the version string contains the string SPARC_solaris. Or, if %release is part of a product version template, and the prep product has a release of CM/6.5, then the version string contains the string CM_6.5.

If the instantiated version_template for any project or product in the baseline is already in use for another version of that project or product, the version is made unique by appending an underscore (_) and the first integer that makes the version unique, starting with 1. If this causes the version string to be too long, then a version based on the current date is used for that project or product, and a warning is given.

If you do not specify –version_template, the default template is used. For more information, see "Version template specification" in baseline command.

The work area is updated if the work area template for the project includes the version. If a work area cannot be updated because it is not visible, and -skip_nonvisible_projects is not used, the operation continues and all errors are reported. If the work area is visible, but cannot be updated for other reasons, such as lack of proper file permissions or lack of disk space, the operation continues and all failures are reported.

Example


Feedback