Project Parameters

In order to create a project, you need to pass project parameters to Squore CLI. The following is a list of the parameters and their meaning:

--login="demo" , -u "demo"

mandatory

The ID of the user requesting the project creation

--password="demo" , -k "demo"

optional, default: ''

The password of the user requesting the project creation. If you do not want to specify a password in your command line, refer to the section called “Saving Credentials to Disk”.

--name="MyProject" , -n "MyProject"

mandatory

Defines the name of the project that will be created.

--WizardId="ANALYTICS" , -w "ANALYTICS"

mandatory

The id of the wizard used to create the project.

--group="MyGroup"

optional, default: ''

Defines the group that the project belongs to. Projects from the same group are displayed together in the project portfolios and the group can optionally be rated as a whole. Note that you can specify subgroups by adding a / in your group name: --group="prototype/phase1" will create a phase1 group under a prototype group.

--color="rgb(130,196,240)"

optional, default: randomly assigned

Defines the color used to identify the project in the Squore user interface after its creation. The numbers define the numbers define the values for red, green and blue respectively. Note that if you do not specify a colour on the command line, a random colour will be picked.

--autoBaseline="true|false" , -b "true|false"

optional, default: true

Instructs Squore CLI to build a baseline version that will not be overwritten by a subsequent analysis. When set to false, every analysis overwrites the previous one, until a new baseline is created. If not set, this parameter defaults to true.

--keepDataFiles="true|false"

optional, default: false

Instructs Squore to keep or discard analysis files from old versions or only for the latest analysis. Note that this behaviour only affects disk space on the server, not the analysis results

--version="V1" , -v "V1"

optional, default: null

Defines the label used for the version of this project. If not specified, the version pattern parameter is used to generate the version label instead.

versionPattern="V#.N#"

optional, default: null

Defines the pattern used to label the version automatically if no version parameter was passed.

Tip

The versionPattern parameter allows specifying a pattern to create the version name automatically for every analysis. It supports the following syntax:

  • #N#: A number that is automatically incremented

  • #Nn#: A number that is automatically incremented using n digits

  • #Y2#: The current year in 2-digit format

  • #Y4#: The current year in 4-digit format

  • #M#: The current month in two digit format

  • #D#: The current day in two digit format

  • #H#: The current hour in 24 hour format

  • #MN#: The current minute in two digit format

  • #S#: The current second in two digit format

Any character other than # is allowed in the pattern. As an example, if you want to produce versions labelled build-198.2013-07-28_13h07m (where 198 is an auto-incremented number and the date and time are the timestamp of the project creation), you would use the pattern: build-#N3#.#Y4#-#M#-#D#_#H#h#MN#m

--versionDate="YYYY-MM-DDTHH:MM:SS"

optional, default: actual analysis time

Allows specifying a date for the version that is different from the current date. This is useful when the charts on your dashboard haves axes or intervals that show dates instead of version names. Note that for every new analysis, the date must be after the date of the previous analysis.

--teamUser="mike,DEVELOPER;john,TESTER;peter,PROJECT_MANAGER" , -q "mike,DEVELOPER;john,TESTER;peter,PROJECT_MANAGER"

optional, default: ''

This semicolon-separated list of login,roleID pairs is used to define a list of users who will be able to access the project when it is created.

Note that this option is taken into account when creating a new project but is ignored when creating a new version. In order to edit the list of users in a project team, you must use the Squore web interface.

Refer to the list of available roleIDs in Squore by clicking Administration > Roles. This option can be combined with the teamGroup parameter if needed.

--teamGroup="devUsers,DEVELOPER;management,GUEST" , -g "devUsers,DEVELOPER;management,GUEST"

optional, default: ''

This semicolon-separated list of group,roleID pairs used to define a list of groups who will be able to access the project when it is created.

Note that this option is taken into account when creating a new project but is ignored when creating a new version. In order to edit the list of groups in a project team, you must use the Squore web interface.

