Creating or previewing a baseline

About this task

Creates or previews 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.

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]) [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.

Note that 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.
-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.
-no_subprojects
Specifies that when a project is added, its subprojects should not be added. This option impacts projects added using -project, -project_grouping and -baseline. A subproject will be included if it is explicitly specified as a project or is a member of a specified project grouping or baseline.

If neither -project_grouping nor -baseline is specified, the default is
-subprojects. If either -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 this 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.

Note that –subprojects, -no_subprojects, and –all_subprojects 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, Synergy uses the first specified baseline's purpose.
  • If no baseline is specified, but a project grouping is specified, Synergy uses the first specified project grouping's purpose.
  • If neither a baseline or project grouping is specified, Synergy uses the purpose of the first specified project.

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

Note that if you specify -purpose, you must also specify -release release_spec.

-rehearse
Lists the projects and products that will make up the baseline and the name of the baseline that will be created, but does not actually create the baseline.

If any version conflicts are found, you will see a warning that lists all the product and project versions that are in conflict. The conflicts exist because the resulting version already 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, Synergy uses the first specified baseline's release.
  • If no baseline is specified, but a project grouping is specified, Synergy uses the first specified project grouping's release.
  • If neither a baseline or project grouping is specified, Synergy uses the release of the first specified project.

Note that if you specify -release, you must also specify -purpose 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 won’t get it automatically as the latest baseline. SQE can use it for testing. After it passes testing, the build manager must transition 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 only match 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 neither -project_grouping nor
-baseline is specified. If either -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 is specified in the 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 will make 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 don’t specify –version_template, the default template is used. For more information, see sc_t_h_show_baseline_info.html#wp959846__wp962241.

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

About this task

  • Create a baseline named Build_1234_int for Release 2.0, for the purpose of Integration Testing, that includes a project named proj1-sqa_3 and its subprojects.
    ccm baseline -c Build_1234_int -d "Integration build 1234" -r 2.0 -purpose "Integration Testing" -projects proj1-sqa_3 -subprojects

Feedback