Skip to main content

Version: 23.04

Clone Project

Cloning a project is the process of pulling all the assets required to build a form from the Journey Maestro server onto the local file system. Cloning is performed on a per-project basis which, by default, includes all forms, components, templates, receipts, and libraries that are defined in that project.

In order to build a form successfully, the Release Libraries for the relevant release version must be available, as well as any Organization Libraries that the form uses. While there are separate actions for downloading Release and Organization Libraries, the Clone Project command includes flags to include these libraries when cloning a project.

To create a connection to the Journey Maestro server, a URL and user credentials (username/password) must be provided. The user credentials must correspond to a user that has access to the project being cloned, and have the following permissions (assigned through a role in the Journey Manager security configuration):

  • Scm Project View
  • Scm Release Library View (if also requesting Release Libraries)
  • Scm Org Library View (if also requesting Organization Libraries)

As well as the server location and credentials, the location of the project in Journey Maestro must be provided. This location takes the form of the SCM Project Path which can be obtained for any project in the Maestro UI by opening the Project Details tab for the relevant project in the dashboard.

The Journey Maestro Management Dashboard, highlighting the path in the SCM Clone command on the Project Details tab

Synopsis

maestro scm-clone [ options ]

Options

All options are optional unless otherwise indicated.

info

Both short and long options are shown in the table below. When specifying a command, use either a short option or long option but not both.

OptionDescription
-s
--server
Serve URL
(Required) The URL of the maestro server. Include only the protocol and domain without a trailing slash or path; for example, https://maestro.avoka.com.
-u
--user
Username
(Required) The username of a Maestro user that has the required project permissions.
-p
--password
Password
(Required) The password for the user specified in the Username option.
-r
--remote-path
Remote Path
(Required) The SCM Project path for the project being cloned.
-l
--local-path
Local Path
The path on the local file system to place the files. If not provided, the files are exported to the current working folder.
-f
--force-overwrite
(Flag) Force Overwrite
Indicate that any existing contents in the output folder may be overwritten. If not specified and the folder is not empty, an error is displayed.
-o
--org-libs
(Flag) Include Organization Libs
Include the relevant Organization Libraries in the exported assets.
-i
--release-libs
(Flag) Include Release Libs
Include the relevant Maestro Release Libraries in the exported assets.

Output

Cloning a project from a Maestro server creates a very specific folder structure in the output folder, with the project folder itself is placed inside an organization folder. This allows multiple projects (even across different organizations) to be cloned to the same output folder without interfering with one another.

A partial File Explorer window showing the folder structure

The forms folder contains a subset of folders, one per form, named according to their normalised form name.

A partial File Explorer window showing per-form sub-folders in the forms folder

Examples

  • Export a project to the current working folder.

    maestro scm-clone --server https://maestro.avoka.com.au --user username --password p@ssw0rd --remote-path offline-build-demo/demo-project
  • Export a project to a different location on the local file system.

    maestro scm-clone --server https://maestro.avoka.com.au --user username --password p@ssw0rd --remote-path offline-build-demo/demo-project --local-path C:\my-project
  • Export a project to the current folder, removing any existing contents first.

    maestro scm-clone --server https://maestro.avoka.com.au --user username --password p@ssw0rd --remote-path offline-build-demo/demo-project --force-overwrite
  • Export a project to the current folder, including the Release and Organization Libraries.

    maestro scm-clone --server https://maestro.avoka.com.au --user username --password p@ssw0rd --remote-path offline-build-demo/demo-project --force-overwrite --release-libs --org-libs
tip

The short and long formats of parameter names are interchangeable. When using the short formats, flag-type parameters can be chained together into a single flag. So, the last example above could also be specified as follows.

maestro scm-clone -s https://maestro.avoka.com.au -u username -p p@ssw0rd -r offline-build-demo/demo-project -fio