Refer to the list of available roleIDs in Squore by clicking Administration > Roles. This option can be combined with the teamUser parameter if needed.

--rulesetTemplate="my template"

optional, default: null

The name of the ruleset template created in the Analysis Model Editor that should be used for this analysis. For more information about ruleset templates, consult the Getting Started Guide.

--tag="TAGNAME=tagValue" , -t TAGNAME="tagValue"

optional, multiple

If the wizard allows tags (i.e. project attributes), then use the this parameter to inform the CLI of the tag values to use for this project.

--repository="type=REPOTYPE,opt1=value1,opt2=value2" , -r "type=REPOTYPE,opt1=value1,opt2=value2"

optional, multiple

Used to specify repositories for sources. For more information about repositories syntax, refer to Chapter 4, Repository Connectors. When using multiple source code repositories, each one musy have an alias=NodeName parameter that is used to create a folder containing the source code for the repository in the Artefact Tree.

--dp="type=DPName,dp_opt=dp_opt_value" , -d "type=DPName,dp_opt=dp_opt_value"

optional, multiple

Used to specify information for Data Providers. For more information about individual Data Provider syntax, refer to Chapter 5, Data Providers.

--filter="FILTER_OPTS" , -f "FILTER_OPTS"

optional, default: ''

This semicolon-separated string of triplets {artefactType,filterType,filterValue}. In order to export the measure LC at application level and the indicator MAIN at application level, pass -f "APPLICATION,MEASURE,LC;APPLICATION,INDICATOR_LEVEL,MAIN;".

The artefact type ALL_TYPES and the filter types ALL_DEFECT_REPORTS, ALL_MEASURES, ALL_INDICATORS_LEVELS, ALL_INDICATORS_RANKS, ALL_BASE_FINDINGS (new in 17.0), ALL_BASE_LINKS (new in 17.0) and ALL_COMPUTED_LINKS (new in 17.0) can also be used, followed by an empty filter value. In order to export all measures at application level in the output file, pass the parameter --filter="APPLICATION,ALL_MEASURES,;". In order to export all indicators for all artefact types in the output file, pass the parameter --filter="ALL_TYPES,ALL_INDICATORS_LEVELS,;".

--exportZip="/path/to/project/data" , -ez "/path/to/project/data"

optional, default: null

This parameter can be used to import a debug zip file as a new project. When this parameter is used, a new project is created using the paremeters in the conf.xml file inside the debug package, with any other parameter passed on the command line overriding the ones from the configuration file. Instead of a debug zip file, you can pass an absolute path to a project data folder to launch an analysis of all the version folders contained in that folder.

When using this option, you should pass --strictMode="false", -S false to disable some internal data integrity checks and change the project owner if needed using the --owner="admin", -O "admin" to se the new project owner (requires admin privileges).

Tip

This functionality is mostly used to test out how a project is rated in a different model, however it is not recommended for use in production since it will not replicate the following data from the old project to the new project:

  • All comments and discussion threads

  • Action Item statuses

  • History of changes in forms and relaxation comments

  • Relaxations and exclusions statuses of artefacts and findings

-M "id=BETA_RELEASE,date=2015/05/31,PROGRESS=95"

optional, multiple

Allows you to define a milestone in the project. This parameter accepts a date and a series of metrics with their values to specify the goals for this milestone. Note that this parameter allows you to add milestones or modify existing ones (if the ID provided already exists), but removing a milestone from a project can only be done from the web interface.

Tip

You can also define milestones in your project file using a Milestones element in the Wizard section:

<SquoreProjectSettings>
	<Wizard>
		<Milestones>
			<Milestone id="BETA_RELEASE" date="2015-05-31">
				<Goal id="PROGRESS" value="95" />
			</Milestone>
		</Milestones>
	</Wizard>
</SquoreProjectSettings>

The rest of the parameters that you will pass to the Engine to create projects are specific to Repository Connectors and Data Providers and are detailed respectively in the Chapter 4, Repository Connectors and Chapter 5, Data Providers.